Expand description
Pushed per-agent progress: the agent’s current todo checklist and the
tool it is running right now, published as an agent:progress MuxEvent so
the Swarm pane can list them under the agent’s name.
Sibling of super::activity_watcher, and deliberately a separate loop:
that one spends a Haiku call per agent to write an English one-liner and is
throttled accordingly. This one only reads NEW bytes of a block’s output
file and parses JSON, so it costs nothing per tick and can run far more
often — which is the point, since a checklist that lags 20s behind the agent
is worse than no checklist.
Why the backend and not the frontend: agent-document-store already holds
every tool call, but only for panes that are currently MOUNTED. The Swarm
pane’s whole value is seeing agents you are not looking at, so the data has
to come from the same place the shell/cron/summary rows come from.
Why state is carried across ticks (reagent P1 on PR #2952): the
checklist cannot be rebuilt from a fixed tail window. TodoWrite-style
calls are immune — one call carries the whole list — but the vocabulary
AgentMux actually ships against (TaskCreate/TaskUpdate) describes ONE
item per call, so reconstructing the list needs every still-open task’s
original TaskCreate to be inside the window. A verbose Bash or a large
Read pushes those out within seconds, and the task would then vanish from
the checklist while still open, silently. So each block keeps an accumulated
[BlockState] and each tick only consumes the bytes appended since the last
one.
Modules§
- codex_
plan - Codex’s plan as an agent’s checklist, for the progress watcher (SPEC_WARDEN_KANBAN_2026_10_20.md §6.12).
Structs§
- Agent
Progress - What we currently believe about one agent.
- Recent
File - One file an agent changed, as its tool call named it.
- Todo
Item - One checklist entry as the Swarm renders it.
- Watched
Work - What the watcher currently knows about one block, for readers outside the sweep loop.
Constants§
- EVENT_
AGENT_ PROGRESS - MAX_
RECENT_ FILES - Most recent files kept per block, distinct paths, newest first.
Functions§
- run_
agent_ progress_ loop - Run the progress sweep loop. Never returns.
- watched_
work - Read access to the watcher’s state for one block: its checklist, current
tool and recent files.
Noneuntil the watcher has swept it once.