fix(sandbox): use materialized skill paths in startup prompts#91791
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 10, 2026, 12:05 AM ET / 04:05 UTC. Summary PR surface: Source +130, Tests +118. Total +248 across 7 files. Reproducibility: yes. at source level: current main still builds the command/context skills prompt from the host reusable snapshot while sandboxed, and the linked issue reports a released Docker reproduction, but I did not run the live current-main failure locally. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge only after sandbox/security owner acceptance of the fail-closed prompt behavior, with OpenShell scope accepted as out-of-scope or tracked separately. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main still builds the command/context skills prompt from the host reusable snapshot while sandboxed, and the linked issue reports a released Docker reproduction, but I did not run the live current-main failure locally. Is this the best way to solve the issue? Yes for the Docker/SSH bug path: the PR reuses the existing embedded-run sandbox skill prompt mapping instead of inventing a second renderer, with the remaining decision limited to fail-closed behavior and backend scope. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against bf89552e6783. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +130, Tests +118. Total +248 across 7 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Added Blacksmith Testbox proof for the current PR head.
The local Windows wrapper/sync path still hits the known Blacksmith rsync/control-socket issue, so this used the direct SSH path to the warmed Testbox described in the repo maintainer tooling notes. The box was stopped and the ephemeral SSH key was deleted after proof. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review I updated the PR body with redacted live Docker sandbox proof for the rendered startup/context skills prompt:
The body also explicitly notes the remaining maintainer/security-owner acceptance gate for the fail-closed empty skills prompt behavior. |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review I updated the PR body with redacted live Docker sandbox proof for the rendered startup/context skills prompt, and the repo
The body also explicitly notes the remaining maintainer/security-owner acceptance gate for the fail-closed empty skills prompt behavior. |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
801d812 to
2553631
Compare
|
Maintainer fixes and pre-merge proof are complete. What changed after autoreview:
Verification on head
Known proof gap: the original reporter's exact Docker installation was not re-run manually; source-level regression coverage and the remote changed gate cover the corrected prompt path. |
…aw#91791) * fix(sandbox): use materialized skill paths in command prompts * fix(sandbox): resolve backend prompt workdirs * fix(sandbox): preserve custom backend prompt fallback --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
|
@brokemac79 Just checking - is this meant to be landed in 2026.6.6? It was just released, but I'm not sure if it included this fix. Below is after recreating the docker sandbox via
|
|
@gbb-netizen Thanks for the fresh 2026.6.6 repro. We are going to work this as a follow-up fix and will comment back here with the new PR reference when it is ready. Current read of the evidence:
Planned PR shape:
We will still treat the reporter's environment as useful confirmation, but there is enough source-level and screenshot evidence to start a focused follow-up PR. |
|
Follow-up PR is now open: #92508. Shape: the CLI run startup prompt path now rebuilds skill prompt entries from the sandbox materialized skills workspace when the session is sandboxed, instead of reusing the persisted host-path skill snapshot. That matches the evidence in the screenshot: #91791 landed in Proof in the PR includes a regression test starting from a persisted |
|
Hi @gbb-netizen - the new PR #92508 has now been merged into main |

