Skip to content

feat(subagents): show executor agent in list rows - #186845

Open
moonbow0407 wants to merge 1 commit into
openclaw:mainfrom
moonbow0407:feat/186424-subagent-executor
Open

moonbow0407 wants to merge 1 commit into
openclaw:mainfrom
moonbow0407:feat/186424-subagent-executor

Conversation

@moonbow0407

@moonbow0407 moonbow0407 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #186424

What Problem This Solves

/subagents list does not identify the agent executing each child. Labels describe the task, and several agents can use the same model, so operators must inspect children individually to check routing.

User Impact

Active and recent rows now include [agent: <id>], including children running under the requester's own agent. For example: research worker [agent: research] (shared-model, 2s) done.

Why This Change Was Made

The shared row formatter reuses the existing child-owner resolver. This covers both slash-command replies and the subagents tool's readable text, including recorded owners for raw session keys. Unresolved owners remain omitted; structured results and authorization are unchanged.

The simplification pass retained one formatter change and one regression using existing fixtures. Production: +2/-1; tests: +34; docs: +3.

Evidence

  • Regression through the real handleSubagentsCommand path: unchanged main a29646098 fails because the three rows omit agent identifiers; the final change identifies same-agent, cross-agent, active/recent, and raw-key children sharing a model. The new case took 369 ms on Linux.
  • Linux / Node 24.22.1: node scripts/run-vitest.mjs src/agents/subagents/registry/subagent-list.test.ts src/auto-reply/reply/commands-subagents.test.ts --maxWorkers=1 selected within the focused run: 30/30 passed. The command file shared a 31.93 s shard with ownership tests; the list suite took 38.32 s including transforms and teardown. CI timing is pending.
  • Existing tool consumer src/agents/tools/subagents-tool.registry.test.ts: 3/3 passed on Windows.
  • Production typecheck (tsconfig.core.json), test typecheck (tsconfig.core.test.messaging.json), type-aware oxlint for the touched TypeScript, oxfmt, and git diff --check: passed.
  • Fresh independent source review of the complete change against a29646098: no actionable findings. Local autoreview/ClawSweeper was not run.
  • The command regression uses the real slash handler with the existing synthetic registry fixture. No live chat-channel or model call is claimed. Windows list-suite assertions passed but teardown hit an EPERM; the complete Linux list suite, including teardown, passed.

Partial Gateway evidence (2026-10-30)

On Windows with Node 24.22.1 at head 921358f85cfcc591c2f63099ff20eb02eac3804a, an isolated Gateway accepted sessions_spawn through a deterministic local OpenAI Responses fixture. A real chat.send of /subagents list returned:

active subagents:
-----
1. ACTIVE_CHILD [agent: main] (shared, 20s) running

recent subagents (last 30m):
-----
(none)

This confirms a same-agent active row through the Gateway command path. It is partial evidence only: the cross-agent recent child did not reach the list in this fixture, the overall test failed, and the recorded-owner raw-key case was not exercised. No live model or channel is claimed. The reviewer-requested full real-behavior proof and maintainer presentation decision remain open.

@clawsweeper

clawsweeper Bot commented Oct 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 agents Agent runtime and tooling size: XS labels Oct 28, 2026
@moonbow0407
moonbow0407 marked this pull request as ready for review October 28, 2026 15:09
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Adds the resolved executor agent ID to active and recent subagent list rows.

Example: A completed research child uses the same model as other agents.

  • Before: research worker (shared-model, 2s) done
  • After: research worker [agent: research] (shared-model, 2s) done

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and source-consistent, while evidence remains limited to an in-process regression and the display policy awaits an owner decision.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Operators cannot identify which configured agent runs each child without inspecting children individually when multiple agents share a model.
Reason: The improvement is bounded and useful, but showing IDs for every child changes existing presentation without a recorded owner decision.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it provides a focused usability improvement absent from current main, with no concrete introduced bug found.

Priority: P3
Reviewed head: 921358f85cfcc591c2f63099ff20eb02eac3804a
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should subagent list rows show every resolved executor ID, including children running under the requester's own agent?
  • Recommendation: Show every resolved executor: Accept the proposed consistent field for active and recent rows, including same-agent children.
  • Why: The linked request offers two presentation policies, and neither its discussion nor this PR records maintainer approval of one.

Before merge

  • Add real behavior proof - The shared formatter is exercised through handleSubagentsCommand using synthetic registry records and mocked persistence, but the body and discussion supply no shipped-entry-point capture; the contributor should provide a terminal screenshot, chat recording, logs, or live output for the changed rows, redacting IPs, API keys, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Supply a redacted shipped chat-command capture showing executor IDs in active and recent rows for same-model children, including same-agent and recorded-owner raw-key cases.
Agent review details

How this fits together

The shared subagent list formatter combines selected registry runs with session metadata and produces rows consumed by chat commands and readable tool output.

flowchart TD
  A[Selected registry runs] --> C[Shared list formatter]
  B[Session metadata] --> C
  D[Existing child owner resolver] --> C
  C --> E[Slash command reply]
  C --> F[Readable tool output]
Loading

Technical review

Best possible solution:

Use the existing owner resolver in the shared formatter to display executor identity under the presentation policy chosen by the feature owner.

Do we have a high-confidence way to reproduce the issue?

Source confirms that current main omits executor identity from shared list rows; this read-only review ran no product code or tests.

Is this the best way to solve the issue?

The implementation is the smallest complete display change: it reuses the authoritative resolver, preserves unresolved-owner omission, and adds one meaningful handler regression without new state or configuration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0ebeb475e394.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit eacdfbc adds src/agents/subagent-list.ts:259 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: eacdfbc84b6d; files: src/agents/subagent-list.ts)

PR surface

Source +1, Tests +34, Docs +3. Total +38 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 1 +1
Tests 1 34 0 +34
Docs 1 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 39 1 +38

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This improves operator visibility without changing execution, routing, or task completion.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

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 October 28, 2026, 11:26 AM ET / 15:26 UTC.

This branch has not been deployed

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

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: show the target agent id in /subagents list rows

1 participant