A sandbox destroyed out of band (the team list's Delete for a workspace
this desktop doesn't run, or the control plane) left its runtime record,
server and project here. After a restart its clone came back as a stray
folder project with a "Couldn't start" row.
The team filing's list now runs at startup and every 10 minutes too, and
hands each successful list to a prune. A record filed under that team
that the list omits is retired only on proof: a second consecutive list
without it, or GET /v1/sandboxes/:id answering not found or destroyed.
Errors, offline, a team switch while confirming, a create in flight, or
another or unknown team's record never retire anything, and asleep
(suspended/archived) sandboxes stay listed so they are never touched.
Retiring follows the app's own delete: the record is cleaned and its
server released and retired, and the window's catalog refresh purges the
host's project and setup.
A team switch hid the old team's sandboxes from every list, but the main
pane kept showing the one that was open. When the active workspace's host
goes from in-team to out of scope (team or account switch), clear the
active workspace as a host removal does; its terminals stay, since the
sandbox is still the old team's. Only that edge counts, so a launch whose
team or runtimes are still loading keeps a restored cloud workspace.
Bug 6: a team switch left the previous team's cloud workspace in the
sidebar (as its own project header) and kept its lease scheduler, wake
and orcad calls running under the new team's token.
- Orca Cloud runtime records carry the owning control-plane account
(cloudAccountId, sandbox-control's org:<id> / user:<id> form), read
once at the create write-ahead from the active profile.
- Backfill: on the 30 s beat and on every auth change, list the active
team's sandboxes (GET /v1/sandboxes is scoped to the caller's account)
and file the listed records under that team; it re-lists only when the
team or the unfiled set changes, and drops a list that answered for a
team the user has since left.
- The session registry, OOM polling and the window's cloud workspace ids
skip every record outside the active team, so the old team's sandboxes
get no keep-alive or orcad calls after a switch.
- Sidebar rows, the jump palette and project headers hide another team's
sandbox hosts and any whose team is unknown (or when signed out).
Bug 7 (per coordinator): every Orca Cloud sandbox's primary clone stays
hidden; each cloud workspace row appears once.
Each Orca Cloud workspace is its own sandbox host whose clone is registered
as the project there (orca-worktree mode, hosted-sandbox-driver.ts), with
the workspace as a worktree beside it. The clone was listed as a primary
row, so every cloud workspace added another identical
'master [primary] · Orca Cloud' row under its project. Sidebar lists and
the jump palette now hide primary checkouts on Orca Cloud hosts, reusing
the VM-create hidden-checkout filter.
An unreachable Orca Cloud sandbox (asleep, gone, or another team's) was
classified as a network host and got the 'connect both devices to
Tailscale' hint; cloud hosts now keep the plain message.
- Signed out, the composer can't check GitHub yet, so 'Set up and start' asked the session for the
plan only. The browser then ended on 'You're all set' while the composer still needed GitHub.
A GitHub project now always asks a signed-out session for GitHub; the chain marks it done on its
own when access is already there.
- With the composer following its session, the session's GitHub row is the only source of truth.
The control plane's notice to billing is best effort, so also take the desktop's own repo-access
poll: once it reaches the repository, the GitHub row is done and the start goes ahead.
- The composer read the setup session with a bare readCloudSetupSession() call in render. The React
Compiler memoizes that on the session id, so the panel kept its first (empty) read: rows never
moved past 'In browser', the finished session never auto-started the workspace, and the GitHub
row stayed 'Needed' after the browser said 'You're all set'. Read it through
useCloudSetupSession (useSyncExternalStore with a per-poll cached snapshot) instead.
- Billing asked the control plane for the GitHub install URL with a plain fetch to its workers.dev
origin. Same-account Workers can't do that (Cloudflare error 1042), so every setup GitHub step
showed 'Orca Cloud setup is unavailable'. Bind the control plane as a service (SANDBOX_CONTROL)
in the dev config and send the request through it when bound.
Found by the NP-4 end-to-end run (np4-e2e) on m4air against staging.
- A6 tracker (CloudSetupBrowserTracker) on w2's OrcaCloudSetupPanel: steps tick in
place, rows derived from billing show the first open row as "In browser",
Cancel setup / Copy setup link / Reopen browser. Links come from a new seam
provider (setCloudSetupLinkProvider) that np4-setup registers.
- X1 (CloudSetupErrorNotice): timed out, checkout canceled, bank step (3DS),
trial unavailable (owner/member), team create failed, wrong account.
- B2 (CloudSetupSwitchTeam): on a personal account, a team with a plan replaces
the plan row with "Switch to <team>" (a menu for several), using the account
menu's switcher; Start is aria-disabled with "Switch to <team> first".
- Composer wiring in use-cloud-start-composer / ProjectSection / Footer, and
time-to-first-sandbox telemetry at auto-start.
- Fixtures: B1, B2 (single + menu), X1 sheet, tracker states.
1. P1: on Orca Cloud the sandbox's own sign-in probe can't see an Orca-account sign-in (it holds
placeholders), so the environment check's agent row now reads the account:
- covered by the account or a key (orcaCloudAgentCoverage account/key): no row;
- not set up: Warning '{{agent}} isn't set up for Orca Cloud yet.' / 'Set it up once in Settings ->
Agent accounts. Every cloud workspace uses it.'; expired: renew copy;
- kill switch / not offered: per-workspace wording matching the build-sheet row, never 'isn't set up';
- not read yet: no row; API-key agents (Gemini, Cursor, Copilot, OpenCode): Cloud secrets copy.
Non-cloud recipe VMs keep the host copy. cloud-agent-check-copy.ts + unit tests.
2. DS-33: the 7 NewWorkspaceComposerProjectSection:orcaCloudSelected* fixtures (pre-#273 dropdown,
page error from the unmocked agent-accounts bridge) are removed. Entitled and after-checkout are
covered by run-on/CloudStart (eReturning, t1); the billing-blocked states move to the segmented
control as run-on/CloudStartBilling:{noPlanOwner,noPlanMember,outOfHoursMember,spendCapMember,
paymentIssueAdmin}. The cloud check fixtures seed the account state (no bridge calls); new
VmBuildSheet:cloudChecksAgentCovered. All 93 new-workspace fixtures shoot with no page errors.
* feat(cloud): DS-40 Fix with agent for failed Orca Cloud environment builds
A failed environment build (Settings > Orca Cloud > Cloud environments) now offers, to admins on the
latest build, Try again next to Show error, plus Fix with agent when the install script is what failed.
Fix with agent opens the composer on Orca Cloud with the prompt prefilled ('The environment build
failed at {{step}}. Fix the install script so the build succeeds.'), the current install script and the
log lines already visible in the viewer (redacted, 60 lines / 6 KB, fences neutralized). The new cloud
workspace boots from the environment's last good build, or a blank sandbox if none succeeded, as every
new cloud workspace does. orca cloud env only works on the desktop, so the agent hands back the full
fixed script for an admin to save and rebuild.
Install scripts only run in environment builds (never during a workspace create), so this lives on
the environment panel's failure summary rather than the create sheet.
* fix(cloud): DS-40 design follow-ups: two actions, and clone failures
(a) The failed-build summary drops Show error: the failed step already opens on its error, and the
summary title now jumps back to it (log scrolled, collapsed or virtualized). Actions are Try again
(outline) and Fix with agent (ghost). The unused cloudEnvironment.log.showError key is pruned.
(b) Clone failures: from the visible log, repo-content failures (submodules, LFS, paths that can't be
checked out) offer Fix with agent with 'The environment build failed while cloning {{repo}}. Fix
the repository setup so the clone succeeds.' (no install script attached; the agent fixes the repo
on a branch and opens a PR). Access and auth failures offer Give access (GitHub install for that
repo), never an agent. Anything unrecognized, or a clone log that isn't loaded, offers neither.
New fixtures panelCloneFailedContent / panelCloneFailedAccess; classifier and helper unit tests;
fixture spec 3/3.
* fix(cloud): DS-22 composer a11y: shared focus ring, no open on Tab focus, no buttons inside Run on options
- Project, parent, Run on, name, advanced fields and the create-multiple switch draw focus with the
shared --focus-ring token (input.tsx / button.tsx patterns) instead of ring-ring/50.
- Project and Run on comboboxes no longer open on focus; they open on typing, ArrowDown,
Alt+ArrowDown or click. Fixtures and unit tests open them by click.
- Run on needs-setup rows: Connect and Set project location are button-styled spans (pointer only,
as before), so no option nests an interactive control (axe nested-interactive). The unused
setLocationOnHost key is pruned from the catalogs.
- tests/component-fixtures/new-workspace-composer-a11y.spec.ts: tab-walk, focus-ring token,
open keys and a nested-interactive check over the open lists, light and dark (repo has no axe).
* fix(cloud): DS-22: the parent worktree trigger is a combobox field shell, not a restyled <Button>
- A16 panel WSL rows: 'Account: {{name}} (selected in Accounts)', read from this computer's
settings (the selection the desktop pushes to the distro), so a stopped distro is never started.
- Classic SSH probe (private): hasLogin when an API key signs the agent in, from presence-only
checks on the host (Claude: credentials file or macOS Keychain item existence, no -w/-g;
Codex: grep -q for a refresh_token key). Each prints only yes/no; no value is read or returned.
S3 shows 'API key overrides sign-in' (needs attention, Review); the panel row says the same.
- LOW-1: login output is read as complete, capped lines (4 KB) with bounded link tokens; Codex's
prompt is parsed over the last 12 lines; a host that prints 256 KB without a sign-in link fails
the flow. No quadratic rescans of a hostile stream.
- LOW-2: Claude's link is pinned to Claude Code's own OAuth app (client_id
9d1c250a-e61b-44d9-88ed-5944d1962f5e) and paste-code callback (https://platform.claude.com/oauth/
code/callback), both read from the CLI (2.1.318-2.1.322); the last pinned link on a line wins, so a
login-shell banner can't supply it. claude-pasted-code-login.ts (touched by #40228) is not edited.
- LOW-3: status checks are keyed by target and connection generation (no report reused across a
reconnect); a forced ask while one runs queues one follow-up instead of opening more sessions.
- A connection dropped after the code is sent reports disconnected, not rejected.
Spec v4 §4 annotations 4-5, Q8. Main runs the CLIs' own status commands (claude auth status --json,
codex login status) over the host's SSH exec only while it is connected, 60 s cache per target;
only verdicts reach the renderer. Code sign-in runs Claude's paste-code login and Codex's device
code over SSH exec (no callback, no forward): the pasted code goes to the CLI's stdin, never argv;
codes, tokens and CLI output are never logged. The A16 panel's classic-SSH rows get Sign in (inline
paste / device code), Sign out, the dated last report and the spec's disabled reason while
disconnected; S3 checks classic SSH hosts the same way. No #40228 file edited.
Private layer only; no #40228 file changes (its exports are read, not edited).
- cloud-agent-launch-hold: a cloud Claude/Codex launch decides from the Orca account (cached read,
never the sandbox). Ready or covered by a key: no hold, no delay. Expired or revoked with no key:
held on the strip until Renew in S0 fixes it; every held pane starts together.
- cloud-agent-credential-spawn-gate: installed outside #40228's spawn gate from
deferred-cold-restore-and-snapshot.ts (one line).
- CloudAgentSignInStrip: the 56 px strip (redesign §6) overlaying the pane top while the agent hasn't
started (no terminal layout change): needExpired with Renew (card 13), and #40228's per-workspace
sign-in steps on cloud with the kill-switch / never-offered copy. Fixed slots; width class decided
at mount; region, not a dialog; one polite sentence per state.
- AgentPanePortals: cloud panes with a gate get the strip; SSH, WSL and paired hosts keep #40228's card.
Playwright AC-1: every strip state keeps identical boxes (wide and narrow sets).
Spec v4 §7: a real table under S0, hosts as rows, Claude and Codex as columns, with the §7 cell
vocabulary. Orca Cloud is one row ('all your cloud workspaces'): Your Orca account or the winning
key per agent; the kill switch and a never-offered provider change only its cells. Rows open the
A16 panel (click or Enter; Review focuses that agent's row); Check again re-asks one host; the
Orca Cloud row opens S0. All · Needs attention filter, attention rows first, expired derived from
the last cached verdict, one polite summary after the first pass. Probes: awake, connected hosts
only, at most four at once, each from its own 60 s cache, no polling; stopped, suspended,
disconnected and unreachable hosts are never asked (tests assert it).
Section 1 for this computer, SSH with an Orca server, WSL, recipe VMs and paired hosts: each agent's
verdict from accounts.agentSignInStatus (cached report first, asked once per open and only while the
host can answer; stopped, suspended, disconnected and unreachable hosts are never started, resumed or
connected), 'Sign out…' moved here from the host ⋯ menu (HostAgentSignOutDialog stacks above the
sheet), disabled with its reason via aria-disabled + tooltip. Classic SSH says it can't check yet.
Section 2: this computer's Agent API keys that apply to the host. Section 3: the spec's one line, or
the recipe env-forwarding warning. The host ⋯ menu's single 'Agent accounts & secrets…' now shows for
every remote host. Fixtures for all kinds; tests assert no host call while it can't answer.
The per-host panel (spec v4 §4) as one right-side sheet: header (title, dot, host · kind · state),
three sections and footer links, driven by hostCapabilities(kind, availability) for all seven kinds
(exact hidden/disabled/help copy). Orca Cloud renders now:
- Section 1 'Agents' from the Orca account (no probe): From your Orca account / winning key, the
lock line, the two-way Source per workspace (setWorkspaceSource), disabled with its reason via
aria-disabled + tooltip when shared, archived or unreadable; kill switch and never-offered rows.
- Sections 2-3: W6's CloudAgentKeysSection / CloudEnvironmentPanelSection (numbered 2, 3) with the
A6 'Save to your Orca account' offer as extra key rows.
Entry points: openAgentHostPanel({hostId, focus}); the host ⋯ menu's one 'Agent accounts &
secrets…' on Cloud hosts (replacing the sign-out group there), and 'Agents and secrets · summary'
in the Cloud workspace status panel. A test asserts opening it never wakes, starts, resumes or
connects anything. Also design-squad's nit: 'This sign-in stays with this workspace.'
The NP-3 Agents row reads a never-offered provider as its sign-in-here state (reason notOffered:
'Signs in for each cloud workspace for now', never 'paused', never Set up). Settings collapses the
Orca Cloud section to 'Claude and Codex sign in for each cloud workspace for now.' when neither
provider is offered (design-squad).
GET /v1/agent-credentials adds providerState {claude, codex: on|off|disabled} next to providerEnabled.
Clients read it through orcaCloudProviderState (older servers: disabled = kill switch; a state that
contradicts providerEnabled is never trusted). Flag off is a new 'unavailable' kind: Settings says
it isn't available in Orca Cloud yet (no 'right now / until it's back'), and the composer hides the
Agent row like an agent without an account path. Kill-switch copy is unchanged.
- One row from the Orca account, never the sandbox: 32 px ready line when every agent is ready at
mount, otherwise 48 px; every later state renders inside that height (Playwright: measured layout
shift 0, logs toggle never moves).
- R2 Set up runs S0's setup inline for each agent in turn; device code, browser, paste, failed,
expired, kill switch (per-workspace sign-in, queued until the sandbox answers), A6 desktop key.
- ⋯ menu: Source per agent in this workspace (new per-workspace setWorkspaceSource / workspaceSources
IPC; main resolves the sandbox id from its own runtime records), Manage agent accounts.
- Removes the v3 'Add an agent' build step and the per-sandbox Cloud sign-in row from the sheet.