Why Claude Code Sessions Crash

And how amux fixes each one automatically.

Context compaction failures

When Claude Code's context window fills up, it attempts to compact. This can hang or crash. amux proactively triggers /compact before the window fills, with a 5-minute cooldown to prevent loops.

Thinking-block corruption

A known failure where Claude Code produces corrupted thinking blocks. amux detects the error message, restarts the session, and replays the last user message.

Stuck prompts

Tool-approval prompts block the session waiting for human input. In YOLO mode, amux auto-responds to these (detected via the "Esc to cancel" marker).

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