Debugging When You Have 20 AI Agents

More agents means more things that can go wrong. Here's how to stay on top of it.

The New Debugging Problem

Solo coding: one process, one context, all in your head. Agent fleet: 20 processes, 20 contexts, one dashboard. The debugging challenge isn't technical complexity — it's information management. How do you know which of your 20 agents is stuck, looping, or going in the wrong direction?

Signals That an Agent Is in Trouble

The Peek-Then-Steer Workflow

amux's live peek feature lets you see any agent's terminal in real time from the dashboard. The debugging workflow:

  1. Notice a suspicious agent (no progress, high token spend)
  2. Peek at its session from the dashboard
  3. Diagnose: stuck prompt? wrong direction? compilation error loop?
  4. Send a correction message via the dashboard: "Stop. The file is at path/to/file.ts, not path/to/file.js."
  5. Watch the agent recover and continue

Common Failure Modes and Fixes

Failure modeDiagnosisFix
Compilation error loopSame error in peek output, repeated attemptsSend the correct import path or dependency name
Wrong file modifiedGit diff shows unexpected changesReset branch, re-specify file paths explicitly
Context exhaustedamux auto-compact triggeredSelf-healed automatically; check output quality after
Task too ambiguousAgent asking many clarifying questionsSend a more specific task description via dashboard
Dependency not availablePackage not found errorsRun the install command, or tell agent to add to package.json first

The 5-Agent Monitoring Rule

In practice, actively monitoring more than 5 agents simultaneously is difficult. With 20 agents, the approach is triage: spend the first 10 minutes of each check reviewing all sessions quickly (peek for 30 seconds each), flag the 2-3 that need attention, and intervene only on those. The other 17 run fine on their own.

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