Working with agents

Activity states

Running, needs input, idle: the four layers of evidence that decide which one a pane is in.

Four independent layers contribute to a pane’s state, and the strongest one available decides it.

The layers

  1. Hooks (Layer A). Agents with native hooks call sirioctl notify --status … themselves. This is authoritative when present, and it suppresses the title layer for a short debounce window afterwards.
  2. Terminal title (Layer B). Every CLI has its own title convention. Claude idles as ✳ … and works as . … or a braille spinner; Pi titles π - <cwd>; Oh-My-Pi titles π: <cwd>. Sirio reads identity and status from these.
  3. Screen content (Layer C). When output settles, the visible scrollback is matched for prompts and permission requests.
  4. Foreground process (Layer D). Sirio inspects the pane shell’s child processes and matches them against the agent catalogue. This is the only layer that sees agents with no usable title.

The states

State Meaning
Running The agent is producing output or executing a tool
Needs input A question, a permission prompt, or an idle prompt after work
Done The agent’s process exited with status 0
Error The agent’s process exited with a failure
Idle Nothing is happening

Who may clear a state

Sirio clears a hook-set state when the process exits, a title-read state only when the title stops matching, and a process-found state only when the process is gone. The layers do not overwrite each other’s evidence.