native-ui: render a per-subagent status line row #237

Closed
opened 2026-08-06 20:20:25 +00:00 by coilyco-ops · 1 comment
Member

Step 5 of the native UI build order.

Claude Code supports subagentStatusLine.command, which renders one row per subagent in the agent panel and receives that row's context as JSON on stdin. Today only the session-level statusLine is wired.

Scope

  • Add a --subagent mode to the existing agent-compose statusline command that reads row context from stdin.
  • Render the role mark and color per row, reusing internal/statusline.
  • Emit the subagentStatusLine key from native-ui once the mode exists.

Notes

This is pull-based like the session status line, so it needs no host mutation beyond the settings key, and it survives --safe-mode.

Worth checking against the fixed eight _FOR_SUBAGENTS_ONLY color tokens. A role already claims the nearest slot in its theme, and two roles can share one, so the row text should carry the identity rather than relying on the slot color alone.

Done when

An agent panel shows the role mark and color per subagent row, driven by the composed identity.

Step 5 of the [native UI build order](docs/claude-native-ui-plan.md). Claude Code supports `subagentStatusLine.command`, which renders one row per subagent in the agent panel and receives that row's context as JSON on stdin. Today only the session-level `statusLine` is wired. ## Scope * Add a `--subagent` mode to the existing `agent-compose statusline` command that reads row context from stdin. * Render the role mark and color per row, reusing `internal/statusline`. * Emit the `subagentStatusLine` key from `native-ui` once the mode exists. ## Notes This is pull-based like the session status line, so it needs no host mutation beyond the settings key, and it survives `--safe-mode`. Worth checking against the fixed eight `_FOR_SUBAGENTS_ONLY` color tokens. A role already claims the nearest slot in its theme, and two roles can share one, so the row text should carry the identity rather than relying on the slot color alone. ## Done when An agent panel shows the role mark and color per subagent row, driven by the composed identity.
Author
Member

Landed on main as 0a7683f.

The contract is not what this issue assumed

This issue says the command "renders one row per subagent in the agent panel and receives that row's context as JSON on stdin." Read from the 2.1.221 binary, it is the other way around on both halves.

Input. The command runs once per tick with every live row, as a single object on stdin:

{"columns": 72, "tasks": [{"id": "…", "name": "…", "type": "…", "status": "…",
  "description": "…", "label": "…", "startTime": , "model": "…", "effort": "…",
  "contextWindowSize": , "tokenCount": , "tokenSamples": [], "cwd": "…"}]}

type is one of local_agent, local_bash, local_workflow, remote_agent, in_process_teammate. label is already resolved by the harness per type. tokenSamples is capped at 16.

Output. Not text. One JSON object per line, validated strictly as {id: string, content: string}. A line that is not JSON, or that fails the shape, is logged and dropped. Rows the command does not name simply get no decoration.

Timing. 5000 ms timeout. First tick at 300 ms, then every 5000 ms. Skipped entirely when workspace trust is not accepted.

What ships

  • statusline --subagent reads the tick and emits the JSONL rows.
  • Each row resolves the projection at its own cwd, not the session's, so an agent working in another checkout reports that checkout's identity. Resolution is cached per directory, which matters at 16 rows a tick.
  • A row with no projection is omitted rather than decorated with a guess. An unreadable manifest warns for that row alone.
  • native-ui emits subagentStatusLine for every role, so a composed Claude launch wires this through the --settings path from #236 with no host mutation.

Row text:

🧭 📐 ⛏️ Angie · engineer@claude

Identity is text, per the note on this issue about the eight shared color slots.

Verified and not

Confirmed against a live projection: a tick naming this session's directory returns the engineer row with the melded colors, and a second row under /tmp is correctly omitted.

Not confirmed: that Ink honors ANSI inside content when it paints the panel. The session status line already carries ANSI the same way, so the risk is low, but it is inference. Checking it needs a session with live subagents, which means driving a real turn.

Landed on `main` as 0a7683f. ## The contract is not what this issue assumed This issue says the command "renders one row per subagent in the agent panel and receives that row's context as JSON on stdin." Read from the 2.1.221 binary, it is the other way around on both halves. **Input.** The command runs **once per tick with every live row**, as a single object on stdin: ```json {"columns": 72, "tasks": [{"id": "…", "name": "…", "type": "…", "status": "…", "description": "…", "label": "…", "startTime": …, "model": "…", "effort": "…", "contextWindowSize": …, "tokenCount": …, "tokenSamples": [], "cwd": "…"}]} ``` `type` is one of `local_agent`, `local_bash`, `local_workflow`, `remote_agent`, `in_process_teammate`. `label` is already resolved by the harness per type. `tokenSamples` is capped at 16. **Output.** Not text. One JSON object per line, validated strictly as `{id: string, content: string}`. A line that is not JSON, or that fails the shape, is logged and dropped. Rows the command does not name simply get no decoration. **Timing.** 5000 ms timeout. First tick at 300 ms, then every 5000 ms. Skipped entirely when workspace trust is not accepted. ## What ships * `statusline --subagent` reads the tick and emits the JSONL rows. * Each row resolves the projection at **its own `cwd`**, not the session's, so an agent working in another checkout reports that checkout's identity. Resolution is cached per directory, which matters at 16 rows a tick. * A row with no projection is omitted rather than decorated with a guess. An unreadable manifest warns for that row alone. * `native-ui` emits `subagentStatusLine` for every role, so a composed Claude launch wires this through the `--settings` path from #236 with no host mutation. Row text: ``` 🧭 📐 ⛏️ Angie · engineer@claude ``` Identity is text, per the note on this issue about the eight shared color slots. ## Verified and not Confirmed against a live projection: a tick naming this session's directory returns the engineer row with the melded colors, and a second row under `/tmp` is correctly omitted. **Not** confirmed: that Ink honors ANSI inside `content` when it paints the panel. The session status line already carries ANSI the same way, so the risk is low, but it is inference. Checking it needs a session with live subagents, which means driving a real turn.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agent-compose#237
No description provided.