Repository navigation
fix: distinguish live subagent activity from recorded status - #207583
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesThis PR adds activity details to Example: Run
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR merits keeping: it makes individual worker inspection distinguish recorded status from observed activity, follows the existing status architecture, and introduces no definite correctness or security defect. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe chat command selects a worker from the current session’s prepared subagent snapshot and formats its recorded metadata and existing execution observation into a reply. flowchart LR
A[Chat command] --> B[Authorized subagent command]
B --> C[Controlled run snapshot]
D[Execution observation owner] --> C
C --> E[Info formatter]
E --> F[Chat reply]
Technical reviewBest possible solution: Keep the existing observation owner and shared formatter, and expose their prepared result in individual worker inspection as this PR does. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows that the info reply omits available execution observations; the author reports matching pre-fix failures, but this review ran no target code. Is this the best way to solve the issue? The patch is a small, complete presentation fix that reuses existing observations and sanitization without introducing another state owner or changing execution behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3740d8762a4f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +15, Tests +21, Docs +2. Total +38 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 28, 2026, 10:35 AM ET / 15:35 UTC. |
|
Merged via squash.
|
(cherry picked from commit 8ecf38e) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
A worker can have a recorded status of running while it waits for approval or the Gateway can no longer observe it. The compact status view shows at most three workers. Looking up one by ID could still say only “running.”
User Impact
Use
/subagents info <runId>to check a particular worker. When the activity observation adds information, the reply labels the two lines separately, as in this reply.If the Gateway cannot see an unfinished worker, it says “current activity unavailable.” Check the original worker before repeating its task. A finished worker keeps its existing status and outcome.
Why This Change Was Made
The command reuses the snapshot and tool-name formatter behind
/status. It makes no new requests, changes no stored status and grants no access to other sessions.Evidence
The new expectations failed in three cases against the original implementation. With the fix, all 19 cases passed. They cover a pending approval, the selected Agent's own child and an older worker selected by ID. A killed worker has no activity line. The approval case supplies the existing observation to the command.
I ran
pnpm test src/auto-reply/reply/commands-subagents.test.ts --maxWorkers=1on an isolated checkout with cached dependencies. The passing run took 103.77 seconds including startup. The four changed paths matched the branch base at239a05ed. Formatting, type-aware lint, type checking for the changed files andgit diff --checkpassed. I didn't exercise an installed Gateway with the new command.