# fix\(server\): a handoff too large for the context window no longer wedges the thread · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/f2e6515b61d4f5f17dca6337c45cee1c2f9d696e)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: f2e6515b61d4f5f17dca6337c45cee1c2f9d696e

Requested commit: f2e6515b61d4f5f17dca6337c45cee1c2f9d696e

Commit: f2e6515b61d4f5f17dca6337c45cee1c2f9d696e

Tree: 6cba8d62242915beb3ab02430fdc2a89b0ba1bc0

Author: Alb11747

Committer: Alb11747

## Message

```
fix(server): a handoff too large for the context window no longer wedges the thread

When a context handoff could not fit the target's context budget, turn start
failed with "Insufficient context allowance" on every turn, so the thread was
unusable until the user compacted it manually.

An oversized handoff is now marked deferred and the turn proceeds without it.
Later turns on the same provider thread retry it until it fits, and the flag
clears once it is sent. The flag is an additive optional field, so no
migration is needed.

Fixes #16147

Co-Authored-By: GPT-6.1-Sol at high effort <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1-Sol at high effort, implementation subagent for handoff deferral <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol at xhigh effort, review subagent for PR 19414 maintenance rebase <noreply@openai.com>

```

## Parents

- [89424d9fa01c6bd24664315c7ccda8d6cb1eab61](https://git.cafe/pingdotgg/t3code/commit/89424d9fa01c6bd24664315c7ccda8d6cb1eab61?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/f2e6515b61d4f5f17dca6337c45cee1c2f9d696e?format=markdown)
