ADE for working with a fleet of parallel agents
Go to file
Jinwoo Hong 66d596fe11
fix: zombie worktree PTY cleanup (issue #218) (#1376)
* fix(runtime): kill all PTYs for a worktree on removal (design §4.3)

Worktree deletion only shut down renderer-tracked terminals, so PTYs owned
by background tabs, split panes, or pre-reload sessions survived the
removal and kept leaking memory. Introduce killAllProcessesForWorktree
with three sweeps (runtime leaves, provider-prefix scan of daemon session
ids, pty-registry by worktreeId) and wire it into both teardown paths:
the CLI-initiated removeManagedWorktree and the renderer-initiated
worktrees:remove IPC handler. OrcaRuntimeService gets a lazy
getLocalProvider thunk so construction order stays robust.

Co-authored-by: Orca <help@stably.ai>

* fix(renderer): purge worktree-scoped state on removal + hydration (design §4.4)

When a worktree is deleted, ~25 worktree-scoped maps (tabsByWorktree,
git caches, browser state, split-tab models, per-file editor drafts,
etc.) kept references to the gone worktree, so SessionsStatusSegment
kept mis-classifying orphaned PTYs as bound and dropdowns rendered stale
ids. Add purgeWorktreeTerminalState as a single atomic action that
wipes every scoped map plus cascades top-level actives. Fire it from
the worktrees:changed listener on the set-diff of removed ids, and once
more at hydration via fetchAllWorktrees to clean up persisted entries
from pre-fix sessions. The hydration-time purge is gated behind a
per-repo success check: a single transient IPC error or an all-empty
fetch defers the purge so a degraded launch cannot wipe legitimate
persisted state.

Co-authored-by: Orca <help@stably.ai>

* test(zombie-worktree): regression coverage for design §4.5

Adds tests for every layer of the zombie-worktree fix:
- worktree-teardown: unit coverage of the three-sweep helper including
  best-effort error swallowing across provider/registry.
- orca-runtime: RPC-initiated removeManagedWorktree kills PTYs before
  any git mutation + verifies the lazy getLocalProvider thunk resolves
  on each call.
- worktrees IPC: renderer-initiated remove kills PTYs before git and
  skips the kill helper for SSH-backed repos.
- renderer slice: fetchAllWorktrees defers the purge when any sibling
  repo fetch fails or every repo returns empty (F1 regression);
  happy-path fires the purge once and does not re-run on subsequent
  calls. Direct purgeWorktreeTerminalState coverage pins the cascade
  across worktree-keyed, tab-id-keyed, and file-id-keyed maps.

Co-authored-by: Orca <help@stably.ai>

* fix(runtime): log worktree-teardown kill counts (design §4.4 observability)

Breadcrumb lets ops distinguish a renderer-state-induced leak (diff-path
purge non-empty) from a backend-induced one (nothing to kill but memory
still pinned). Emit only when the sweep actually shut anything down so
steady-state logs stay quiet. Added at both call sites —
removeManagedWorktree (CLI path) and the worktrees:remove IPC handler.

Co-authored-by: Orca <help@stably.ai>

* test(zombie-worktree): fix ptyIdsByTabId seed shape to match production type

The purge unit test seeded ptyIdsByTabId as Record<string, string> when
the runtime type is Record<string, string[]>. The unit tests passed
because they never hit the UI renderer, but live e2e surfaced a
TypeError: (ptyIdsByTabId[tabId] ?? []).some is not a function.

Corrected to arrays; 21/21 tests still pass.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-05-03 15:54:45 -07:00
.github fix: simplify release pipeline (#1362) 2026-05-02 14:17:21 -07:00
.husky fix(win32): resolve EPERM on userData writes, batch-file spawn failures, and native dep rebuild (#1152) 2026-04-26 22:29:58 -07:00
Casks feat(release): publish Orca as a Homebrew cask (#1304) 2026-05-01 00:33:21 -07:00
config fix(pty): release ptmx fd on natural exit + defuse SIGHUP-to-recycled-pid (#1327) 2026-05-02 23:12:14 -07:00
docs fix(pty): release ptmx fd on natural exit + defuse SIGHUP-to-recycled-pid (#1327) 2026-05-02 23:12:14 -07:00
resources feat: add experimental pet overlay (#1331) 2026-05-01 16:18:21 -07:00
skills feat(skills): add standalone orchestration skill (#1227) 2026-04-28 13:25:16 -07:00
src fix: zombie worktree PTY cleanup (issue #218) (#1376) 2026-05-03 15:54:45 -07:00
tests fix(terminal): force WebGL repaint after split when dimensions match (#1272) 2026-04-29 23:33:36 -07:00
.env.e2e feat: add idempotent E2E test suite with headless Electron support (#671) 2026-04-19 12:09:32 -07:00
.gitignore chore: remove tracked skills-lock.json (#1255) 2026-04-29 14:58:27 -07:00
.npmrc min release age = 1 day 2026-04-06 23:32:45 -07:00
.oxfmtrc.json
.oxlintrc.json
AGENTS.md docs(agents): note SSH use case in AGENTS.md (#1299) 2026-04-30 23:01:06 -07:00
CLAUDE.md feat: show merge conflicts in source control sidebar (#204) 2026-03-29 15:40:23 -07:00
LICENSE Add MIT license 2026-03-28 10:19:14 -07:00
PRIVACY.md feat(telemetry): PR 1 — foundations (types, consent, migration, PRIVACY.md) (#1372) 2026-05-03 13:13:26 -07:00
README.md feat(telemetry): PR 1 — foundations (types, consent, migration, PRIVACY.md) (#1372) 2026-05-03 13:13:26 -07:00
agent-nesting-options.html refactor(sidebar): drop agent identity icon + expand chevron from inline rows (#1359) 2026-05-02 11:12:29 -07:00
agent-nesting-stacked.html refactor(sidebar): drop agent identity icon + expand chevron from inline rows (#1359) 2026-05-02 11:12:29 -07:00
agent-row-design.html refactor(sidebar): drop agent identity icon + expand chevron from inline rows (#1359) 2026-05-02 11:12:29 -07:00
components.json
electron.vite.config.ts fix: bundle xterm deps into daemon-entry to fix packaged build crash (#759) 2026-04-17 09:29:29 -07:00
orca.yaml chore: trim orca.yaml comments (#1258) 2026-04-29 15:22:17 -07:00
package.json release: v1.3.33-rc.1 [rc-slot:2026-05-03-15] 2026-05-03 22:17:47 +00:00
pnpm-lock.yaml fix(pty): release ptmx fd on natural exit + defuse SIGHUP-to-recycled-pid (#1327) 2026-05-02 23:12:14 -07:00
tsconfig.json feat: Add SSH remote support (beta) (#590) 2026-04-13 19:23:09 -07:00

README.md

Orca Orca

Supported Platforms Discord Follow on X

English · 中文 · 日本語 · Español

The AI Orchestrator for 100x builders.
Run Claude Code, Codex, or OpenCode side-by-side across repos — each in its own worktree, tracked in one place.
Available for macOS, Windows, and Linux.

Download 🐋

Orca Screenshot

Supported Agents

Orca supports any CLI agent (not just this list).

Claude Code   Codex   Gemini   Pi   Hermes Agent   OpenCode   Goose   Amp   Auggie   Charm   Cline   Codebuff   Continue   Cursor   Droid   GitHub Copilot   Kilocode   Kimi   Kiro   Mistral Vibe   Qwen Code   Rovo Dev


Features

  • No login required — Bring your own Claude Code or Codex subscription.
  • Worktree-native — Every feature gets its own worktree. No stashing, no branch juggling. Spin up and switch instantly.
  • Multi-agent terminals — Run multiple AI agents side-by-side in tabs and panes. See which ones are active at a glance.
  • Built-in source control — Review AI-generated diffs, make quick edits, and commit without leaving Orca.
  • GitHub integration — PRs, issues, and Actions checks linked to each worktree automatically.
  • SSH support — Connect to remote machines and run agents on them directly from Orca.
  • Notifications — Know when an agent finishes or needs attention. Mark threads unread to come back later.

Install

Mac, Linux, Windows

Alternatively, install from a package manager:

macOS (Homebrew)

brew install --cask stablyai/orca/orca

Arch Linux (AUR)

# Precompiled binary
yay -S stably-orca-bin

# Build from GitHub source
yay -S stably-orca-git

[New] Annotate AI Diff

Comment directly on AI-generated diffs.

Annotate any line in an AI-generated diff with your feedback, then send it back to the agent to revise. Keep the review loop tight — no copying line numbers, no context switching.

Orca Annotate AI Diff — comment on AI-generated diffs and send feedback to the agent


[New] Hot Swap Codex Accounts

Multiple Codex accounts? Switch in one click.

If you run multiple Codex accounts to get the best token deal, Orca lets you hot-swap between them instantly — no re-login, no config files. Just pick an account and keep building.

Orca Codex Account Switcher — hot swap between multiple Codex accounts


[New] Per Worktree Browser & Design Mode

See your app. Click any element. Drop it into the chat.

Orca ships with a built-in browser right inside your worktree. Preview your app as you build, then switch to Design Mode — click any UI element and it lands directly in your AI chat as context. No screenshots, no copy-pasting selectors. Just point at what you want to change and tell the agent what to do.

Orca Design Mode — click any UI element and drop it into the chat


[New] Introducing the Orca CLI

Agent orchestration from your terminal.

Let your AI agent control your IDE. Use AI to add projects to your IDE, spin up worktrees, and update the current worktree's comment with meaningful progress checkpoints directly from the terminal. Ships with the Orca IDE (install under Settings).

npx skills add https://github.com/stablyai/orca --skill orca-cli

Community & Support

  • Discord: Join the community on Discord.
  • Twitter / X: Follow @orca_build for updates and announcements.
  • Feedback & Ideas: We ship fast. Missing something? Request a new feature.
  • Privacy: See PRIVACY.md for what anonymous usage data Orca collects and how to opt out.
  • Show Support: Star this repo to follow along with our daily ships.

Developing

Want to contribute or run locally? See our CONTRIBUTING.md guide.