MadoHub Docs

Agent Detection

How MadoHub identifies which AI agent is running and tracks its state.

MadoHub monitors terminal output in real-time to detect which AI agent is running and what state it's in. This powers the visual indicators on tile title bars and triggers routing connections.

Supported agents

Claude Code

Detected by Unicode markers in terminal output:

MarkerMeaning
❯ (U+2770)Claude Code prompt
✽ (U+273D)Thinking/spinner
⏺ (U+23FA)Tool use indicator

Also matches the literal string "Claude Code" in output.

OpenAI Codex CLI

Detected by common CLI signatures:

  • OpenAI Codex — Branding line
  • codex> — TUI prompt
  • openai/codex — Package reference
  • codex v[0-9] — Version string
  • > _ OpenAI Codex — Startup banner
  • High/fast model execution flags

Amp and OpenCode

Amp and OpenCode sessions are automatically identified through native workspace process inspection, enabling continuous state tracking across your CLI toolchain.

Generic shell

If no agent markers are detected, the terminal runs as a high-performance standard shell session.

Agent states

MadoHub continuously tracks agent lifecycles across seven distinct operational states:

StateStatus DescriptionVisual Indicator
WorkingAgent is actively generating code, reasoning, or invoking toolsGreen pulsing border
IdleAgent is awaiting new user promptsNeutral / standard border
WaitingAgent requires human permission or confirmationAmber highlight border
StoppedExecution paused or task turn finishedRed indicator
CompletedTask confirmed finished successfullyGreen success badge
FailedExecution halted with errorsRed error badge
ExitedThe underlying terminal session has closedDimmed / neutral

MadoHub combines real-time terminal stream parsing with structured transcript verification to ensure transitions between active, waiting, and completed states are instantaneous and reliable.

Intelligent Completion Detection

AI coding agents use diverse and evolving output conventions to indicate task completion. Rather than relying on rigid keyword lists, MadoHub incorporates an adaptive pattern-recognition engine that identifies turn completion milestones across agent versions.

When a task completion is verified:

  1. The agent tile's visual indicator updates instantly to reflect the new state.
  2. Ambient notifications (edge glow, acoustic cues) alert you if configured.
  3. Automated routing triggers fire immediately to pass artifacts or context downstream to connected agents.

On this page