Repository navigation
fix(cli): plugins inspect skill-workshop fails on multi-agent rosters - #124283
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 5:31 AM ET / 09:31 UTC. ClawSweeper reviewWhat this changesThe PR makes Merge readinessKeep open: current main still invokes the Skill Workshop diagnostic without an agent, while its callee resolves a default owner and rejects an explicit multi-agent roster. This head supplies each roster member and mirrors the already-merged Doctor pattern without widening the shared diagnostic API. Likely related people: steipete (high confidence) and Vitor Cepeda Lopes (low confidence). Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe plugin-inspection CLI reads configuration and reports diagnostics to the operator’s terminal. For the legacy built-in Skill Workshop target, it now enumerates configured agents before asking the shared policy diagnostic for each agent. flowchart LR
A[Operator runs plugin inspection] --> B[CLI reads configuration]
B --> C[Agent roster]
C --> D[Workshop policy diagnostic]
D --> E[Per-agent guidance]
E --> F[Terminal output]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +7. Total +13 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the singular diagnostic strict and retain caller-specific roster iteration, then merge after exact-head required checks are green. Do we have a high-confidence way to reproduce the issue? Yes, source establishes a direct current-main path: the CLI omits Is this the best way to solve the issue? Yes. Per-caller roster iteration matches the merged Doctor solution while preserving the diagnostic’s singular, ambiguity-rejecting contract for other callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 315969f6693e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
|
Thanks for the review — addressed the blocking item. Added real behavior proof. The PR body now includes a before/after terminal run of the actual changed command, Before, on unpatched After, on this branch, it reports one diagnostic per configured agent: A single-agent run is included too, showing unchanged behaviour there. One clarification, since it could otherwise read as a failure: exit status Ready for fresh review. |
|
Thanks for the re-review.
Recording that rationale here so it stays visible at merge, and confirming it matches the shipped shape: The loop is duplicated at the call site rather than pushed into Widening the diagnostic API to return a collection would push that presentation split into shared contract surface for two callers that disagree about it, and would change the signature every other caller depends on. Keeping the singular per-agent API and iterating at each call site is the narrower contract, and matches what #124010 established for doctor. Non-goal for this PR: the For completeness on the exit status, since before/after both show CI green: 82 pass, 0 fail, 45 skipped. |
2d66e26 to
c04f349
Compare
|
Rebased onto current Head is now Re-verified against current main rather than assuming the rebase was clean:
No behavior change since the last review; this is purely a freshness rebase so the merge decision isn't made against a stale base. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer follow-up pushed in f5197c18b89a3d365025ea6326c67aeaf29bbd09: imports the roster helper directly from its lightweight agent-scope-config owner instead of the heavyweight agent-scope runtime barrel, and removes the intermediate diagnostics allocation. All 32 focused plugin CLI tests pass; independent reviews of both the follow-up and full branch are clean. Production growth is reduced to seven lines, and the original contributor commit and credit are preserved. |
Co-authored-by: Saju <[email protected]>
c64e63f to
0e7e76e
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
Related: #124010
What Problem This Solves
Fixes an issue where users running
openclaw plugins inspect skill-workshopon a configuration with more than one agent would get a thrownAgentSelectionRequiredErrorinstead of the Skill Workshop tool-policy guidance:The command is supposed to explain that Skill Workshop is built in rather than a plugin, and report whether
skill_workshopis policy-hidden. On a multi-agent roster it never gets that far.Why This Change Was Made
detectSkillWorkshopToolPolicyDiagnosticfalls back toresolveDefaultAgentIdwhen noagentIdis passed, and a multi-agent roster has no default owner to resolve, so the call throws.#124010 fixed exactly this for the doctor health check by resolving per configured agent, but it updated
src/flows/doctor-core-checks.tsand not theplugins inspectcall site, which still passes no agent. This applies the same pattern to the remaining caller and reports a diagnostic per agent.One visible consequence:
listAgentIdsinjects the implicitmainagent, so single-agent configurations now passagentId: "main"explicitly rather than relying on the default-owner fallback. That makesplugins inspectconsistent with the doctor check, and the existing expectation is updated to match.User Impact
openclaw plugins inspect skill-workshopnow works on multi-agent setups and reports tool-policy availability for each configured agent instead of failing. Single-agent behaviour is unchanged.Evidence
Verified the throw on current
mainby calling the diagnostic directly with a two-agent roster and noagentId:With an explicit agent id, the same call resolves for each agent:
New multi-agent regression test added in
src/cli/plugins-cli.list.test.tsasserting the command reports per agent instead of throwing.Wider run across the areas this touches (
src/state/,src/infra/sqlite-strict.test.ts,src/cli/plugins-cli.list.test.ts,src/skills/workshop/,src/flows/doctor-core-checks.test.ts) → 972 passed, 0 failed.oxfmt --checkandoxlintpass on the changed files. Full-repotsc --noEmitwas not run locally (OOMs on the machine used); relying on CI.CHANGELOG.mdintentionally untouched per CONTRIBUTING.After-fix CLI evidence (added for ClawSweeper review)
Real runs of the changed command via
src/entry.ts, against an isolated two-agentconfig (
OPENCLAW_CONFIG_PATH/OPENCLAW_STATE_DIRpointed at a scratch dir, so nolive state is involved):
{ "tools": { "profile": "messaging" }, "skills": { "workshop": { "autonomous": { "mode": "propose" } } }, "agents": { "ownership": "explicit", "entries": { "main": {}, "venus": {} } } }Before — current
main,src/cli/plugins-inspect-command.tsunpatched:The command never reaches its own output — it fails during CLI startup.
After — this branch:
Single-agent regression check — this branch, one configured agent:
Note on the exit code:
1is expected and unchanged on this path — the legacyskill-workshopinspect id always reports and exits non-zero because it is not aplugin. The fix changes what is reported, not the exit status: previously a CLI
startup failure with no diagnostic, now one diagnostic line per configured agent.