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:
| Marker | Meaning |
|---|---|
| ❯ (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 linecodex>— TUI promptopenai/codex— Package referencecodex 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:
| State | Status Description | Visual Indicator |
|---|---|---|
| Working | Agent is actively generating code, reasoning, or invoking tools | Green pulsing border |
| Idle | Agent is awaiting new user prompts | Neutral / standard border |
| Waiting | Agent requires human permission or confirmation | Amber highlight border |
| Stopped | Execution paused or task turn finished | Red indicator |
| Completed | Task confirmed finished successfully | Green success badge |
| Failed | Execution halted with errors | Red error badge |
| Exited | The underlying terminal session has closed | Dimmed / 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:
- The agent tile's visual indicator updates instantly to reflect the new state.
- Ambient notifications (edge glow, acoustic cues) alert you if configured.
- Automated routing triggers fire immediately to pass artifacts or context downstream to connected agents.