A transit research agent receives long trip-planner tool dumps that risk overflowing the next Claude turn. What should the agent pattern do before continuing?
Select an answer to reveal the explanation.
Short Explanation
A trip-planner dump can be a suitcase exploding on the luggage belt. Compaction is zipping it down to the itinerary that still matters before Claude's next turn.
Full Explanation
Compact or summarize long tool dumps before the next Claude turn so a transit research agent does not overflow context with trip-planner output. Context-window management treats oversized tool results as luggage that must be zipped down to the itinerary facts still needed—arrival times, transfers, alerts—before continuing. Compaction preserves signal, frees budget for reasoning, and prevents prior dump noise from dominating the next turn. Delegating dump parsing to a subagent while retaining dumps in parent context fails by concept: the parent still carries the full verbose payload, so context overflows anyway and the extra handoff adds latency without reducing token pressure. Persisting tool dumps to long-term memory for reuse across sessions fails by concept: it stores bulky raw output for later turns instead of shrinking it now, so the next Claude turn still overflows and stored dumps go stale. Raising the per-turn token budget to accommodate verbose tool dumps fails by concept: it avoids the real problem rather than solving it, burns budget on noise, and still risks overflow once the larger budget is exhausted.
Exam caveat: compaction must not drop safety-critical constraints (accessibility needs, service alerts). Prefer structured summarization keyed to the rider question over lossy deletion. Compaction is not a substitute for fixing tools that return excessively verbose payloads.
Operational check: insert a compaction step after trip-planner tools, measure tokens before/after, validate summaries retain fields required for the answer, monitor truncated-context errors, and tune summarizers on real planner payloads.