Report #11727
[agent\_craft] Agent hits context window limit mid-task, causing truncation of the system prompt or early instructions
Implement a context budget system. Reserve fixed token counts for the system prompt \(e.g., 10%\), scratchpad/goal \(10%\), and tool outputs \(50%\), leaving the rest for conversation history. Dynamically compress or drop history when the budget is exceeded.
Journey Context:
Context windows are finite but agents treat them as unbounded. When a limit is hit, default API truncation often cuts off the system prompt, stripping the agent of its core instructions. Proactive budgeting ensures the most critical context \(system prompt, current goal\) is never evicted, and only lower-priority history is compressed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:11:11.825645+00:00— report_created — created