Skip to content

fix(exec): fail closed without sandbox runtime - #81719

Closed
CommanderCrowCode wants to merge 1 commit into
openclaw:mainfrom
CommanderCrowCode:astronomican/exec-fail-closed-ms-20260514
Closed

CommanderCrowCode wants to merge 1 commit into
openclaw:mainfrom
CommanderCrowCode:astronomican/exec-fail-closed-ms-20260514

Conversation

@CommanderCrowCode

Copy link
Copy Markdown
Contributor

Summary

  • default omitted exec host config to sandbox instead of auto fallback
  • keep explicit host: auto as the opt-in path for gateway/node fallback
  • update exec runtime/config tests for the fail-closed default

Validation

  • corepack pnpm exec oxfmt --check src/agents/bash-tools.exec-runtime.ts src/agents/bash-tools.exec-runtime.test.ts src/agents/bash-tools.exec.path.test.ts src/agents/pi-tools-agent-config.exec.test.ts
  • corepack pnpm tsgo
  • node scripts/test-projects.mjs src/agents/bash-tools.exec-runtime.test.ts src/agents/bash-tools.exec.path.test.ts src/agents/pi-tools-agent-config.exec.test.ts
  • git diff --check

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 14, 2026
@clawsweeper

clawsweeper Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 11:51 PM ET / 03:51 UTC.

Summary
The branch changes omitted exec host resolution from auto to sandbox and updates exec runtime/path/agent-config tests so no-sandbox runs fail unless host: "auto" is explicit.

PR surface: Source 0, Tests +49. Total +49 across 4 files.

Reproducibility: yes. for the behavioral difference: source review shows current main routes omitted exec host through auto to gateway when no sandbox exists, while the PR changes that path to sandbox fail-closed. I did not run a live no-sandbox setup, so contributor proof remains missing.

Review metrics: 1 noteworthy metric.

  • Exec host default surface: 1 changed default. The diff changes omitted tools.exec.host resolution, which can affect existing no-sandbox setups during upgrade.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🧂 unranked krab
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted real no-sandbox runtime proof in the PR body or comments; redact IPs, API keys, phone numbers, private endpoints, and other sensitive details.
  • [P1] Get maintainer direction on whether omitted exec host may intentionally fail closed, or rework the patch to keep omitted host as auto.
  • Rebase onto current main and move retained agent-config coverage to the current test file.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists validation commands only and has no after-fix no-sandbox terminal output, logs, live output, recording, or linked artifact; add redacted proof and update the PR body so ClawSweeper re-reviews, or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging as-is would intentionally change omitted tools.exec.host from the documented auto-to-gateway fallback to sandbox fail-closed behavior, so existing no-sandbox setups can stop running commands until users add explicit host config.
  • [P1] The branch currently conflicts with main and modifies a Pi-named test file that has been replaced by src/agents/agent-tools-agent-config.exec.test.ts.
  • [P1] The contributor has not supplied redacted terminal output, logs, live output, a recording, or a linked artifact from an after-fix no-sandbox OpenClaw run.

Maintainer options:

  1. Keep the shipped default before merge (recommended)
    Preserve omitted tools.exec.host as auto and limit sandbox fail-closed behavior to explicit sandbox requests unless maintainers approve a breaking default change.
  2. Approve the breaking default explicitly
    Maintainers can intentionally adopt implicit sandbox fail-closed behavior, but the PR should first rebase, update docs/defaults, add upgrade guidance, and include real no-sandbox proof.
  3. Pause or close this branch
    If omitted-host policy is not settled, keep this PR unmerged or close it rather than landing an incomplete default change.

Next step before merge

  • [P1] Needs maintainer policy approval for the compatibility-sensitive default change plus contributor proof and rebase work, not a narrow automated repair.

Security
Cleared: No dependency, workflow, lockfile, secret, or supply-chain changes are present; the exec-boundary concern is compatibility and product-policy risk rather than a supply-chain regression.

Review findings

  • [P1] Keep omitted exec host on the documented auto default — src/agents/bash-tools.exec-runtime.ts:242
  • [P2] Move stale Pi exec coverage to the current agent test — src/agents/pi-tools-agent-config.exec.test.ts:79
Review details

Best possible solution:

Preserve omitted tools.exec.host as auto unless maintainers explicitly approve a coordinated breaking fail-closed default with docs, upgrade guidance, rebased tests, and real no-sandbox proof.

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

Yes for the behavioral difference: source review shows current main routes omitted exec host through auto to gateway when no sandbox exists, while the PR changes that path to sandbox fail-closed. I did not run a live no-sandbox setup, so contributor proof remains missing.

Is this the best way to solve the issue?

No. The patch is plausible hardening, but it is not the best fix as-is because it reverses a documented shipped default without maintainer approval, upgrade guidance, rebased coverage, or real behavior proof.

Full review comments:

  • [P1] Keep omitted exec host on the documented auto default — src/agents/bash-tools.exec-runtime.ts:242
    Changing the missing configured target from auto to sandbox makes no-host configs fail when no sandbox runtime exists, but current docs, tests, and shipped behavior define omitted tools.exec.host as auto with gateway fallback. Preserve auto unless maintainers approve a coordinated breaking default change with upgrade proof.
    Confidence: 0.94
  • [P2] Move stale Pi exec coverage to the current agent test — src/agents/pi-tools-agent-config.exec.test.ts:79
    This branch edits src/agents/pi-tools-agent-config.exec.test.ts, but current main no longer has that file and keeps the agent-config exec coverage in src/agents/agent-tools-agent-config.exec.test.ts. Rebase any retained assertions onto the current file before final review.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e.

Label changes

Label justifications:

  • P2: This is a normal-priority exec runtime hardening proposal with limited but real compatibility impact.
  • merge-risk: 🚨 compatibility: Changing omitted exec host behavior can break existing no-sandbox users who rely on the shipped auto gateway fallback.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists validation commands only and has no after-fix no-sandbox terminal output, logs, live output, recording, or linked artifact; add redacted proof and update the PR body so ClawSweeper re-reviews, or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source 0, Tests +49. Total +49 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 3 53 4 +49
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 54 5 +49

What I checked:

  • Live PR state: Live GitHub metadata shows this PR is open, external-contributor authored, mergeable=CONFLICTING, mergeStateStatus=DIRTY, and the PR body contains validation commands but no terminal output, logs, recording, or linked runtime artifact. (9e04efef54af)
  • PR changes omitted-host fallback: The PR changes the missing configured exec target fallback to sandbox, which makes omitted tools.exec.host select sandbox before runtime availability is checked. (src/agents/bash-tools.exec-runtime.ts:242, 9e04efef54af)
  • Current main keeps auto default: Current main still defaults an omitted configured target to auto and resolves auto to sandbox only when a sandbox runtime exists, otherwise gateway. (src/agents/bash-tools.exec-runtime.ts:238, 9d68f877ac3e)
  • Shared config resolver preserves auto: The shared exec defaults resolver falls through per-call, session, agent, and global config to auto, so this is a shared user-facing default rather than a local helper-only choice. (src/agents/exec-defaults.ts:88, 9d68f877ac3e)
  • Runtime caller path: The exec tool passes omitted per-call host through resolveExecTarget, and explicit sandbox without a sandbox runtime throws the sandbox-runtime error after target resolution. (src/agents/bash-tools.exec.ts:1655, 9d68f877ac3e)
  • Current tests define implicit auto fallback: Current tests assert implicit auto routes to gateway when no sandbox runtime is available and explicit host: "sandbox" fails closed without a sandbox runtime. (src/agents/bash-tools.exec.path.test.ts:415, 9d68f877ac3e)

Likely related people:

  • steipete: Commit history shows this handle introduced the implicit host=auto default and later clarified auto routing semantics in docs/runtime coverage. (role: exec default behavior introducer and adjacent reviewer; confidence: high; commits: 276ccd2583a9, 45c8207ef29c; files: src/agents/bash-tools.exec-runtime.ts, src/agents/bash-tools.exec-runtime.test.ts, docs/tools/exec.md)
  • scoootscooob: History shows overlapping fail-closed sandbox-unavailable work before later compatibility changes narrowed implicit auto behavior. (role: explicit sandbox fail-closed contributor; confidence: medium; commits: 5d81b6434339; files: src/agents/bash-tools.exec.ts, src/agents/bash-tools.exec.path.test.ts, docs/tools/exec.md)
  • vincentkoc: Recent exec policy history includes auto-routing and host-override work in the same resolver/test surface. (role: adjacent exec auto-routing contributor; confidence: medium; commits: 8540e658a791; files: src/agents/bash-tools.exec-runtime.ts, src/agents/bash-tools.exec-runtime.test.ts)
  • joshavant: History shows normalized exec mode/defaults work touching the shared defaults resolver, docs, and current agent-config exec coverage. (role: adjacent exec defaults contributor; confidence: medium; commits: 80227005a016; files: src/agents/exec-defaults.ts, src/agents/agent-tools-agent-config.exec.test.ts, docs/tools/exec.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label May 29, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels May 29, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jun 2, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 2, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 14, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 19, 2026
@clawsweeper

clawsweeper Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(exec): fail closed without sandbox runtime This is item 1/1 in the current shard. Shard 0/22.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jul 20, 2026
@steipete

Copy link
Copy Markdown
Contributor

Closing per ClawSweeper review verdict stalled_unproven_pr (decision packet 2026-07-19T16:09:52.635Z). This item was part of the audited close backlog (openclaw/clawsweeper#920) stranded by an apply-lane defect, drained manually after re-verification. If this is wrong, reopen and ClawSweeper will re-review.

@steipete steipete closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants