Claude Code bug re-injects all 609 tasks after compaction, re-compacting sessions every ~11 min
otalrapha · ghdev · 2026-10-19
A developer filed claude-code issue #103442: on v2.1.299 (WSL2), after each auto-compaction the system reminder re-injects the entire task list with no cap on items or bytes, keeping context near the window limit and triggering repeated re-compaction.
Measured from the session transcript (rendered sizes):
- 14 compactboundary records in 2h45m, median interval 10.7 min (min 6.1, max 32.3)
- 815 KB re-injected after the last boundary; the largest chunk is the "task tools haven't been used recently" reminder at 435,623 B
- It lists all 609 tasks (578 completed, 31 pending) with full subjects — 97% of its size is task subjects, longest 10,147 chars, 99 subjects over 1,000 chars — firing every 1–3 minutes
- Other re-injected parts: CLAUDE.md + imports 128.9 KB, 5 skill bodies 98.9 KB, agent listing 65 KB, and a nested CLAUDE.md duplicating parent imports 50.6 KB
Suggested fixes: list only pending/inprogress tasks with count/byte caps and 120-char subject truncation, give post-compaction re-injection a window-fraction budget with warnings when 3+ compactions happen within 30 min, and deduplicate nested CLAUDE.md imports. The author notes token figures are bytes/4 estimates from a single session and the actual API payload wasn't verified.
More from coding & agent
- Neon ships official AI Gateway adapter for TanStack AI with single-credential multi-model access — matei_zaharia · 2026-10-23
- Reflection AI's Beam agent auto-builds a Gemma-4 fine-tuning notebook, boosting accuracy 66.5% — danielhanchen · 2026-10-23
- Cua Spaces SDK lets Hermes and other agents run in sandboxes on your own hardware — Teknium · 2026-10-23
- PHP hit by two unauthenticated RCE flaws; ProjectDiscovery launches free internet-wide alert service — cyb3rops · 2026-10-23
- Modal open-sources Spindle, a Tinker-compatible training server that charges GPU time instead of tokens — josh_wills · 2026-10-23
- Testing the Azure Cosmos DB Agent Kit: what it found reviewing a Claude-built app, in RUs saved — adnan_hashmi · 2026-10-23