Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 8:58 AM ET / 12:58 UTC. ClawSweeper reviewWhat this changesAdds an opt-in Merge readinessKeep this PR open: it presents a credible, evidence-backed implementation for the Docker-outage chat failure, but it introduces a public sandbox mode and changes a security-sensitive execution boundary that still needs explicit maintainer product sponsorship and a current-base review before merge. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw resolves sandbox policy before preparing an agent turn and builds the execution tools available to that turn. This PR changes that decision from session-wide activation to tool-triggered activation, affecting embedded exec, Codex app-server tools, policy diagnostics, and operator-facing sandbox documentation. flowchart LR
A[Operator sandbox config] --> B[Sandbox runtime policy]
B --> C[Chat turn preparation]
C --> D[Direct model reply]
B --> E[Sandbox-bound tool request]
E --> F[Lazy sandbox activation]
F --> G[Isolated execution or clear failure]
B --> H[Codex native tool gating]
Decision needed
Why: The implementation is broader than a localized bug repair: it adds a durable configuration mode and defines a new execution-isolation contract across core and the Codex extension. Before merge
Agent review detailsSecurityNone. PR surfaceSource +190, Tests +354, Docs +4. Total +548 across 49 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Sponsor Do we have a high-confidence way to reproduce the issue? Unclear. The PR supplies a detailed after-fix macOS Gateway and Codex app-server transcript, and the changed policy has focused tests, but this read-only review did not independently reproduce the Docker-unavailable baseline on current Is this the best way to solve the issue? Unclear. Lazy, fail-closed activation is a coherent solution to the reported outage, but adding a durable public sandbox mode is only the best solution if maintainers endorse that product and security contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2f80f87c32b5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing a chat prompt without a baseline reply and the PR returning the expected reply.
Motion-trimmed clips: |
|
A potential solution is to modify ui. What do you think? |
|
This pull request has been automatically marked as stale due to inactivity. |
c7e2161 to
f36938b
Compare
746a790 to
3168399
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
3168399 to
1212d3e
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |




Fixes #80296
What Problem This Solves
Resolves a problem where chat-only turns can fail whenever Docker is unavailable because
sandbox.mode: "all"creates the backend before the model can answer, even when the turn never invokes execution.Why This Change Was Made
This adds an opt-in
sandbox.mode: "needed"while leaving existing defaults unchanged. Chat setup uses run activation and does not create a backend;execuses tool activation, lazily resolves the configured sandbox once, and fails closed if the backend is unavailable. Codex app-server native shell, filesystem, MCP, and app-backed tools stay disabled while an auto/sandbox target is waiting for OpenClaw sandbox activation, while explicitgatewayand existingnodesemantics remain intact.The policy extension now validates and publishes
needed, and its effective exec-security evidence reports the sandbox default instead of hostfull.User Impact
Operators can keep normal chat available during a temporary Docker outage without allowing sandbox-bound exec to fall back to the host.
openclaw sandbox explainnow reports the direct run and sandbox-on-tool states separately.Evidence
pnpm tsgo:core,pnpm tsgo:extensions, andpnpm tsgo:extensions:test.pnpm buildpassed.pnpm lint:coreandpnpm lint:extensionspassed during this follow-up.git diff --checkpassed.Real behavior proof
Behavior addressed: With
mode: "needed", chat-only OpenClaw and Codex turns must work without Docker, while embedded exec and Codex-native execution must not fall back to the host.Real environment tested: An isolated macOS checkout running the actual OpenClaw Gateway, the managed QA mock provider, and a real Codex app-server. The Docker CLI was absent and
DOCKER_HOSTpointed at a nonexistent Unix socket.Exact steps or command run after this patch: Installed the exact lockfile with
pnpm install --frozen-lockfile, configuredagents.defaults.sandbox.mode="needed", then rannode --import tsx scripts/needed-sandbox-proof.tsfrom a disposable local proof harness. The harness sent chat and exec-canary turns through the real Gateway and Codex app-server.Evidence after fix:
Observed result after fix: Both chat-only paths completed successfully. Embedded exec attempted lazy sandbox activation, returned the Docker-unavailable error, and did not create its host canary. Codex exposed no native execution schema under pending
neededactivation and also did not create its host canary.What was not tested: This follow-up did not repeat the Docker-off case through the live Telegram transport; the linked Mantis artifact covers Telegram-visible behavior but not Docker availability. Live SSH and OpenShell backends were not exercised; registered-backend unit coverage verifies activation timing independently of Docker.
Focused command
Codex boundary basis
Codex's app-server protocol exposes fixed sandbox selections rather than an OpenClaw-owned lazy
neededtransition: seeSandboxModeand turn sandbox policy. Therefore, while OpenClaw has no active sandbox context, disabling the native surface is the fail-closed boundary; OpenClaw-owned dynamic tools remain the activation path where available.