- sandbox-control: an agent the person signs in inside each workspace gets mode 'inside' (keys
dropped as before) and the session env carries ORCA_SIGN_IN_INSIDE=<agents> (ORCA_*: never in
shells). The VM env script then leaves Claude's first-run onboarding unmarked while there is no
login in the workspace, so Claude opens on its own sign-in screens instead of 'Not logged in';
once ~/.claude/.credentials.json exists it is marked as usual. No golden rotation: the env
script reaches older snapshots through the boot-time entry-point refresh.
- Structured chats: a 'not signed in' verdict or start failure for such an agent reads
'{{agent}} needs you to sign in inside this workspace' with 'Open terminal to sign in', which
opens a terminal tab on the workspace running the agent's login (claude auth login, codex login
--device-auth), instead of the Orca-account Renew advice.
- Copy: the choice's detail adds 'Team API keys won't be used for this agent.' (strip, Settings
row, and the Settings button's tooltip).
MEMGUARD. A build or test that eats a cloud VM's memory now costs that process, not the workspace.
- orca-memguard (new VM entry point, root via sudo from orca-sandbox-start): ranks processes for the
kernel OOM killer (Orca runtime -900, terminal shells and agent CLIs -500, everything else 500),
stops the largest unprotected process when MemAvailable drops under 8% and records it, adds 2 GiB
swap files on demand (up to 1.5x RAM) and drops them after 10 quiet minutes, and remounts /dev/shm
at 50% of RAM (the provider mounts 64 MB). Reaches old snapshots through the entry-point refresh.
- orca-sandbox-drain releases on-demand swap before a stop so it doesn't ride the snapshot.
- Status read: the VM metrics probe reads the guard's state; status gains an optional memory
{pressure, guardKills, lastGuardVictim, ...} (metrics keeps its strict shape for older desktops).
- Desktop: guard kills count in the OOM tracker and show 'Orca stopped <process> to keep the
workspace responsive' with a Machine size action; the sidebar row gets a quiet memory mark under
pressure (amber when critical).
A per-person default Source 'in-workspace' for Claude and Codex. Orca stores and injects nothing
for that agent: no account placeholder, no API key, and so no egress route on the vendor's
hosts. The agent starts as it is and shows its own sign-in in the pane; its token stays in the
workspace's home directory and survives sleep.
- sandbox-control: migration 0062 widens agent_sources.source (table rebuilt, rows kept);
PUT /v1/agent-sources accepts 'in-workspace' as a default only (400 with workspaceId);
agentModesFor maps it to 'omit'; GET adds inWorkspace per agent while defaults/effective
keep their two values for older desktops.
- Desktop: coverage kind 'inWorkspace' (no hold, no per-host sign-in gate on Orca Cloud);
'Set up once' strip gets a quiet ⋯ choice 'Sign in inside this workspace instead' that
saves the choice and starts every launch held on it; Settings › Cloud agent sign-ins offers
it on a not-set-up row and shows 'Signs in inside each workspace' with a way back.
- Tests: Worker (env, open/limited policy, live switch, migration) and renderer (model, hold,
spawn gate, strip, settings, build row); fixtures for the strip menu and the settings row.
A create or new environment with nothing pinned used to start in pdx1 whatever the caller's location,
and every frame of a remote session paid that round trip. Now the sandbox-control Worker ranks the
served regions (the default and its fallbacks with an active golden) by distance from Cloudflare's
request geolocation and starts in the nearest.
- Explicit regions (request, API project) and an environment's build region stay authoritative.
- Environments record their region (migration 0061): builds, golden refreshes, staleness and the
security floor use it, so snapshots stay bootable and workspaces from them stay together. Legacy
environments (NULL) live in the default region as before.
- Automatic environments live where the create that made them ran.
- The capacity fallback tries the next nearest served region.
- The warm pool keeps VMs in every served region.
- VERCEL_NEAREST_REGION=off restores default-region-only.
- Desktop: the workspace card's Details shows the region (e.g. Portland (pdx1)).
Ask for Orca GitHub App access while the sandbox starts, not in a toast afterwards.
Server (sandbox-control):
- GET /v1/github/repo-access answers `push`: ok | not_installed | repo_not_selected |
not_connected, with `configureUrl` (the installation's settings page) for repo_not_selected.
A public repo that can't push now gets an install URL too.
- GitHub installation lookups (repo and new owner lookup) cached in D1 (migration 0061):
found 60 s, 404 15 s, dropped by installation / installation_repositories webhooks and the
setup return. The owner lookup never holds the answer (3 s cap, errors read as not_installed).
Desktop:
- "GitHub access" row after Start sandbox, checked when the create starts (parallel, so no
latency when access is fine). Missing: Install GitHub App / Add repository on GitHub /
Copy request for an owner, plus Skip for now ("You can pull; pushes need access later").
Polls (2 s for 3 min, then 10 s; on focus) and auto-advances on grant.
- The create holds before Open workspace only while the step asks and the sheet is on screen.
- Skip remembered per repo on this device; later creates show it skipped (Set up) without
holding; forgotten once the repo has access.
- A grant that lands after the sandbox started calls applyCloudGitHubAccessToSandbox, a stub
until gh-access's live refresh lands.
chatgpt.com answers Cloudflare Workers' egress with a 403 "Unable to load site" page, so Codex via
the Orca account could never get an answer through the egress proxy (#767 made that a printed
error). Cloud Run's egress is answered normally (probed, then deleted).
- cloud/apps/chatgpt-relay: a dependency-free Node relay. chatgpt.com only, the same Codex path
pinning as the Worker (shared sandbox-control/src/codex-paths.ts), SSE streamed chunk by chunk,
no WebSocket upgrades, hop and Cloud Run headers dropped, logs without headers, bodies or queries.
- Cloud Run IAM authenticates the Worker: one invoker service account (run.invoker on the relay
only); the Worker mints a Google ID token for the relay URL and sends it in
X-Serverless-Authorization, so the swapped ChatGPT Authorization passes through untouched.
- sandbox-control: CHATGPT_RELAY_URL + CHATGPT_RELAY_SERVICE_ACCOUNT route the egress proxy's
chatgpt.com fetches through the relay; unset, chatgpt.com goes direct as before. A relay
sign-in failure answers Codex a 503 JSON detail instead of reaching chatgpt.com.
- cloud/infra/chatgpt-relay: Terraform (staging backend applied; production is a runbook step).
Neil: the Orca Cloud GitHub App notice sank when hovered and popped back when the pointer left,
in a loop, and looked cut off while it did. Sonner sizes an expanded toast to the height it measured
when the toast was issued. The cloud toasts update their copy in place, so a card that grew after it
showed kept its first, shorter height: on hover it shrank from the top, sank 20px out from under
the pointer, collapsed and came back.
- cloud-toast-stack re-issues a card under the same id when its content changes, so sonner
measures it again (no re-add, no animation, same identity).
- The front toast keeps its natural height when the stack expands, as it does when collapsed, so
no toast can resize under the pointer however its content changed.
Positions are unchanged: the card sits 16px from the right edge and clear of the status bar.
Regression: fixture orca-cloud/CloudToastHover:grownAfterShowing fails before (766→786) and passes
after; a unit test pins the re-issue.
Neil got "Forwarded :34719 to localhost:34719 · codex · sand23 · Open": Codex's own listener on an
ephemeral port, forwarded and announced as if it were his app. Auto-forward now skips:
- a listener whose process is an agent CLI (claude, codex, opencode, gemini, cursor-agent, …; by
binary name, path, .exe or platform suffix), on any port;
- an anonymous ephemeral port (>= 32768) with no known web protocol and no URL the workspace
printed: an agent's MCP child, a language server, a debugger.
Dev servers keep auto-forward: usual ports (3000, 5173, 8080, …) and any port whose URL the terminal
printed. An earlier auto forward of an agent port retires once idle, as for any non-candidate.
The toast says what happened in the user's terms: "Your app on port 3000 is available at
localhost:3000", and "3 apps are available on this computer" for several.
OpenCode's first run in a VM installs its plugin SDK into ~/.config/opencode, creates its database and fetches its model list (first launch 5.2 s vs 2.7 s warm; in a pane on a fresh VM ~11 s, with the opencode process starting 0.7 s after the click, so the time is OpenCode's own). orca-sandbox-start now runs `opencode models` (does all of it, no credentials, exits) in the background at nice 19 right after orca-sandbox-env writes the config, only while ~/.config/opencode/node_modules is missing (once per disk; wakes skip it).
Neil: an Orca Cloud part inside Settings › Agent accounts was confusing. The Claude and ChatGPT
sign-ins for cloud workspaces (set up, paste a token, renew, remove) are now their own page in the
Orca Cloud group, right after Account & billing. Agent accounts keeps This computer and Hosts and
one row, "Orca Cloud sign-ins live in Orca Cloud settings", that opens the new page.
Every deep link moves with it: Renew in Settings, the sign-in sheet's footer, the host panel, and
old links to pane 'accounts' at 'orca-cloud' / 'accounts-orca-cloud' (resolveCloudAgentSignInsTarget).
Copy that sent people to "Settings → Agent accounts" for Orca Cloud now says "Settings → Cloud agent
sign-ins" (new i18n keys so stale translations don't point at the old place), including
sandbox-control's expired-Claude and RS-4 Codex messages. Search: the Orca Cloud keywords
(subscription, chatgpt, setup-token, renew) move to the new page. Behavior is unchanged.
chatgpt.com answers every request from Cloudflare Workers' egress IPs with a 403 "Unable to load
site" HTML page, whatever the token (verified from a throwaway Worker; the same request from
elsewhere gets a normal 401). Codex via the Orca account goes through the Worker egress proxy, so
it got that page on /responses and /wham/usage: "Working…" without an answer, and /status had no
limits.
The proxy now recognises a provider edge's own refusal (403, text/html, server: cloudflare) on
routes that define an answer for it, logs egress_upstream_blocked, and answers Codex in ChatGPT's
error shape so Codex prints a plain message. The block says nothing about the credential: no
status hook, so no refresh and no revoke. This doesn't make Codex work; routing chatgpt.com around
the Worker is a separate decision.