Repository navigation
fix(subagents): find a resumed worker by its spawn or run ID - #208254
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. |
|
Codex review: passed. What this changesThis PR lets subagent info and log commands find a resumed worker by its original spawn ID or current run ID. Example: A worker spawned as 3bc6a5a4-a50a-4a47-aede-bd121eae811f resumes as announce:requester-settle:main:agent:main:subagent:example:leaf:yield-1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open for landing: it fixes a current lookup defect, resolves the earlier ratchet failure, and has no remaining actionable findings. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared command resolver receives a session-scoped worker view and selector, then returns a registry record for info display or session-key-based transcript retrieval. flowchart LR
A[Subagent command] --> B[Scoped worker snapshot]
B --> C[Shared selector resolver]
C --> D[Info reader]
C --> E[Transcript reader]
D --> F[Command reply]
E --> F
Technical reviewBest possible solution: Land the shared alias lookup while retaining the existing visibility, ordering, ambiguity and session-key contracts. Do we have a high-confidence way to reproduce the issue? Current-main lookup and registry replacement code establish both rejection paths, supported by the author's packaged-Gateway comparison; this review executed no target code. Is this the best way to solve the issue? The change repairs the existing resolver directly, reuses registry-owned task identity, and leaves authorization and transcript addressing with their existing owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7c0080f09ee2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +6, Tests +22. Total +28 across 2 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 HistoryReview history (1 earlier review cycle)
Reviewed November 29, 2026, 6:36 AM ET / 11:36 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix(subagents): find a resumed worker by its spawn or run ID * refactor(subagents): share the read-only command alias lookup Follow-up scan: 34d4f8f improve: list Docker streams and flag unconfirmed cleanup in Doctor (#201292); 21786f6 refactor(ui): stop sending 28 additional unused labels to translators (#207982); 9cec330 refactor(workboard): group session tiles without rescanning each column (#207380); 16a2d4b refactor(ui): lowercase log search text only once (#207383). Other hits are not required by this focused beta.2 fix. (cherry picked from commit 51ce8ed) Co-authored-by: RomneyDa <[email protected]>
…w#208254) * fix(subagents): find a resumed worker by its spawn or run ID * refactor(subagents): share the read-only command alias lookup
What Problem This Solves
A worker can yield and resume the same task under a new run ID. After delivery,
/subagents inforejected the ID fromsessions_spawnand the current ID shown under Run. Looking up the full Session key worked.User Impact
Use either full ID to inspect the resumed worker with
/subagents infoor/subagents log. This helps the parent check delivery before retrying work. There is no new permission or configuration.Why This Change Was Made
The current ID can contain colons. The command treated it exclusively as a session key. The registry also keeps the original spawn ID in
taskRunId. Look for both IDs in the same list of visible workers. Keep session keys, labels and numeric selectors working as before. Require the full task ID and refuse ambiguous matches.Evidence
Update after the identity check
The first head (
955a3221) added three direct ID comparisons. Both CI and the local session-identity check flagged them. The current head (422129a3) treats the two IDs as command aliases for each entry in the existing visible list. Both lookup paths share that logic. The selected record still addresses a child by session key. The resolver makes no decision about whether an execution or a writer owns that session. The identity checker and its allowlist are unchanged.On the updated code, the same identity check, the 29 lookup tests (91.21 seconds including startup), 19 command tests, formatting and focused type-aware lint passed. The packaged trials below used the first head.
Packaged comparison at
955a3221I started a goal in an isolated Gateway using Codex CLI 0.164.0 and scripted inference. The parent spawned a worker, which spawned a child to read a unique value. Both callers yielded. The worker resumed under a different run ID and passed the result back to the parent.
The two packaged builds used OpenClaw
67f29364with the same downstream runtime patches. The only additional change in the second build was the first head of this PR. The two edited files had identical preimages there and on the PR base. Seven status commands per run made zero model calls. Each run had one file read. Automatic goal continuation is a separate bug.On the PR base, three lookup regressions failed without the fix. With the fix,
pnpm test src/auto-reply/reply/subagents-utils.test.ts --maxWorkers=1passed 29/29 in 87.46 seconds including a cold compiler build. The command suite passed 19/19. Formatting and type-aware lint passed after I restored the lint plugin mount in the isolated runner. The packaged comparison exercised the info command. Log uses the same resolver.