Active tools, background work and stopped sessions
The shared TUI, web and desktop source separates native execution waits from
questions, permission requests, provider errors and a ready input prompt. It uses
the existing Session.lifecycleState, lifecycleActivity and native goal
observations; there is no second session state machine or model-based classifier.
| Display | Evidence | Meaning |
|---|---|---|
⚙️ RUNNING TOOL · Bash |
The latest observed root Claude/Codex phase is PreToolUse |
The agent is working through a tool call. A pre-call hook can precede permission checks; it does not prove that an OS process has started or that the agent is waiting for external work. |
⏳ WAITING FOR BACKGROUND WORK |
Antigravity Stop with fullyIdle: false, without an error stop |
The native CLI reports remaining work. Its process and child identity are not reported. |
WORKING · LAST TOOL FAILED · Bash |
Root PostToolUseFailure |
One call failed, but the turn is still working and can recover. |
⚠️ CLI RUNNING · TURN FAILED |
Native failed lifecycle while the CLI process remains running | The provider ended the turn with an error, but its terminal remains available. This does not mean that the process exited. A subsequent native working/completed event clears the failed-turn status. Existing model-capacity recovery can supply a more specific status. |
⛔ STOPPED · GOAL BLOCKED |
A fresh blocked native goal for this exact account, conversation and process generation, at a stopped prompt | The CLI explicitly reports that its goal is blocked. It does not override new work, questions or permission requests. |
💬 QUESTION · NEEDS YOUR ANSWER |
Explicit native user-input tool | A user response is required. |
✋ NEEDS APPROVAL |
Native permission request | A permission decision is required. |
💬 READY / NEEDS INPUT |
Ordinary completed native turn | The prompt is ready. This alone does not prove a problem or successful task completion. |
Active tools keep the working gear icon. Explicit background waits use cyan; questions and permissions use yellow; provider errors use red. These are fixed status labels, not an endless progress animation. The same renderer and classifier are used by TUI, web and Tauri source.
Freshness and limitations
A post-call event clears the displayed pre-call phase. This is the latest native hook phase, not a scheduler or an inventory of every parallel invocation: another call's result can restore the generic working label while an earlier call is still outstanding. A background agent launch that has already returned is not treated as an outstanding tool call. Merely seeing an active subagent, Docker process, listening service, CPU usage or a quiet terminal never establishes that the parent is waiting for it. Tool names are shown, but arguments, command lines, output, exception text and credentials are discarded.
Native pre-call hooks do not expose the full process tree. After five minutes
without another native wait event, a still-observed lifecycle becomes
RUNNING · WAIT NOT RECONFIRMED, with a question mark. If host/lifecycle proof
itself becomes stale, the existing unknown-activity status takes precedence.
Neither case is declared blocked, idle or actively executing a known process.
The execution host may refresh collector availability independently; that does
not reset this native wait-event age.
A plain assistant sentence such as “I am blocked” cannot create a confirmed blocked status. If the CLI exposes neither a native error, question/permission nor a current blocked goal, devctrl retains its ordinary ready/unknown status. There are no new notifications or attention categories for active tool calls.
Existing managed Claude/Codex hook files are refreshed atomically by the host
observer without sending input or restarting the CLI. The next actual native
event supplies the new activity. Older tool:<name> observations remain
compatible but do not retroactively establish a wait. External package reporters
receive this change during their normal integration preparation/update; sessions
still using an older Antigravity reporter retain their previous generic working
status until that reporter is updated. The CLI reads the script on each hook;
no task is injected to force a new event.
API and MCP
Existing session inventory carries the same fields, so authorized MCP/operator
clients can inspect the phase without another endpoint. New bounded activities
are awaiting-tool[:<name>], tool-failed[:<name>], turn-failed, and
background-work; tool[:<name>] continues to mean a completed call.
The legacy awaiting-tool activity maps to running_tool in the pure
sessionExecutionObservation client helper, which checks source, freshness and goal
identity before interpreting them. Public lifecycle states and authorization
semantics do not change.
Official event contracts:
- Claude hooks: pre-call, post-call, recoverable tool failures and failed turns.
- Codex hooks: root tool-call boundaries and native call identifiers.
- Antigravity hooks: stop state and remaining background work.