Checkpoint-clear-resume: managing 4 long-lived Claude Code agent seats without compaction
Motiv31 · reddit · 2026-10-12
The author open-sources aigent-OS (MIT), an alternative to context compaction on Claude Code: at a context threshold, the agent writes and confirms a checkpoint, then exactly one /clear is issued, a fresh session is verified via a SessionStart hook, and one resume prompt is sent. Key lessons: one ack authorizes one clear (halt on ambiguity rather than retry — a double clear is unrecoverable), identity comes from the live hook not disk files, the runner owns the PTY with queued keystrokes, and all loaded memory text is tagged with source/hash/time and no authority. Running four daily seats powering a 9k-subscriber newsletter, the reference seat achieved 11/11 clean cycles with zero duplicate clears; a sped-up test failed (the model wrote multiple "done" lines in one session), so the claim stays at 11. Known issues include stalls at the clear step. Code and write-up on GitHub; he's soliciting pushback on halting vs bounded retry for unattended agents.
More from coding & agent
- "Why learn Rust when you can write C++ and ask Claude for bugs?" dev joke sparks debate — wordgrammer · 2026-10-12
- 10 open-source GitHub repos to cut your AI agent's token bill — victor_explore · 2026-10-12
- Personal software will be huge — and tastemakers will be the new value — alexmacgregor__ · 2026-10-12
- Gauntlet Loop: The Prompting Method Behind Claude's 55k-Line Call of Duty Build — majidmanzarpour · 2026-10-12
- User reports two Codex resets and one Claude usage reset this month — rudrank · 2026-10-12
- "A full day's work two years ago": AI agent ships production-grade upload flow unprompted — tristanbob · 2026-10-12