Skip to content

fix(sandbox): map E2B execution results#1332

Merged
EmersonBraun merged 1 commit into
mainfrom
codex/fix-e2b-exit-code
Jul 22, 2026
Merged

fix(sandbox): map E2B execution results#1332
EmersonBraun merged 1 commit into
mainfrom
codex/fix-e2b-exit-code

Conversation

@EmersonBraun

Copy link
Copy Markdown
Member

What changed

  • model the optional error returned by E2B Code Interpreter executions
  • map successful executions to exit code 0
  • map cell errors to exit code 1 and include their traceback in stderr
  • add regression coverage for successful and failed executions
  • include a patch changeset for @agentskit/sandbox

Why

E2B Code Interpreter does not expose an exitCode on its execution result. The previous adapter read that missing field, so callers could receive an undefined exit status and lose useful failure details.

Impact

Consumers of the E2B sandbox backend now receive the documented numeric exit code contract and actionable traceback output for cell failures.

Validation

  • pnpm --filter @agentskit/sandbox test — 131 tests passed
  • pnpm --filter @agentskit/sandbox lint
  • pnpm --filter @agentskit/sandbox build
  • pnpm --filter @agentskit/sandbox test:coverage — 90.09% statements, 92.61% lines
  • pnpm docs:bridge:gate
  • repository pre-push quality gates and full build
  • live E2B proof: JavaScript success (exit 0), Python success (exit 0), Python ZeroDivisionError (exit 1 with traceback), and sandbox disposal

@EmersonBraun
EmersonBraun marked this pull request as ready for review July 22, 2026 21:20
@EmersonBraun
EmersonBraun merged commit 4a27022 into main Jul 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant