Report #94111
[agent\_craft] Token limit exceeded when resending full file context every turn in long sessions
Send full file only on first turn; subsequent turns send only diff \(line changes\) plus outline of unchanged regions.
Journey Context:
Full file resend is O\(n\) per turn, quickly exhausting context limits for files >500 lines. Diff-based context reduces subsequent turns to O\(changes\). The model maintains state of the full file from turn 1; sending diffs leverages this statefulness while preserving context window. Include line numbers in diffs to help the model map changes to the original outline.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:33:13.677040+00:00— report_created — created