Skip to content

fix: use the configured system agent for skills inventory - #205659

Merged
vincentkoc merged 1 commit into
mainfrom
fix/skills-read-system-agent
Nov 26, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/skills-read-system-agent

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

With two configured agents and a designated system agent, running openclaw skills outside both workspaces asked for --agent. The same error prevented skills list, skills info, and skills check from showing the designated agent’s inventory. @yxshee reported this behavior in #195423.

User Impact

These four commands now use the designated system agent from a neutral directory. An explicit --agent still takes precedence, followed by the agent whose workspace contains the current directory. A multi-agent roster without a designation still requires a choice.

Why This Change Was Made

The inventory caller opts into the same roster-validated system-agent selection used to identify the default in the agent list. Install, update, verify, and Workshop continue to use their existing workspace selection.

Evidence

  • Replayed the four registered CLI commands against synthetic profiles in isolated local state, with each of two agents designated in turn. All eight reads previously exited 1 before requesting inventory. After the change, all eight requested the selected agent’s inventory and displayed the expected workspace or skill description through the implicit-local fallback.
  • Compared exit status, stdout, stderr, and Gateway requests for 13 controls. All matched, including nested cwd, explicit overrides and errors, sole and undesignated rosters, install/update/verify, and Workshop list/archive.
  • The local fixture exercised an unavailable Gateway transport. A live Gateway and the repository Vitest suite were outside this local replay.

Hosted verification

The CLI command suite passed 42/42 on the signed head and again on the protected test merge. The full dispatch’s dependency check reported 15 distinct path/symbol pairs in 11 files whose blobs match the parent. The parent workflow omitted that check. The private-profile runs exercise the registered CLI. A packaged CLI run and an upgrade from the latest stable release remain unverified. CLI suite · dependency report

@vincentkoc vincentkoc self-assigned this Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 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 cli CLI command changes size: XS labels Nov 26, 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. labels Nov 26, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 26, 2026 01:10
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Skills inventory commands fall back to the configured system agent when neither --agent nor the current directory selects an agent.

Example: Configure writer and reader, designate reader as the system agent, and run openclaw skills check outside both workspaces.

  • Before: The command exits with an instruction to pass --agent.
  • After: The command requests reader’s skill inventory.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The source repair is focused and has meaningful routing coverage, but required shipped-entry-point proof is not established and the failing dependency gate remains unexplained.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users with multiple agents and a designated system agent cannot inspect its skills from a neutral directory without repeating --agent.
Reason: The maintainer-authored direction resolves a documented inventory-selection inconsistency with a small change and preserves explicit ownership for mutations.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides a focused repair for a current-main inventory-selection failure, with no concrete introduced correctness defect found.

Reviewed head: bbe4619f11505650f9c143a4503929d645d797a3

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted shipped-CLI output on this head for designated-agent inventory and selection controls, including an upgrade from v2026.11.10 with settings and skills preserved; base-red/head-green execution of the committed regressions is also not shown.
Agent review details

How this fits together

The skills CLI resolves configuration, agent identity, and workspace before requesting Gateway inventory or using the existing implicit-local offline fallback.

flowchart TD
  A[Skills inventory command] --> B[Explicit agent or workspace inference]
  B --> C[Configured system agent fallback]
  C --> D[Resolved agent and workspace]
  D --> E[Gateway skills status]
  E --> F[Rendered inventory]
  E --> G[Implicit local offline inventory]
  G --> F
Loading

Technical review

Best possible solution:

Retain the inventory-only opt-in through the existing roster-validated resolver while preserving explicit selection, cwd precedence, and mutation ownership.

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

Current-main source establishes the failure for an explicit two-agent roster with a designated system agent and neutral cwd; the linked earlier PR independently supplies built-CLI reproduction output, but no target code was executed during this review.

Is this the best way to solve the issue?

The repair uses the existing selection owner at the shared inventory boundary, preserves legacy behavior outside explicit fleets, and avoids changing mutation targets.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2cb81bbb38a1.

Provenance checked

  • Skills workspace selection changes intended behavior with a stated reason (1d3170b: Workspace scoping established explicit-agent, cwd, then default-agent precedence; the later Workshop extraction preserved that ladder, and this PR explains why inventory should honor the recorded system-agent default.)
  • Best-effort inventory configuration keeps the original intent (0c662aa: Allow inventory browsing despite unrelated invalid configuration while mutations retain strict configuration admission.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +9, Tests +30. Total +39 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 10 1 +9
Tests 1 30 0 +30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 40 1 +39

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:

No label changes.

Label justifications:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply current-head shipped-CLI and latest-stable upgrade evidence.
  • Attribute the dependency-check failure and repair it only if this diff caused it.

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 25, 2026, 8:25 PM ET / November 26, 2026, 01:25 UTC.

@vincentkoc
vincentkoc merged commit e6b35a1 into main Nov 26, 2026
265 of 267 checks passed
@vincentkoc
vincentkoc deleted the fix/skills-read-system-agent branch November 26, 2026 21:10
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

cli CLI command changes 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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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