# pydantic_core._pydantic_core.ValidationError: 1 validation error for Config
__root__
  Instance is frozen [type=frozen_instance, input_value=Config(x=1), input_type=Config]

- **ID:** `python/pydantic-model-frozen-mutation`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The model was declared with model_config = ConfigDict(frozen=True) and code attempted to mutate an attribute after construction.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   c2 = c.model_copy(update={'x': 2})
assert c2.x == 2 and c.x == 1
   ```
2. **** (90% success)
   ```
   from pydantic import BaseModel, ConfigDict
class Config(BaseModel):
    model_config = ConfigDict(frozen=False)
    x: int
   ```

## Dead Ends

- **** — There is no override; frozen is enforced via pydantic-core in Rust. (70% fail)
- **** — Bypasses validation and hash consistency, breaking dict/set usage of the model. (60% fail)
- **** — model_config is class-level; mutating it affects all instances and is not thread-safe. (45% fail)
