Settings

Theme

Show HN: Amux – run Claude Code agents in parallel from your phone

1 points by Beefin 12 days ago · 1 comment · 2 min read


I built amux because I kept waking up to dead Claude Code sessions. Context would fill up at 2am, the agent would crash, and I’d lose hours of work. So I wrote a self-healing multiplexer that wraps Claude Code in tmux sessions and keeps them alive.

The core loop: amux parses ANSI-stripped tmux output to detect state — working, stuck, needs input, context running low. When context drops below 20%, it sends /compact. When the session crashes from a redacted_thinking error, it restarts and replays the last message. When a YOLO session hits a safety prompt, it auto-answers. The watchdog has kept sessions running unattended for 12+ hours.

What made it actually useful was the web dashboard. I can monitor all my agents from my phone (it’s a PWA), send them messages, check the kanban board, and peek at any terminal — all without SSH-ing into my machine.

Last night I had 8 agents working across 3 repos: one writing API endpoints, one on tests, one doing a migration, others on smaller tasks. I checked in twice from my phone, answered two prompts, and woke up to PRs ready for review.

Agents started coordinating on their own The coordination part surprised me the most. Agents share a REST API so they can peek at each other’s output, claim tasks from a shared board (SQLite with atomic CAS), and send messages between sessions. I didn’t plan for agent-to-agent orchestration initially — I just exposed the API in their global memory and they started using it naturally.

It’s a single Python file (~23k lines, inline HTML/CSS/JS), no build step, no external services. Python 3 + tmux. Auto-generates TLS certs so phone access works over Tailscale. The server watches its own mtime and restarts on save, so you can edit it while it’s running.

What it doesn’t do: it doesn’t replace Claude Code or modify it in any way. It’s purely a wrapper — ANSI parsing, no hooks, no patches. It works with whatever Claude Code version you have.

BeefinOP 12 days ago

Repo: https://github.com/mixpeek/amux

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection