# tinker_cookbook.rl.InitialObservationOverflow

## _class_ [**tinker_cookbook.rl.InitialObservationOverflow**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L89)()

Sentinel returned by `Env.initial_observation` instead of an
`(observation, stop_condition)` pair when the initial prompt already
exceeds the environment's token budget.

The rollout loop (`do_single_rollout`) converts this into an immediate
graceful stop: a trajectory with a single synthetic transition (empty
observation, empty action, `episode_done=True`) carrying `reward`,
`metrics`, and `logs`, with `Trajectory.stop_reason` mirrored from
the `stop/<reason>` metric (`StopReason.MAX_TOKENS` for prompt
overflow). The synthetic transition contributes no training tokens
([`trajectory_to_data`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/trajectory_to_data/) emits no datum for it) but its reward counts
toward the trajectory's total, so group reward centering sees the
overflowed member.

Returning this sentinel (rather than raising) keeps one oversized prompt
from failing the whole group under the [`FailFast`](https://tinker-docs.thinking-machines.ai/cookbook/api-reference/rl/failfast/) rollout strategy.

**Fields:**

- [**reward**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L116) ( _float_)
- [**metrics**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L117) ( _Metrics_, default: `field(default_factory=dict)`)
- [**logs**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L118) ( _Logs_, default: `field(default_factory=dict)`)

## Referenced by

- [tinker_cookbook.rl.Env.initial_observation](https://tinker-docs.thinking-machines.ai/cookbook/api-reference/rl/env/#env-initial_observation)
