Repository navigation
feat(agents): expose installed skill search across harnesses - #158091
Conversation
|
Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 7:09 AM ET / 11:09 UTC (Revision 9). ClawSweeper reviewWhat this changesMakes eligible installed skills searchable and readable across embedded agents, OpenClaw Code Mode, and Codex while preserving policy, sandbox placement, and usage accounting. Merge readiness✅ Ready for maintainer review This PR remains necessary: merged prerequisites provide the catalog and tools, while current main lacks these runtime bindings. Prior blocking findings are repaired, and no new actionable defect was identified. Member-authored work is also protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherInstalled skills supply task instructions to agents. This integration carries the session’s eligible catalog into each harness and returns bounded search metadata or complete instructions through the normal tool dispatch path. flowchart TD
A[Installed skills] --> B[Eligible session catalog]
B --> C[Tool policy]
C --> D[Agent harness]
D --> E[Search metadata]
D --> F[Workspace or sandbox reader]
F --> G[Complete instructions or refusal]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +279, Tests +575, Docs +48, Other -1. Total +901 across 55 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one host-owned eligible catalog and shared dispatch path across harnesses, preserving existing read grants and complete-instruction delivery. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature review. Source and regression inspection establish the runtime integration gap; this read-only review did not execute the behavior. Is this the best way to solve the issue? Yes. The branch extends the existing installed-skill tools and normal dispatch owner, preserving policy and filesystem ownership instead of introducing a competing discovery service. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d07e6df877a2. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
9f77708 to
ef00124
Compare
edf53bb to
730943d
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
730943d to
95b0015
Compare
77ae04b to
2c7f3b8
Compare
|
87c20fb to
590036a
Compare
Keep installed-skill eligibility host-owned while applying normal tool policy to discovery and complete instruction reads. Preserve current main's prepared tool surface and consolidated Code Mode coverage. Caller-provided snapshot options supply read paths, not replacement eligibility authority.
|
Merged via squash.
|
…w#158091) * feat(agents): expose installed skill search across harnesses Keep installed-skill eligibility host-owned while applying normal tool policy to discovery and complete instruction reads. Preserve current main's prepared tool surface and consolidated Code Mode coverage. Caller-provided snapshot options supply read paths, not replacement eligibility authority. * test(agents): preserve hoisted skill harness initialization Keep mock factory dependencies owned by vi.hoisted when splitting skill fixtures. Assemble skill-specific mocks only when the test consumer requests them. Update two prior expectations for the prepared empty snapshot/resource contracts while preserving sandbox host-skill exclusion. Exact-head reproduction failed on the original hoisting and resource-array assertions. Nine affected suites covered 61 tests; after the hoisting repair, a stale sandbox snapshot assertion was found and the 32-test owner file passed on focused retry. Fresh lifecycle autoreview found no actionable P0-P2 issues; formatting and whitespace checks pass. * test(agents): group sandbox skill coverage with policy tests * test(agents): admit skill tools in client collision coverage * test(agents): provide complete prepared skill fixtures * test(agents): match async skill prompt contract * fix(skills): preserve existing Code Mode read grants and whole reads * fix(skills): preserve read denials in frozen tool profiles * fix(codex): refuse partial installed skill instructions Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Eligible installed skills outside the prompt budget cannot be discovered reliably. Runtime exposure must preserve tool policy, sandbox placement, and skill-use accounting.
Related: #61740
Related prior proposal: #75871
Why This Change Was Made
Bind the prepared catalog to its filesystem owner and effective sandbox placement. Route Code Mode search/read through normal tool dispatch, gate listing on admitted search access, and record successful reads with their original provenance.
Prompt guidance follows the actual tool surface. A known skill can be read directly without a mandatory search. The host retains its captured admitted catalog; a plugin-supplied read snapshot cannot enlarge that authority.
User Impact
Agents can use
skills_searchandskills_read; Code Mode exposes the correspondingskills.search(),skills.read(), and bounded listing operations. Codex receives host-owned dynamic tools without changing its native resource API.No new configuration is required. Existing tool policy controls availability, and sandboxes expose only readable, delivered skills. Dedicated remote-worker protocols remain unchanged.
Existing
readgrants retain skill-read access unless that inherited grant orskills_readis explicitly denied. Prompt-listed instructions preserve their shipped whole-read contract; newly discovered instructions retain the 256 KiB limit.Builds on #158090, now landed. Bounded instruction-body ranking follows in #160538.
Evidence
An unrelated Control UI locator ambiguity failed one hosted shard. Its single diagnostic retry passed on the unchanged head. The underlying test defect is tracked separately at test(ui): pending-handoff locator also matches screen-reader announcement #162620. All circuit-breaker-cancelled jobs then completed successfully; exact-head CI run https://github.com/openclaw/openclaw/actions/runs/36848731115 is green on attempt 3.
74 focused regressions across nine files passed in 243.46 seconds: Code Mode, embedded policy, workspace ownership, sandbox reads, prompt guidance, accounting, resources, and Codex dynamic dispatch.
Review caught two Code Mode policy defects: dropping read access also dropped valid search access, and guidance advertised unavailable operations. Both are repaired. The new cases fail on the original code and pass after repair.
The final factory-registration move into the preceding PR preserves the combined source tree byte-for-byte.
CI exposed a hoisted mock initialization error and stale prepared-resource expectations. The helper now initializes hoisted factories independently, and the affected 61 regressions pass across scoped runs. The sandbox regression is grouped with skill-policy tests; both relocated suites pass all 36 tests in 100.77 seconds and the line-cap guard passes.
Updated the client-collision fixture to admit real installed-skill tools and assert that policy removal also removes skill guidance. All 16 client-tool regressions pass in 37.32 seconds; scoped review and the line-cap guard pass.
Repaired shared compaction and follow-up fixtures to produce valid skill snapshots. All 144 affected regressions pass in 100.16 seconds. Moving the compaction skill mocks into existing test support preserves coverage and passes the line-cap guard; its 88 consumer regressions pass again in 42.19 seconds. Fresh scoped review and targeted lint pass.
The typed fixture boundary also exposed a synchronous prompt mock for an asynchronous API. Its producer and one override now match the real promise contract; core type-checking and all 88 compaction regressions pass (42.67 seconds). All six commits retain identical patches after restacking onto the landed parent.
A proposed switch from the captured host catalog to caller-supplied snapshots was rejected after checking actual Codex, Copilot, and Agents API callers: snapshots are read inputs, not replacement eligibility authority.
Reproduced and repaired the released Code Mode grant and size regressions through the real worker bridge and canonical policy filter. The regression first failed on the missing binding, then on the 256 KiB refusal. All 83 focused Code Mode, policy, workspace, library, and host cases passed in 116.11 seconds. Review caught inherited
readdenial precedence; that regression also failed before its fix, then all three grant/denial cases passed in 49.32 seconds.Fresh scoped review found no actionable P0-P2 findings after those repairs. Core typechecking, targeted lint, formatting, whitespace, and the line-cap guard pass.
The unrelated baseline fixture failures were reproduced and repaired separately in fix(test): honor session worker fixture lifecycle contracts #162598. All seven feature commits retain identical patches after restacking onto that landed prerequisite. Local results above precede the rebase; exact-head CI remains required before landing.
Final CI exposed a frozen Claw profile intersection that ignored denials while materializing inherited skill-read grants. The effective-access regression failed before repair; all 62 Claw profile, capability-change, and Code Mode cases pass in 76.45 seconds after repair. The Code Mode test dispatcher also now uses its concrete native tool contract; the affected test type graph passes.
A late review found that Codex could truncate an admitted instruction body while reporting a successful read. The production-host-to-Codex response regression failed before repair. Oversized skill instructions now produce an explicit refusal within the existing output budget before presentation, observer, and transcript projection. All 87 installed-skill and dynamic-tool bridge cases pass in 59.44 seconds; ordinary result truncation is unchanged.
Final scoped review, plugin-aware typed lint, formatting, whitespace, and line-cap checks pass. The checked Codex source contract is
codex-rs/core/src/tools/handlers/dynamic.rsat4b0d9669cc46ba97bf85fa6312431b630d80498d: it consumes the response's content items and success flag directly.SkillsBench before/after proof is maintained separately; no live model result is claimed here.