Guides

AI Agents

AI CLI panes, status detection, toasts, and audible alerts.

Kumo auto-detects any AI CLI running inside a pane and lists it in the sidebar under its session, with its CLI name and a live status dot. To drive agents from scripts or from other agents, see Orchestration.

Spawning an agent

leader+a spawns a dedicated AI pane running your configured CLI (ai-cmd, default opencode). Or just run opencode, claude, codex, โ€ฆ inside any shell pane โ€” kumo detects the process automatically.

Status at a glance

Each agent shows a status dot, detected from the live terminal buffer (not just the viewport), so it stays accurate even while you scroll:

  • ๐Ÿ”ต Blue โ€” working (actively producing output)
  • ๐ŸŸ  Orange โ€” blocked, waiting for your approval
  • โšช Gray โ€” idle (quiet, ready)
  • ๐ŸŸข Green โ€” done (finished while you weren't looking; focusing the pane marks it seen โ†’ idle)
  • โ“ Dim โ€” unknown (recognized agent whose classification failed โ€” idle was not proven)

done is set when an agent goes from working to idle while its pane is not focused โ€” the same transition that fires the corner toast. unknown means the daemon saw the agent process but no idle, working or blocked signal matched. Both are valid wait targets: kumo agent wait -p 42 --until done.

When an agent blocks or finishes, kumo raises a transient toast in the corner of every attached viewer (click it to jump to the agent's pane) and plays an audible chime โ€” a distinct sound per event. Blocked agents also float to the top of the agent list with a filled โ—‰ dot and a ยท blocked hint, and their pane glows orange even without focus.

Agent inbox

leader+i moves the keyboard into the agent list. j/k (or the arrows) move between the agents that need attention โ€” blocked ยท done ยท running, in that order, each with its session and tab โ€” and Enter jumps straight to the chosen pane (switching session and tab as needed). Esc or q leaves the inbox.

In the default project sidebar, each agent is listed inline under its worktree; the focused agent is highlighted so you always know where the cursor is. See Sessions, Tabs & Panes for the sidebar layouts.

Notifications

[notifications]
position = "top-right"  # top-left | bottom-right | bottom-left | center | off
sound = true            # audible chime on blocked/finished transitions
blocked = true          # toast when an agent blocks
finished = true         # toast when an agent finishes / goes idle

KUMO_NO_NOTIFY=1 disables toasts and KUMO_NO_SOUND=1 the chime, regardless of the config.

Lifecycle detection

Process detection (name + workspace) works for every agent below; lifecycle detection (working / blocked / idle) is per-agent:

Bundled lifecycle rules

  • opencode โ€” permission dialogs, question prompt, prompt-footer signals
  • claude โ€” approval forms, permission prompts, OSC-title spinner
  • codex ยท gemini ยท qwen ยท aider ยท cody ยท swe ยท coco

When none of an agent's explicit markers match, it reads unknown, never a fabricated idle state. Use kumo agent explain and a user override to tune a CLI version whose terminal chrome has changed.

Custom detection rules (agent-detection/<agent>.toml)

The lifecycle classifiers are data-driven: kumo ships rule manifests for every supported agent above (built into the binary), and reads per-agent overrides from your config dir:

~/.config/kumo/agent-detection/<agent>.toml   # $KUMO_CONFIG_DIR/agent-detection

A file for an agent kumo already knows replaces its bundled rules; a file for any other agent id adds it. Rules load at daemon start and are re-read automatically when the file changes (or explicitly with kumo reload). Invalid files (bad id charset, unknown region, test with more than one matcher) are warned about and skipped โ€” detection never crashes and keeps the bundled defaults.

# ~/.config/kumo/agent-detection/my-agent.toml
[agent]
id = "my-agent"   # [a-z0-9-]+ โ€” must match the filename stem

[[blocked]]
tests = [
  { region = "screen", contains = "do you want to proceed?" },
  { region = "form",   yes-no-line = true },
]

[[working]]
tests = [{ region = "title", spinner = "braille" }]

[[idle]]
tests = [{ region = "screen", contains = "ask anything" }]

A signal is an OR of [[signal]] groups; a group is an AND of its tests. Tests may nest:

  • any-of = [...] โ€” at least one branch matches (branches may be nested groups)
  • not = [...] โ€” succeeds when the AND of the listed entries does not match (used to keep a question dialog from reading as idle)
  • tests = [...] โ€” a nested AND group, inside any-of or not

Each leaf test binds one matcher to one evidence region โ€” screen (buffer tail), form (below the last rule), footer (pinned prompt footer), title (OSC window title):

MatcherMeaning
containsASCII case-insensitive substring
contains-anyfirst matching pattern of the list
prefixtrimmed text starts with (idle OSC title, e.g. โœณ)
spinner"braille" / "half-circle" first glyph of the OSC title
spinner-lineshort line holding a dingbat glyph (working prompt box)
btw-overlaythe /btw reasoning overlay (header + esc to close)
yes-no-linea 1. yes / 2. no option line
braille-inany braille glyph in the region

Adding a new agent: run it in a pane, watch the markers via kumo agent explain <pane>, write the file, then kumo reload until the status is right โ€” exactly how the bundled rules were written.

Agents live in the daemon

Lifecycle detection, status, and audible alerts run server-side, so they are visible in the sidebar of any attached terminal โ€” and kumo agent status (list / ls) surfaces each agent's status and pane id from outside the TUI, so a blocked agent is noticeable even when you are not attached.

Debugging status: kumo agent explain

Detection is heuristic, so kumo can explain on demand why any pane reads the status it does โ€” evaluated live by the running daemon against the pane's terminal buffer:

kumo agent status            # who runs, and where (e.g. pane 42 ยท work:t1:p2)
kumo pane list               # every pane id + s/t/p position (optional -t filter)
kumo agent explain 42        # or by position: s1:t2:p1, work:t2:p1 (with -s: t2:p1)

Both the id and the composite position ([s:]t[:p], 1-based) are accepted โ€” positions are friendly for interactive use, ids stay stable for scripts.

The cpu/mem line covers the agent's whole process tree (children included) with CPU measured over a sliding ~6 s window, so a bursty agent reads a truthful average instead of flat 0%.

The report shows the matched markers for every agent with rules (bundled or your own) and the evidence region where each was found โ€” screen (buffer tail), form (below the last rule โ€” Claude's live prompt), footer (opencode's prompt footer), or title (OSC window title) โ€” the precedence that decided the winner (blocked > working > idle > unknown), and the reason chain behind an idle verdict: explicit idle markers, unseen-finish hold (done until focused), seen-after-focus, dead pane, the not-an-AI-CLI default, or the no-signal fallback (unknown). Raw vs. displayed status differ when the done/seen rule is active, which the report makes explicit.

On this page