Summary
Fixes #91761.
/workspace/.openclaw/sandbox-skills/skills/....CONTRIBUTING.mdcontributor guidance.AI-assisted: yes.
Linked context
Closes #91761.
Related: #90410 and #90798. PR #90798 fixed materialization/readability; this PR fixes the remaining startup-context prompt path that could still advertise host skill paths.
Requested by maintainer/user follow-up on #91761 after the reporter confirmed they were already on
v2026.6.5with an npm global install on WSL and a Docker sandbox.Real behavior proof (required for external PRs)
/workspace/.openclaw/sandbox-skills/skills/.../SKILL.md, not host/global npm paths such as~/.npm-global/lib/node_modules/openclaw/skills/gog/SKILL.md.node:24-bookworm,workspaceAccess=rw,containerWorkdir=/workspace, and PR head801d8125773da1cde355e820a7dc51c1e2a13309.The live proof uses
healthcheckbecausegogis correctly filtered out in a cleannode:24-bookwormsandbox when thegogbinary is unavailable. The exercised production path is the same sandbox prompt path mapper, and the negative checks still include the reporter'sgoghost/global path marker.The new command-prompt regression asserts the sandbox prompt contains
/workspace/.openclaw/sandbox-skills/skills/gog/SKILL.md, does not contain~/.npm-global, and does not call the host reusable skill snapshot resolver for the sandboxed path./newthread was not run.v2026.6.5, afteropenclaw sandbox recreate --all, Gateway restart, and/new, the model still tried to read host paths like~/.npm-global/lib/node_modules/openclaw/skills/gog/SKILL.mdeven though skills were materialized in the sandbox directory.Tests and validation
Focused commands run:
git diff --check-> passed.corepack pnpm exec oxfmt --check --threads=1 <touched files>-> passed.corepack pnpm exec oxlint --tsconfig config/tsconfig/oxlint.core.json <touched files>-> passed, 0 warnings/errors.node scripts/run-vitest.mjs src/auto-reply/reply/commands-system-prompt.test.ts src/agents/embedded-agent-runner/sandbox-skills.test.ts src/agents/sandbox.resolveSandboxContext.test.ts src/agents/sandbox/ssh-backend.test.ts-> passed, 30 focused tests across 2 Vitest shards.node --import tsx .tmp\live-sandbox-context-proof.mjswith Docker backendnode:24-bookworm-> passed; rendered<location>/workspace/.openclaw/sandbox-skills/skills/healthcheck/SKILL.md</location>, host/global path markers were false, and the Docker sandbox read returnedREAD_OK /workspace/.openclaw/sandbox-skills/skills/healthcheck/SKILL.md.codex review --base origin/main -c service_tier='"fast"'-> passed; no high-confidence regressions found.tbx_01ktqfw0c7e184n5h5v69reb1b, warmup Actions run https://github.com/openclaw/openclaw/actions/runs/27245431845, reset checkout toorigin/main, fetchedbrokemac79:fix/issue-91761-sandbox-skill-prompt, verified PR head801d8125773da1cde355e820a7dc51c1e2a13309, then ranenv OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 corepack pnpm check:changed-> passed withTESTBOX_EXIT=0.Regression coverage added or updated:
src/auto-reply/reply/commands-system-prompt.test.ts: covers sandbox command prompts using/workspace/.openclaw/sandbox-skills/..., excluding host npm paths, and avoiding host skill snapshot fallback.src/agents/embedded-agent-runner/sandbox-skills.test.ts: covers remapping sandbox skill prompts from materialized skill paths.src/agents/sandbox.resolveSandboxContext.test.ts: covers materialized skills workspace metadata and SSH remote workspace path propagation.src/agents/sandbox/ssh-backend.test.ts: existing coverage kept in the focused proof set for remote workspace behavior.Risk checklist
Did user-visible behavior change?
Yes.Did config, environment, or migration behavior change?
No.Did security, auth, secrets, network, or tool execution behavior change?
Yes, narrowly: sandboxed startup context now avoids advertising host/global skill paths and fails closed if sandbox skill metadata is unavailable.Highest-risk area: prompt construction for sandboxed sessions, because an incorrect fallback can either leak unreadable host paths back into the model context or omit usable sandbox skill paths.
Risk mitigation: sandbox prompt generation is now explicitly split between sandbox and non-sandbox paths, sandbox tests assert both inclusion of materialized sandbox paths and exclusion of host paths, and non-sandbox behavior continues to use the existing reusable workspace skill snapshot path.
Current review state
Next action: maintainer review and CI.
Still waiting on: maintainer/security review for the sandbox/security-sensitive behavior, including explicit sandbox/security owner acceptance of the fail-closed empty skills prompt behavior when sandbox metadata cannot be resolved.
Bot/reviewer comments addressed: ClawSweeper proof ask for redacted live Docker sandbox rendered prompt path proof.