Repository navigation
fix: let remote Codex app-servers use library skills instead of an unreadable Gateway path - #201491
Conversation
…vers A remote Codex app-server reads skills with its own file tools, so a Skill Library pin listed at its Gateway state path cannot be opened there. With remoteWorkspaceRoot set, library entries now point at skills_read when it is offered, and are left out of the catalog when it is not. Local app-servers are unchanged.
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces inaccessible Gateway library-skill paths with remote loading guidance while preserving skills already copied into the remote workspace. Example: A remote Codex app-server lists the pinned release-guide skill with skills_read available.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR addresses a current remote skill-loading defect and resolves both earlier findings; no actionable code defect remains in the reviewed diff. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Codex plugin receives the Gateway's prepared skill catalog and available tools, adapts its loading guidance, and sends it through the existing native instruction carrier. flowchart LR
A[Gateway skill snapshot] --> B[Codex instruction renderer]
C[Remote workspace and available tools] --> B
B --> D[Native Codex instructions]
D --> E[Remote model]
E --> F[Gateway skills_read]
E --> G[Delivered workspace files]
Technical reviewBest possible solution: Adapt inaccessible library locations in the existing Codex instruction renderer while retaining the canonical catalog, host reader, and delivered workspace copies. Do we have a high-confidence way to reproduce the issue? Current-main catalog forwarding and production snapshot construction establish the inaccessible-path case, corroborated by the linked real-install ENOENT trace; no target code was executed during this review. Is this the best way to solve the issue? The focused adapter preserves existing catalog budgeting and skill-read authority, and its separate helper has a clear rendering responsibility without adding state or a competing delivery owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0b18f610d325. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +53, Tests +73. Total +126 across 4 files. Added test files: 1. 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 (2 earlier review cycles)
Reviewed November 18, 2026, 7:56 PM ET / November 19, 2026, 00:56 UTC (Revision 3). |
The skills catalog renders home-compacted paths (~/...) while the snapshot keeps canonical paths, so matching location strings missed library entries on a normal install. Library entries are now matched by name. When skills_read is not offered, the entry stays listed with a note that its instructions cannot be read on this machine instead of being dropped.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
A remote-exec placement copies pinned skills into the worker workspace before the turn and lists them at that copy, which the remote app-server can read. Only library entries outside remoteWorkspaceRoot are rewritten now.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…readable Gateway path (openclaw#201491) * fix(codex): keep Gateway-only library skill paths from remote app-servers A remote Codex app-server reads skills with its own file tools, so a Skill Library pin listed at its Gateway state path cannot be opened there. With remoteWorkspaceRoot set, library entries now point at skills_read when it is offered, and are left out of the catalog when it is not. Local app-servers are unchanged. * fix(codex): match remote library skills by name and keep them listed The skills catalog renders home-compacted paths (~/...) while the snapshot keeps canonical paths, so matching location strings missed library entries on a normal install. Library entries are now matched by name. When skills_read is not offered, the entry stays listed with a note that its instructions cannot be read on this machine instead of being dropped. * fix(codex): keep library skills already copied into the remote workspace A remote-exec placement copies pinned skills into the worker workspace before the turn and lists them at that copy, which the remote app-server can read. Only library entries outside remoteWorkspaceRoot are rewritten now.
…readable Gateway path (#201491) * fix(codex): keep Gateway-only library skill paths from remote app-servers A remote Codex app-server reads skills with its own file tools, so a Skill Library pin listed at its Gateway state path cannot be opened there. With remoteWorkspaceRoot set, library entries now point at skills_read when it is offered, and are left out of the catalog when it is not. Local app-servers are unchanged. * fix(codex): match remote library skills by name and keep them listed The skills catalog renders home-compacted paths (~/...) while the snapshot keeps canonical paths, so matching location strings missed library entries on a normal install. Library entries are now matched by name. When skills_read is not offered, the entry stays listed with a note that its instructions cannot be read on this machine instead of being dropped. * fix(codex): keep library skills already copied into the remote workspace A remote-exec placement copies pinned skills into the worker workspace before the turn and lists them at that copy, which the remote app-server can read. Only library entries outside remoteWorkspaceRoot are rewritten now. (cherry picked from commit 44f24d8) Co-authored-by: RomneyDa <[email protected]>
…readable Gateway path (openclaw#201491) * fix(codex): keep Gateway-only library skill paths from remote app-servers A remote Codex app-server reads skills with its own file tools, so a Skill Library pin listed at its Gateway state path cannot be opened there. With remoteWorkspaceRoot set, library entries now point at skills_read when it is offered, and are left out of the catalog when it is not. Local app-servers are unchanged. * fix(codex): match remote library skills by name and keep them listed The skills catalog renders home-compacted paths (~/...) while the snapshot keeps canonical paths, so matching location strings missed library entries on a normal install. Library entries are now matched by name. When skills_read is not offered, the entry stays listed with a note that its instructions cannot be read on this machine instead of being dropped. * fix(codex): keep library skills already copied into the remote workspace A remote-exec placement copies pinned skills into the worker workspace before the turn and lists them at that copy, which the remote app-server can read. Only library entries outside remoteWorkspaceRoot are rewritten now. (cherry picked from commit 44f24d8) Release adaptation: approved 2026.11.7 models replay; see models-hook-safe-v2/REPORT.md. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
With a remote Codex app-server (
appServer.remoteWorkspaceRoot), the skills list shown to the model gives each Skill Library skill a location in the Gateway's state directory (<state>/skill-library/<id>/revisions/<rev>/SKILL.md). The model reads skills with Codex's own file tools on the remote machine, where that path does not exist, so the read fails and the skill is silently not followed.User Impact
User impact: on a remote Codex app-server, library skills are listed with a pointer to
skills_read(which reads the pinned revision on the Gateway) instead of a path the model cannot open. Whenskills_readis not offered, library skills stay listed by name and description with a note that their instructions cannot be read on this machine, instead of a broken path. Local app-servers (a child of the Gateway) and every other placement are unchanged.Why This Change Was Made
The Codex extension passes the core skills catalog through as is. When the app-server is remote, it now finds the Skill Library entries by name (from the snapshot's resolved skills) and replaces their
<location>line with a<location_note>: one that namesskills_read, or, withoutskills_read, one that says the instructions cannot be read on this machine.Library skills that a remote-exec placement has already copied into the worker workspace keep their location: the snapshot lists them at that copy, under
remoteWorkspaceRoot, where the app-server can read them.Entries are matched by name, not by path: the rendered catalog shows home-compacted paths (
~/.openclaw/...) while the snapshot keeps canonical ones. The change adjusts the rendered catalog rather than re-rendering it, because the catalog is built and budgeted in core before the harness runs; re-rendering it in the extension would duplicate that budget and path compaction.Without
skills_readthe options were inlining each SKILL.md body, dropping the entry, or keeping it with a note. Inlining would read every pinned body from Gateway disk on every turn (the catalog keeps only a content hash) and grow the prompt with instructions the turn may never use. Dropping hides a skill the user pinned. The note is one line per entry and tells the model, and through it the user, why the skill cannot be followed. Other skill sources keep their locations.Accepted limits: only SKILL.md is reachable this way. Supporting files of a library skill are still not delivered to a remote app-server; that would need a copy step and is left for a follow-up.
Evidence
A new fake app-server test runs a full attempt with a library skill and a workspace skill and checks the developer instructions sent on
thread/start, for a remote app-server withskills_read, a remote one without it, a remote one whose library skill was already copied into its workspace (noskills_read), and a local one. The catalog in the test shows the library skill at a home-compacted path while the snapshot keeps the canonical path, as production snapshots do. (The production snapshot builder is core code that extension tests cannot import without a new SDK export, so the test reproduces its output shape.)dynamic-tool-skills.test.ts) still pass.main, and on this PR's first head (which matched by path), the two Gateway-path remote cases fail (the compacted Gateway path is still listed). On the previous head (which rewrote every library entry), the copied-skill case fails (its readable location was replaced by the note).oxfmt --checkandoxlinton the touched files,pnpm tsgo:extensionsandpnpm tsgo:extensions:test: clean.Commands
Run on a remote test VM from a snapshot of
main(c5ef395) plus this change:This patch has not been run against a live remote app-server and model. The problem itself on a real install, with the catalog listing the Gateway path,
catfailing with ENOENT on the remote machine, andskills_readby name working once the tool is allowed: openclaw/openclaw-enterprise#6509 (comment)