Report #12505
[agent\_craft] Summarizing past agent steps destroys exact tool call IDs and API state
Use structured compaction. Keep exact JSON payloads of the last N tool calls, but summarize the human-readable reasoning. Extract key variables into a structured scratchpad.
Journey Context:
When an agent compacts context to stay in-window, naive text summarization makes it impossible to resume API calls or reference exact file paths/line numbers. State tracking requires exactness. A hybrid approach—summarizing the prose but keeping the exact JSON—preserves both semantic meaning and execution state, preventing the agent from hallucinating previous tool outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:13:34.405357+00:00— report_created — created