#805·flue

e2b blueprint: exec throws on non-zero exit instead of returning exitCode

Author: hellovietducCreated Oct 1, 2026Updated Oct 1, 2026

Describe the Bug

in sandbox/e2b@1, exec calls commands.run(), which throws CommandExitError on any non-zero exit ([email protected]). so exec rejects instead of returning exitCode, and the error doesn't include the command or stderr.

the blueprint's comment saying commands.run() returns { stdout, stderr, exitCode } directly is wrong for non-zero exits too.

Expected Behavior

non-zero exits resolve with { stdout, stderr, exitCode }. something like:

typescript
.catch((error) => {
  if (error instanceof CommandExitError) return error;
  throw error;
});

Steps to Reproduce

  1. flue add sandbox e2b
  2. await sandbox.exec('exit 3')
  3. rejects with CommandExitError: exit status 3