Skip to content

Fix E2B hosted startup on fresh installations - #855

Merged
SaladDay merged 1 commit into
mainfrom
fix-e2b-hosted-startup
Oct 24, 2026
Merged

SaladDay merged 1 commit into
mainfrom
fix-e2b-hosted-startup

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

A real E2B run (fresh Compose install of f5ecb85 behind a public HTTPS origin, template built from its Runtime image) found two E2B adapter faults that together kept every E2B Session from starting.

  • State directory. Since the Compose installer replaced the Python one, nothing creates the adapter's private /state/e2b, and Config.Validate requires it, so POST /core/v1/sandbox/deployment with E2B returned 503 execution_unavailable. The adapter now creates it (0700) when Core loads the Provider.
  • Omitted domain. The E2B API omits the domain of a sandbox on the configured one: SDK Sandbox objects fill in the configured domain, SandboxInfo leaves None. Every GetInfo check (create qualification, inspect, renew, resume) therefore rejected an owned sandbox as foreign (configuration_rejected, "initialization did not complete"). An omitted domain now counts as the configured one; a reported foreign domain is still refused.

Tests: TestBuildDirectCreatesItsPrivateStateDirectory; test_info_without_a_domain_is_on_the_configured_one (fails without the fix). make check-e2b-provider (196 tests), go test ./internal/sandbox/e2b/, module-wide go vet.

Live check: with the fixed helper swapped into that installation, a codex hosted Turn on E2B completes.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay merged commit c895dea into main Oct 24, 2026
19 checks passed
@SaladDay
SaladDay deleted the fix-e2b-hosted-startup branch October 24, 2026 15:31
A real E2B run on a fresh Compose installation found two adapter faults
that together kept every E2B Session from starting:

- Nothing created the adapter's private /state/e2b since the Compose
  installer replaced the Python one, so selecting E2B failed with 503
  execution_unavailable. The adapter now creates the directory (0700)
  when Core loads the Provider.
- The E2B API omits the domain of a sandbox on the configured one. SDK
  Sandbox objects fill it in, SandboxInfo leaves None, so every check of
  GetInfo (create qualification, inspect, renew, resume) rejected an owned
  sandbox as foreign. An omitted domain now counts as the configured one;
  a reported foreign domain is still refused.
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