# GoalStateSizeError

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/goal_state_limits/GoalStateSizeError)

Goal/rubric text exceeds a model-visible context budget.

## Signature

```python
GoalStateSizeError(
    self,
    label: GoalStateSizeLabel,
    actual: int,
    limit: int,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `label` | `GoalStateSizeLabel` | Yes | Name of the oversized value, as the user and model see it. |
| `actual` | `int` | Yes | Actual character count. |
| `limit` | `int` | Yes | Maximum accepted character count. |

## Extends

- `ValueError`

## Constructors

```python
__init__(
    self,
    label: GoalStateSizeLabel,
    actual: int,
    limit: int,
) -> None
```

| Name | Type |
|------|------|
| `label` | `GoalStateSizeLabel` |
| `actual` | `int` |
| `limit` | `int` |


## Properties

- `label`
- `actual`
- `limit`
- `excess`

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/goal_state_limits.py#L90)