Skip to content

improve(skills): discover eligible skills automatically - #166166

Draft
roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/remove-agent-skill-allowlists-20261006
Draft

roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/remove-agent-skill-allowlists-20261006

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #163824, #164969

What Problem This Solves

Applied Workshop skills should become discoverable without manually adding each new name to a persistent agent list.

User Impact

User impact: agents discover all otherwise-eligible skills in their configured roots, including newly applied Workshop skills; the agent Skills panel becomes a read-only eligibility inventory.

Intentional upgrade policy change: Doctor retires agents.defaults.skills, agents.entries.<id>.skills, and their historical agents.list forms, with visible warnings and the normal private pre-migration backup. Prior agent-specific restrictions over current and future skill names are not preserved. An old [] no longer disables all skills. Review this change before upgrading if you rely on that persistent curation. Global per-skill disables and session selections remain effective, but are not equivalent preservation of agent-specific restrictions. No agent exclusion becomes a global disable.

skills.allowBundled, prerequisites/platform eligibility, publishing/scanning, source precedence and agent-owned Workshop isolation remain separate. Tool permissions, credentials, sandbox and exec-approval controls are not relaxed.

X guest containment previously depended on the empty skill list suppressing outside-repository read exceptions. This PR preserves that shipped restriction through the existing sender-bound, closure-bound read authority and inherited helper lineage instead. Guests and their hidden helpers cannot gain external skill/resource reads from normal discovery. Older hosts refuse guest mode with actionable support guidance; normal maintainer behavior is unchanged.

Why This Change Was Made

Persistent positive lists have legitimate role-focus, token-efficiency and behavioral/security-guardrail uses. This deliberately trades that optional persistent catalog curation for automatic skill discovery and learning, rather than claiming the old selection model was pointless or a hard host/tool authorization boundary.

The cutover removes the competing agent-name filter across discovery, prompts, catalog/read/search/slash/status, snapshots, CLI, UI and native consumers. Existing eligibility, session focus and refresh owners remain authoritative. Doctor owns retirement and backup; restrictive X resource authority stays with the existing admission/read owners, using a compatible optional restrictive fact rather than new public configuration.

Requested by @obviyus.

Work sessions

Evidence

  • Real baseline apply-to-snapshot regression reproduced the prior hidden-Workshop behavior. The 306-test skill/Workshop matrix passed in 75.42 seconds; affected later fixture/consumer follow-ups passed in 100.04 seconds. Coverage includes source isolation, global disables, prerequisites, bundled controls, session true/false focus, real apply/watch/next-snapshot discovery, search/read/slash/status and existing refresh contracts.
  • Real admitted root/hidden-descendant read tests permit an in-repository file and deny known external skill paths, cached instruction shortcuts and symlink/alias escapes before protected bytes; ordinary non-guest selected-skill reads still work. Native/worker handoff, helper placement, old-host refusal and existing live-authority/closure siblings were checked. The final migration/backup/bounded-warning/read-floor matrix passed 13 tests across four files in 60.17 seconds.
  • Production core/UI/scripts/extensions typing, all test-type shards, changed-source lint, formatting, canonical protocol/config/native-source generation, SDK surface/export/declaration checks and config documentation examples passed. Current-main integration (pinned 9da070d4): only two generated config-baseline conflicts, regenerated canonically; preserved published ancestry and current main callers plus fs-safe 0.24.0. Current-base boundary matrix: 47 tests / seven files / 111.92s, plus six new X monitor-publication cases (28.77s). Production and test typing and scoped lint passed after cutting over two stale main-added fixtures. Full current typed build: 8m30s; package integrity passed. Exact staged ratchets against the actual PR base passed without exceptions. X cold-import screening completed at 105.4 MB RSS; dirty-source screening is not a clean-revision qualification.
  • Fresh whole-candidate AutoReview completed both passes, scoped-clean for P0–P2, with source verification. Published stable 2026.9.8 → candidate update passed on the integrated current source in 6m50.6s: visible policy warnings, retired arrays removed, private original-selection backup retained, global disable preserved, successful real CLI Workshop propose/apply, live Gateway skill status for the owning agent, no other-agent leak, readyz=200, running version and durable/incognito history continuity. This is a success-cell/backup test, not an injected-failure rollback test. Isolated Docker proof run.
  • Actual Control UI before/after captures use the maintained E2E app route, identical synthetic data and a 1280×900 viewport. The final current-source interaction case passed in 1.008s (15.31s suite) and asserts no configuration writes; its recaptured PNG is byte-identical to the embedded inspected After image.

