Hmbown / Hmbown/Codewhale

Fleet/agents: first-class sub-agent and workflow management in the TUI (agents bottom view: live list, per-agent status/elapsed/tokens, focus, message, stop, history over time)

Open
#5,479 2 comments 0 reactions 0 assignees View on GitHub
v0.9.12
Dominant language
Rust
Stars
41k
Forks
3.6k
Avg merge
13h 59m
Merged PRs (30d)
299

Description

## Combined Core execution: C01

[Core execution plan]() owns order and scope. This issue owns C01's current status, path claims, blockers and evidence. Other linked implementation issues retain their own delivery history.

**Issue mapping:** [SHA-6236 / GitHub #5479]()
owns the retained agent/workflow register, status/elapsed/usage, focus, message,
stop and history requirements. Credit the current repair; qualify the remaining
controls and runtime-backed history through C09 rather than create a second
roster authority.

**Owner: Root integration. Dependencies: C00 and resumed GUI authorization.**
The `b6fad79373` build/install is complete; retain the linked binary identities. Preserve the
user's running sessions and the required separately matched Desktop runtime.
Verify that the Agents register retains completed/parked workers beyond the
compact cache's 45-second expiry, including while another worker runs, without
duplicate IDs or cross-conversation rows. Verify fresh state wins, waiting for
permission/input remains distinct from parked, and checkpoint continuation
preserves intended profile/model, ownership and idempotence.

The same-session 14:21 and 14:22:57 screenshots showed three workers, a
successor, then “no agents have run this session.” Persisted records retained
four workers. Source inspection found the register consuming the expiring
compact cache despite a retained roster. The fix is now committed, locally tested and installed; the screenshot's exact transition and duplicate live
execution were not proven. Retained fallback indentation still needs a
truthful disposition in the final presentation check.

**Completion evidence required:** build/install hashes plus bounded final-package acceptance
after GUI permission resumes; correct history and checkpoint/successor behavior
with no fabricated lifecycle state. See roster diagnosis (retained Ops evidence: `../agent-roster-20260909/REPORT.md`)
for source evidence, whose earlier “not applied” status is superseded above.

---

## Original issue and contributor history

## Ask (owner, 2026-08-17)

Bring Codewhale's sub-agent / workflow management up to the level a modern agent harness has natively: a persistent, glanceable **agents rail** in the TUI that shows *every* agent that ran during the session over time — not just the currently running one — with what each is doing, how long it has been going, tokens used, and direct controls.

Reference behavior (what the owner is comparing against): a footer/status strip line per agent — `○ 3m 29s · ↓ 96.3k tokens` — with the parent listed first (`● main`), workflows shown as one row with `5/6 agents done`, and keys to jump into an agent (`←`) or manage it (`↓`).

## What exists

* `agent` tool (12-field schema, [#5458]()), Fleet roster / worker records, `/jobs`, the Work bar rail (`work_bar_subagents_pty` tests), `⌥V` output view, `task_status`, sub-agent transcripts stored as handles, `/goal` `/workflow` `/auto` orchestration (#5439 says they are shipped but buried).

## Spec (proposed; break into slices)

1. **Agents rail** (always available, collapsible): one row per agent spawned this session, newest last, retained after completion (until session end or explicit clear). Row = status glyph (running / waiting / done / failed / cancelled), name or type, the agent's current step or last tool in one line, elapsed, tokens (↓ input/↑ output), cost if priced. Workflows/fleets aggregate to one row with `n/m done` and expand.
2. **Keys**: jump to an agent's transcript (`←`), manage (`↓` → message / interrupt / cancel / open details / copy id), back to main. Discoverable in `/help` and the fn+F1 keys overlay.
3. **Truth**: every number comes from runtime receipts (worker records / usage events), never estimated; a finished agent keeps its final numbers.
4. **Time**: rows show wall time and, when finished, duration; the rail keeps history so "multiple sub agents over a period of time" is visible, not just the live one.
5. **/agents** command lists the same data in the transcript for headless/exec parity; `exec` stream-json gains an `agent_summary` event.
6. Docs: docs/SUBAGENTS.md gets the rail; #5439's discoverability points here.

Out of scope for the first slice: new orchestration semantics, remote/cloud agents, redesigning the Work bar.

No-Issue linkage: this *is* the issue. Refs #5439, #5442, #5123, #5324.

Contributor guide

Open the contributing guide

Research direction

Start with the retained-roster diagnosis in ../agent-roster-20260909/REPORT.md and the existing work_bar_subagents_pty tests; confirm how the Agents register and compact cache represent completed workers. Then trace the /agents entry point and exec stream-json behavior, with docs/SUBAGENTS.md covering the documentation slice. Done means runtime-backed history and controls preserve distinct states and identities, with bounded acceptance evidence after GUI permission resumes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.