Context Compaction: The Silent Killer

The most common way AI agents die — and how to prevent it.

When an AI agent's context window fills up, it must compact (summarize) its history to continue. This process frequently crashes or hangs, silently killing your agent.

How amux prevents this

The watchdog monitors context usage and proactively triggers compaction before the window fills. A 5-minute cooldown prevents compaction loops. If compaction crashes, the session restarts with the last message replayed.

Get started with amux

Run dozens of Claude Code agents in parallel. Python 3 + tmux. Open source.

git clone https://github.com/mixpeek/amux && cd amux && ./install.sh
amux register myproject --dir ~/Dev/myproject --yolo
amux start myproject
amux serve  # → https://localhost:8822
View on GitHub