Before

Before: the applied Workshop skill is blocked by the agent name list

After

After: automatic eligible discovery with the disabled sibling still blocked

Release-only composition qualification: An earlier isolated candidate run observed anonymous maintainer child HTTP read 404 instead of 200, after creation/public-sharing assertions and before guest/revoked cases (47.55s suite). This failure remains recorded. A narrow controlled comparison then ran the original assertion and exact case, on unchanged pinned main 9da070d and exact published candidate 834f58d, in the same owned Testbox with Node 24.19.0, pnpm 12.5.1 and frozen dependencies. Both clean source trees passed, including maintainer anonymous reachability and guest/revoked denial: baseline 7.347s case / 44.78s suite, candidate 13.266s case / 59.28s suite (cold wrapper/preparation: 1005.62s and 1068.96s). HTTP router, URL resolver and public-share owner source hashes matched across the two inputs; fixture differences are the reviewed removal of its retired skill list. Paired isolated proof. No code, permission, assertion or expectation changed during qualification. The original 404's cause remains unestablished: passing replay is not claimed as a demonstrated bug fix or evidence that the failure was inherited. Direct sender/hidden-descendant resource, native-handoff, X ingress and monitor-publication checks remain passing.

Known proof limits: native Android/iOS builds were not run on this Linux host; no external X account/API behavior is claimed from resource-admission tests. Earlier validation exposed and repaired a lost Doctor warning handoff and a bounded-warning truncation issue. One test compilation raced a concurrent runtime build; serialized proof passed after fixing orchestration, not by changing product behavior.

Tested/reviewed integrated source: 834f58d1b5c971e480cb6b951bd8aee5f01a119e, tree be3938f5643258a5507245d3a7860ffc245b3152; the merge commit exactly matches the reviewed/checked tree. This is a same-repository branch: maintainers retain existing repository write access; GitHub rejects the fork-collaboration checkbox as cross-repository-only. No permissions changed. CI and human review remain separate from local/isolated checks.


View the OpenClaw team session

Retire persistent positive agent selections through warned Doctor migration and the normal private backup. Preserve independent eligibility, session focus, bundled controls and sender-bound X guest/helper resource authority.

Co-authored-by: Kimiyu-186 <[email protected]>
Co-authored-by: steipete <[email protected]>
@roboclaw-bot
roboclaw-bot requested a review from obviyus October 6, 2026 15:15
@clawsweeper

clawsweeper Bot commented Oct 6, 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 channel: telegram Channel integration: telegram app: android App: android app: ios App: ios app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes security Security documentation scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling plugin: file-transfer channel: x size: XL labels Oct 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

The PR replaces persistent per-agent skill lists with automatic eligible discovery, migrates old settings through Doctor, makes skill inventories read-only, and adds repository-only read restrictions for X guests and helpers.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful visual and upgrade evidence is outweighed by the unresolved persisted-helper security defect and missing compatibility proof.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 10 items remain

The work remains necessary, but the prior guest-helper containment finding is still unresolved. Retiring existing skill-selection settings also needs explicit maintainer acceptance.

Priority: P2
Reviewed head: 834f58d1b5c971e480cb6b951bd8aee5f01a119e
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should upgrades unconditionally retire per-agent skill curation, including empty lists, or preserve it while addressing hidden Workshop skills?
  • Recommendation: Preserve existing curation: Address hidden Workshop skills with the existing warning-only repair while deciding automatic discovery separately.
  • Why: This intentionally replaces a shipped operator preference contract; requesting automatic discovery does not establish acceptance of deleting existing restrictions.

