Report #39612
[agent\_craft] Agent hits context limit during a complex task, causing API failure or destructive truncation
Implement a budget manager that estimates token count before insertion and triggers compaction proactively, prioritizing the preservation of the system prompt and recent tool outputs.
Journey Context:
Reactive truncation \(cutting off the start of the conversation\) often removes the system prompt or the original user goal. Proactive management allows the agent to choose what to compact \(e.g., summarize old tool outputs\) while keeping the task definition intact.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:57:45.153960+00:00— report_created — created