Skip to content

fix: distinguish live subagent activity from recorded status - #207583

Merged
freeqaz-openai merged 1 commit into
mainfrom
fix/subagent-info-activity
Nov 28, 2026
Merged

freeqaz-openai merged 1 commit into
mainfrom
fix/subagent-info-activity

Conversation

@freeqaz-openai

Copy link
Copy Markdown
Contributor

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.

Recorded status: running
Activity: waiting for approval

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=1 on an isolated checkout with cached dependencies. The passing run took 103.77 seconds including startup. The four changed paths matched the branch base at 239a05ed. Formatting, type-aware lint, type checking for the changed files and git diff --check passed. I didn't exercise an installed Gateway with the new command.

@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Nov 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR adds activity details to /subagents info when they differ from an unfinished worker’s recorded status.

Example: Run awaiting-approval is recorded as running while waiting for approval.

  • Before: /subagents info awaiting-approval shows Status: running.
  • After: The reply shows Recorded status: running and Activity: waiting for approval.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, worthwhile patch with distinct regression coverage and no identified defect; confidence is bounded by handler-level evidence.
Proof confidence 🦐 gold shrimp (3/6) This PR is explicitly exempt from the contributor proof gate; supplied validation exercises command handlers and includes a seeded approval observation, but does not demonstrate the changed reply through an installed Gateway.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Inspecting a worker can say only running even when it is waiting for approval or its current activity cannot be observed.
Reason: The change brings individual inspection into line with the established status distinction and preserves finished-worker output.

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: f87d2fdd90f683b605b4b176ef182f6eb3da9ace

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Execution activity formatting keeps the original intent (a877d36: Distinguish observable execution and waits from retained task state without treating saved rows as evidence of liveness.)
  • Individual run metadata keeps the original intent (2dd328a: The host provenance records this line in a lifetime-preparation refactor preserving recorded ownership; the PR supplements its recorded-status output without changing ownership or stored status.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +15, Tests +21, Docs +2. Total +38 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 17 2 +15
Tests 1 25 4 +21
Docs 1 4 2 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 46 8 +38

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 28, 2026, 10:35 AM ET / 15:35 UTC.

@freeqaz-openai
freeqaz-openai merged commit 8ecf38e into main Nov 28, 2026
123 of 124 checks passed
@freeqaz-openai
freeqaz-openai deleted the fix/subagent-info-activity branch November 28, 2026 15:48
@freeqaz-openai

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant