Skip to content

fix(cli): preserve unresolved sandbox failures across unrelated tools - #4389

Open
jsiu93 wants to merge 1 commit into
apache:mainfrom
jsiu93:fix/run-sandbox-failure-recovery-tool-name
Open

fix(cli): preserve unresolved sandbox failures across unrelated tools#4389
jsiu93 wants to merge 1 commit into
apache:mainfrom
jsiu93:fix/run-sandbox-failure-recovery-tool-name

Conversation

@jsiu93

@jsiu93 jsiu93 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Track the failed tool name with each unresolved sandbox failure. A later success now proves recovery only when it comes from the same tool in a different Step. An unrelated tool_search leaves a failed Read unresolved, so non-interactive boundary denial returns exit code 1 with empty stdout.

Fixes #4388

Verification

mise exec node@24.19.0 -- npx -y npm@11.19.0 --workspace maka-agent run build
mise exec node@24.19.0 -- node --test --test-name-pattern "keeps a sandbox failure unresolved" packages/cli/dist/__tests__/runtime-host-run-command.test.js
Before fix: 0 pass, 1 fail, exit 1

Before the fix, the failing assertion received exit code 0; it expected 1.

mise exec node@24.19.0 -- node --test --test-name-pattern "sandbox failure|sandbox boundary|boundary request" packages/cli/dist/__tests__/runtime-host-run-command.test.js
After fix: 11 pass, 0 fail, exit 0

mise exec node@24.19.0 -- node --test packages/cli/dist/__tests__/runtime-host-run-command.test.js
36 pass, 0 fail, exit 0

A live CLI run against the patched build returned 1 after 21 seconds, kept stdout empty, and retained the non-interactive sandbox boundary diagnostic on stderr.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: pi (gpt-5.6-sol), human-reviewed

Checklist

  • Tests cover the change, with a red test recorded before the fix
  • The CLI build and affected test file pass locally

Does this PR entail a change in behavior?

  • Yes, described under Summary above
  • No

Track the failed tool name with each unresolved sandbox failure.
Require a later success from that tool before classifying boundary recovery.

Generated-by: pi (gpt-5.6-sol)
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cli): maka run exits 0 after a denied sandbox boundary

1 participant