Before merge

  • Add real behavior proof - Authority-chain proof required: exercise a persisted pre-cutover X guest helper through candidate admission and resume, showing repository reads succeed and external skill, alias, and cached-instruction reads reject before contents are returned. Inspected screenshots establish the inventory change, and the reported published-driver run supports config retirement and backup; fresh-helper tests seed the new flag and do not establish old-helper compatibility. Provide redacted terminal output or logs, then update the PR body for automatic re-review; a maintainer can request @clawsweeper re-review if needed.
  • Preserve containment for pre-cutover X guest helper envelopes (P1) - An X guest helper created before this cutover has a valid version-1 sender envelope but no inheritedWorkspaceOnlyRead. This parser still accepts it and omits the restriction; senderless resume then uses the persisted policy without fresh sender resolution. After Doctor removes the old empty skill list and the snapshot refreshes, createCoreCodingTools can grant external skill-root and cached-instruction read exceptions. Preserve containment through verified migration or reject the incompatible guest envelope before tool execution. This repeats the unresolved prior finding; the supplied descendant tests explicitly seed the new flag.
  • Resolve security concern: Old guest authority survives without its replacement read restriction - Version-1 guest helper envelopes remain accepted without the new field, while the configuration restriction previously suppressing external skills is removed; resumed helpers can reach protected skill contents through ordinary reads.
  • Resolve merge risk - Upgrade deletes existing per-agent curation, including empty lists, and enables currently excluded and future eligible skills; warnings and backups do not preserve that behavior, and explicit acceptance remains unrecorded.
  • Resolve merge risk - Existing persisted guest/helper state has no verified containment-preserving upgrade path; fresh helpers carrying the new flag do not establish compatibility.
  • Complete next step - Repair and prove containment for persisted pre-cutover guest helpers, and obtain explicit acceptance of the selection-retirement policy or preserve existing curation.
  • Improve patch quality - Repair pre-cutover helper admission and prove allowed repository reads and forbidden external reads through the final read boundary.
  • Improve patch quality - Record explicit acceptance of retiring existing selections, or narrow the change to preserve them.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P1] Preserve containment for pre-cutover X guest helper envelopes — src/agents/subagents/spawn/subagent-capabilities.ts:314-316
  • [high] Old guest authority survives without its replacement read restriction — src/agents/subagents/spawn/subagent-capabilities.ts:314
Agent review details

How this fits together

Skill discovery turns configured skill roots and eligibility rules into agent instructions, readable resources, and slash commands. Requester policy must independently keep X guests and their helpers confined to the repository.

flowchart TD
  A[Configured skill roots] --> B[Skill discovery]
  C[Eligibility and session selections] --> B
  B --> D[Agent skill snapshot]
  E[X guest or persisted helper] --> F[Requester read policy]
  D --> G[File and instruction reads]
  F --> G
  G --> H[Allowed contents or rejection]
Loading

Technical review

Best possible solution:

Make newly applied Workshop skills discoverable while preserving repository containment for every existing helper, and retain persistent curation unless maintainers explicitly approve its retirement.

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

Yes, source establishes a concrete upgrade path: create an X guest helper on the pinned base, upgrade, refresh its skill snapshot, and resume it without an external sender. This review did not execute that path.

Is this the best way to solve the issue?

No, the current branch leaves old helper containment unprotected and replaces existing preferences without recorded acceptance; the related warning-only repair is a narrower way to address Workshop visibility.

Full review comments:

  • [P1] Preserve containment for pre-cutover X guest helper envelopes — src/agents/subagents/spawn/subagent-capabilities.ts:314-316
    An X guest helper created before this cutover has a valid version-1 sender envelope but no inheritedWorkspaceOnlyRead. This parser still accepts it and omits the restriction; senderless resume then uses the persisted policy without fresh sender resolution. After Doctor removes the old empty skill list and the snapshot refreshes, createCoreCodingTools can grant external skill-root and cached-instruction read exceptions. Preserve containment through verified migration or reject the incompatible guest envelope before tool execution. This repeats the unresolved prior finding; the supplied descendant tests explicitly seed the new flag.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Preserve old helper containment (recommended)
    Repair admission or migrate verified guest-helper lineage so old envelopes cannot acquire external skill reads, then prove the persisted-state upgrade through final reads.
  2. Narrow to the existing warning repair
    Pause this broader cutover and resolve the Workshop visibility problem without deleting operator-owned selection settings.

Security

Needs attention: The automatic-discovery cutover can widen external resource reads for persisted X guest helpers that lack the new restriction.

Evidence

Security concerns:

  • [high] Old guest authority survives without its replacement read restriction — src/agents/subagents/spawn/subagent-capabilities.ts:314
    Version-1 guest helper envelopes remain accepted without the new field, while the configuration restriction previously suppressing external skills is removed; resumed helpers can reach protected skill contents through ordinary reads.
    Confidence: 0.97

What I checked:

  • Pinned introduced change: Reviewed the introduced delta from 9da070d to the actual head 834f58d. The supplied test merge is stale and was not used to infer removal of current-main behavior. (834f58d1b5c9)
  • Current main still implements persistent selection: Current main resolves an explicit agent skill list before shared defaults. Automatic discovery has not replaced this contract. (src/skills/discovery/agent-filter.ts:14, f0984df6685f)
  • Latest release retains the selection contract: The v2026.9.8 source also resolves explicit per-agent skill lists and inherited defaults. Local historical blob hydration returned HTTP 403; the release source was successfully inspected through the GitHub contents API instead. (src/skills/discovery/agent-filter.ts:15, fc23bc864e45)
  • Pre-cutover containment contract: The pinned base requires an empty agent skill list for X guest containment. Its persisted helper envelope has version 1, inherited tool restrictions, and sender provenance, but no inheritedWorkspaceOnlyRead field. (extensions/x/src/guests.ts:18, 9da070d4b995)
  • Old helper envelopes remain admissible: The head still accepts version-1 helper envelopes without the new restrictive field. Senderless resume in requester-tool-policy.ts consumes that envelope without resolving fresh sender policy, and conversation-capability-profile.ts consequently projects workspaceOnlyRead as false. (src/agents/subagents/spawn/subagent-capabilities.ts:314, 834f58d1b5c9)
  • Final read boundary depends on the missing field: External skill roots and inline instruction content are suppressed only when workspaceOnlyRead is true. Otherwise selected skill roots become additional read roots even when ordinary filesystem policy is workspace-only. (src/agents/core-coding-tools.ts:216, 834f58d1b5c9)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Retired configuration settings 2 selection settings removed Default and per-agent skill lists lose their existing meaning during upgrade.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a useful discovery improvement with bounded scope, requiring compatibility and containment work before landing.
  • merge-risk: 🚨 compatibility: Doctor deletes existing selection preferences and persisted helper rows lack verified upgrade compatibility.
  • merge-risk: 🚨 security-boundary: Pre-cutover guest helpers can retain read authority without the new flag that suppresses external skill resources.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦐 gold shrimp and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Shared skill-command discovery changes which eligible skills appear and can be invoked through Telegram slash commands.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-06T15:28:32.574Z sha 0d4d0c5 :: needs real behavior proof before merge. :: [P1] Preserve containment for pre-cutover X guest helper envelopes
  • reviewed 2026-10-06T17:04:11.448Z sha 834f58d :: needs real behavior proof before merge. :: [P1] Preserve containment for pre-cutover X guest helper envelopes

Reviewed October 6, 2026, 1:56 PM ET / 17:56 UTC (Revision 3).

Preserve published ancestry while regenerating the two conflicting config documentation baselines and cutting over two new X fixtures. Keep current main runtime and fs-safe changes; preserve existing containment and sharing controls.

Co-authored-by: Kimiyu-186 <[email protected]>
Co-authored-by: steipete <[email protected]>
@roboclaw-bot
roboclaw-bot requested a review from a team October 6, 2026 16:59
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 6, 2026

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 app: android App: android app: ios App: ios app: web-ui App: web-ui channel: telegram Channel integration: telegram channel: x cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: file-transfer proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts security Security documentation size: XL 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.

1 participant