It's relatively common in my tests for models to run tools that produce more output than fits in the context. Other harnesses (e.g. codex) implement tool output truncation. We should do something similar. Right now, using too much of the context causes a crash.
Other strategies we could consider:
- Excessive context errors could be subject to retry.
- Tool output could be spilled to a temporary file when it grows large enough.
It's relatively common in my tests for models to run tools that produce more output than fits in the context. Other harnesses (e.g. codex) implement tool output truncation. We should do something similar. Right now, using too much of the context causes a crash.
Other strategies we could consider: