Report #94411
[frontier] Long-running agent workflows crash mid-execution when context window overflows, truncating critical system instructions
Implement pre-flight token budgeting: before each LLM call, calculate exact token count \(tiktoken\) for system prompt \+ chat history \+ planned tool outputs \+ completion reserve; if forecast > limit, trigger summarization or history compression before the call
Journey Context:
Reactive truncation loses system prompts mid-task; predictive budgeting guarantees atomic task completion by enforcing constraints upfront, enabling reliable long-horizon agents that never hit context limits unexpectedly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:03:18.859367+00:00— report_created — created