You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
This error ("Failed to start VM: Sandbox not found") originates from the server-side E2B sandbox infrastructure, not from the desktop app itself. The desktop app connects to cloud-hosted E2B virtual machines for "sandbox mode" chats, and this error indicates the backend failed to provision or locate a sandbox VM during account setup.
Codebase Context
The app has two chat modes (src/renderer/lib/atoms/index.ts:879-887):
Local mode — worktree-based chats stored in local SQLite
Sandbox mode — cloud-based E2B sandboxes, accessed via URLs like https://3003-{sandboxId}.e2b.app
Sandbox interactions are handled through backend API endpoints:
src/renderer/lib/remote-api.ts — remote chat/sandbox API client (getSandboxDiff, getSandboxFile, export endpoints)
src/main/lib/git/sandbox-import.ts — sandbox state import/export logic
src/renderer/features/agents/main/active-chat.tsx — sandbox setup status tracking (sandboxSetupStatus, sandboxSetupError)
The error strings "Failed to start VM" and "Sandbox not found" do not appear anywhere in the desktop app source code, confirming this is a server-side error message being surfaced to the user.
Subscription & Auth Flow
The signup flow uses billing methods defined in src/renderer/features/onboarding/billing-method-page.tsx:32-75, with "Claude Pro/Max" (claude-subscription) as the recommended option. User plan data is fetched from the backend via src/main/auth-manager.ts:259-278 (/api/desktop/user/plan).
Related Issues
Build from source, failed to fork sandbox #31 (closed) — "Build from source, failed to fork sandbox" — different root cause (corrupted node-pty binaries from postinstall script), not related
No previous issues match this specific server-side VM provisioning error.
Likely Cause
This appears to be a backend/infrastructure issue rather than a desktop app bug. Possible causes:
E2B sandbox provisioning failure — the backend couldn't spin up a VM during account setup
Transient server-side error — the sandbox was created but became unavailable before the client could connect
Account/subscription state mismatch — the signup process may not have fully completed before a sandbox was requested
Suggested Next Steps
Retry signup — if this was a transient infrastructure issue, retrying may resolve it
Check if the account was created — try signing in again; the subscription may have been activated despite the error
Clear app data and retry — on macOS: rm -rf ~/Library/Application\ Support/Agents\ Dev/ (for dev) or ~/Library/Application\ Support/1Code/ (for production), then relaunch
Server-side investigation needed — the 1Code team should check E2B sandbox provisioning logs for sandbox ID 8lfjd8 to determine why it wasn't found
This issue likely needs attention from the backend/infrastructure team since the error originates server-side.
Thanks for reporting this. Here's what I found after reviewing the codebase:
What's happening
The "Failed to start VM: Sandbox not found" error originates from the server-side sandbox provisioning, not from the desktop app itself. During the Claude Code Max signup/authentication flow, the app calls the backend endpoint /api/auth/claude-code/start which creates a cloud sandbox (running on E2B infrastructure) for your session (src/main/lib/trpc/routers/claude-code.ts:174-195).
The error message (Failed to start VM 8lfjd8: Sandbox not found) indicates the server attempted to start a VM with ID 8lfjd8 but the sandbox resource could not be located — this is a server-side/infrastructure issue, not a client-side bug.
Transient infrastructure issue: The E2B sandbox backend may have been temporarily unavailable or the specific VM template was not found
Account provisioning timing: If the Claude Code Max subscription was just initiated, the sandbox quota/allocation may not have been fully provisioned yet
Region/availability: Sandbox availability may vary by region
Suggested workarounds
Retry: Close and reopen the app, then try the sign-up flow again — the sandbox provisioning may have been a transient failure
Check subscription status: Verify that the Claude Code Max subscription completed successfully on the billing side before retrying
Clear app state (if retries fail):
# macOS
rm -rf ~/Library/Application\ Support/Agents\ Dev/
# Then restart the app
For maintainers
This likely needs investigation on the server/infrastructure side (the /api/auth/claude-code/start endpoint and E2B sandbox provisioning). The desktop app is correctly surfacing the error from the backend — no client-side code change would resolve this.
The error "Failed to start VM: Sandbox not found" originates from the server-side sandbox creation during the Claude Code OAuth flow. When you select "Claude Code Max" as your billing method during onboarding, the app calls the 21st.dev backend (/api/auth/claude-code/start) to spin up a temporary CodeSandbox VM that handles the Anthropic OAuth exchange. The error indicates that the server-side sandbox (VM 8lfjd8) either failed to provision or was not found by the orchestration layer.
The actual sandbox provisioning happens on the 21st.dev server, not in the desktop app. The desktop app simply forwards the request and displays the result.
Root cause
This is a server-side infrastructure issue, not a client-side bug. The "Sandbox not found" error suggests one of:
The CodeSandbox/E2B VM provisioning service returned an error or was temporarily unavailable
The sandbox 8lfjd8 was created but terminated or became unreachable before the client could poll it
A transient infrastructure issue on the 21st.dev backend
Not a duplicate
Previously closed sandbox-related issues (#103 and #31) are unrelated:
Retry — Click the "Connect" button again or restart the onboarding flow. The sandbox provisioning is often transient.
Use API key instead — Go back to the billing method selection and choose "API Key" to bypass the sandbox-based OAuth flow entirely. You can use an Anthropic API key from console.anthropic.com.
For maintainers
Some improvements that could help with this class of errors:
Better error messaging: The raw "Failed to start VM: Sandbox not found" is opaque to users. The startAuth error path at claude-code.ts:188 could surface a more actionable message (e.g., "Authentication service temporarily unavailable, please retry").
Automatic retry with backoff: The startAuth mutation in the onboarding page fires once on mount. Adding retry logic (e.g., 2-3 attempts with exponential backoff) before showing an error would improve resilience.
Server-side investigation: Check the 21st.dev backend logs for sandbox 8lfjd8 to determine why it was not found — provisioning failure, timeout, or infrastructure issue.
#Retry: Close and reopen the app, then try the sign-up flow again — the sandbox provisioning may have been a transient failure
Check subscription status: Verify that the Claude Code Max subscription completed successfully on the billing side before retrying
Clear app state (if retries fail):
Activity
21st-connector commentedon Apr 29, 2026
🤖 Automation triggered: Implement ISSUE
I'm starting to work on this automatically.
View live progress
Powered by 1Code
21st-connector commentedon Apr 29, 2026
🤖 Automation triggered: Analyze Github Issue
I'm starting to work on this automatically.
View live progress
Powered by 1Code
21st-connector commentedon Apr 29, 2026
Issue Triage
Summary
This error ("Failed to start VM: Sandbox not found") originates from the server-side E2B sandbox infrastructure, not from the desktop app itself. The desktop app connects to cloud-hosted E2B virtual machines for "sandbox mode" chats, and this error indicates the backend failed to provision or locate a sandbox VM during account setup.
Codebase Context
The app has two chat modes (
src/renderer/lib/atoms/index.ts:879-887):https://3003-{sandboxId}.e2b.appSandbox interactions are handled through backend API endpoints:
src/renderer/lib/remote-api.ts— remote chat/sandbox API client (getSandboxDiff,getSandboxFile, export endpoints)src/main/lib/git/sandbox-import.ts— sandbox state import/export logicsrc/renderer/features/agents/main/active-chat.tsx— sandbox setup status tracking (sandboxSetupStatus,sandboxSetupError)The error strings "Failed to start VM" and "Sandbox not found" do not appear anywhere in the desktop app source code, confirming this is a server-side error message being surfaced to the user.
Subscription & Auth Flow
The signup flow uses billing methods defined in
src/renderer/features/onboarding/billing-method-page.tsx:32-75, with "Claude Pro/Max" (claude-subscription) as the recommended option. User plan data is fetched from the backend viasrc/main/auth-manager.ts:259-278(/api/desktop/user/plan).Related Issues
node-ptybinaries from postinstall script), not relatedNo previous issues match this specific server-side VM provisioning error.
Likely Cause
This appears to be a backend/infrastructure issue rather than a desktop app bug. Possible causes:
Suggested Next Steps
rm -rf ~/Library/Application\ Support/Agents\ Dev/(for dev) or~/Library/Application\ Support/1Code/(for production), then relaunch8lfjd8to determine why it wasn't foundThis issue likely needs attention from the backend/infrastructure team since the error originates server-side.
21st-connector commentedon Apr 29, 2026
Issue Analysis
Thanks for reporting this. Here's what I found after reviewing the codebase:
What's happening
The "Failed to start VM: Sandbox not found" error originates from the server-side sandbox provisioning, not from the desktop app itself. During the Claude Code Max signup/authentication flow, the app calls the backend endpoint
/api/auth/claude-code/startwhich creates a cloud sandbox (running on E2B infrastructure) for your session (src/main/lib/trpc/routers/claude-code.ts:174-195).The error message (
Failed to start VM 8lfjd8: Sandbox not found) indicates the server attempted to start a VM with ID8lfjd8but the sandbox resource could not be located — this is a server-side/infrastructure issue, not a client-side bug.Relevant code path
startAuthmutation fires (claude-code.ts:178)POSTto{apiUrl}/api/auth/claude-code/startwith the desktop token{ sandboxId, sandboxUrl, sessionId }Not a duplicate
The two previously closed sandbox-related issues are unrelated:
sandbox: falseconfig (security hardening, not VM provisioning)postinstallscript issue withelectron-rebuildPossible causes
Suggested workarounds
For maintainers
This likely needs investigation on the server/infrastructure side (the
/api/auth/claude-code/startendpoint and E2B sandbox provisioning). The desktop app is correctly surfacing the error from the backend — no client-side code change would resolve this.21st-connector commentedon Apr 29, 2026
Issue Analysis
What's happening
The error "Failed to start VM: Sandbox not found" originates from the server-side sandbox creation during the Claude Code OAuth flow. When you select "Claude Code Max" as your billing method during onboarding, the app calls the 21st.dev backend (
/api/auth/claude-code/start) to spin up a temporary CodeSandbox VM that handles the Anthropic OAuth exchange. The error indicates that the server-side sandbox (VM8lfjd8) either failed to provision or was not found by the orchestration layer.Relevant code path
startAuthmutation on mount —src/renderer/features/onboarding/anthropic-onboarding-page.tsx:92src/main/lib/trpc/routers/claude-code.ts:174-196claude-code.ts:188and surfaced in the UI via theonErrorcallback atanthropic-onboarding-page.tsx:101-106The actual sandbox provisioning happens on the 21st.dev server, not in the desktop app. The desktop app simply forwards the request and displays the result.
Root cause
This is a server-side infrastructure issue, not a client-side bug. The "Sandbox not found" error suggests one of:
8lfjd8was created but terminated or became unreachable before the client could poll itNot a duplicate
Previously closed sandbox-related issues (#103 and #31) are unrelated:
webPreferences.sandbox: false) — a security config, not VM provisioningelectron-rebuildcorruptingnode-ptybinaries during build from sourceSuggested workaround
For maintainers
Some improvements that could help with this class of errors:
startAutherror path atclaude-code.ts:188could surface a more actionable message (e.g., "Authentication service temporarily unavailable, please retry").startAuthmutation in the onboarding page fires once on mount. Adding retry logic (e.g., 2-3 attempts with exponential backoff) before showing an error would improve resilience.8lfjd8to determine why it was not found — provisioning failure, timeout, or infrastructure issue.🤖 Generated with Claude Code
heyalbert commentedon Apr 29, 2026
Tried this. Keeps failing. Active Claude Code subscription. Claude Code with Max subscription works in terminal.
This is a new 1Code user account.
heyalbert commentedon May 4, 2026
Update. New error message when trying to authenticate with Claude: Failed to start auth: Bad Gateway.
