Brennan Benson 67fc894c8e refactor(orchestration): give structured sessions an orchestration actor column (#22522)
* refactor(orchestration): give structured sessions an orchestration actor column

Adds nullable session:<id> actor columns to runs (coordinator) and
dispatch_contexts (assignee, creator) at schema v42, a shared codec, a
fill for rows that provably belong to a structured worker, and a
coordinator mail-address cache that remembers a handle-less coordinator
by its actor address.

* test(orchestration): pin the actor columns, their fill, cache and v40/v41 upgrade paths

* refactor(orchestration): fill structured-worker actors from one open-time call site

* fix(orchestration): refuse terminal handles as session actors and clear the assignee actor on reassignment

* test(orchestration): read the current schema version from its constant in the delivery downgrade contract

The contract asserted user_version 41 after old code reopens a database
current code wrote, so the v42 bump failed it. Assert SCHEMA_VERSION so
the next bump cannot strand it; the pre-v41 pin and its v40 stamp stay.

* fix(orchestration): count a Run's coordinator actor only at the generation it was written at

A binary without the actor column rebinds and unbinds a Run by rewriting its handle and pane,
which it cannot clear the actor beside. A rebind followed by an unbind leaves a row identical
to a live chat binding. Both writes bump consumer_generation, which every binary already
maintains, so the actor now carries the generation it was written at
(coordinator_actor_generation, set in the same statement) and counts only while the two are
equal. The coordinator cache, its triggers and the open-time fill read the actor through one
rule in run-coordinator-actor; the fill also replaces an actor an older generation left behind.

Still schema v42 (unreleased): the column joins migrate-v42 and the v42 skew-probe entries, so
a database stamped v42 without it replays the chain.

* refactor(orchestration): drop the unused coordinator-actor index and bare-id normalizer

Nothing in this stack looks a Run up by coordinator_actor: callers load the Run and compare its
current actor, so idx_runs_coordinator_actor would ship in every database with no reader. v42 is
unreleased, so it leaves the migration rather than needing a later drop. normalizeOrchestrationActor
had no caller outside its tests; bare session ids enter through sessionOrchestrationActor, and the
handle-refusal cases stay covered there and in parseOrchestrationActor.

* fix(orchestration): keep the coordinator-actor index the caller lookup needs

The next step finds a caller's Runs with one statement that ORs a pane-leaf
match with `coordinator_actor = ?`. SQLite splits that OR across two indexes
only when both sides have one; without idx_runs_coordinator_actor the plan
falls back to scanning every Run on each lookup. v42 is unreleased, so the
index returns to migrate-v42 rather than needing a later schema step.

* refactor(orchestration): store the Orca session id instead of an "actor"

"Actor" read as a new concept when the columns only ever named a structured
session. Rename them to what they hold: coordinator_orca_session_id (with its
_generation), assignee_orca_session_id and creator_orca_session_id, plus the
matching indexes, still added by migrate-v42 since v42 has not shipped.

The columns now store the bare Orca session id rather than session:<id>. The
session:<id> mail address is derived from ORCA_SESSION_ADDRESS_PREFIX where
mail needs it: the coordinator address triggers and the cache refill share
one SQL builder. isOrcaSessionId keeps refusing terminal-handle-shaped ids, and
the generation rule and backfill evidence rules are unchanged. A dev database
stamped v42 with the earlier *_actor columns replays the chain and gains the
new ones.

* fix(orchestration): remember every address a Run coordinator has, not the handle first

The v42 coordinator triggers and the on-open refill stored one address,
COALESCE(handle, session address), so a structured worker coordinator was
remembered by its handle only. Remember each address the coordinator has,
its handle and its current session address, each where present, so this
cache follows the same rule as bindRun and no precedence is persisted.

* docs(orchestration): define the Orca session id without a variable this change does not add

The shared codec's comment named ORCA_AGENT_SESSION_ID, which nothing in this
change defines, and ran one line past the wrap. It now says the stored id is
the one the agent is addressed by (a /clear'd chat's lineage root), as the
column comments do, and that PTY agents have none today rather than never.
migrate-v42's note stated the lineage rule twice; it is folded into one sentence.
2026-09-25 00:35:06 -07:00
2026-05-04 20:42:03 -07:00
2026-03-16 22:27:51 -07:00
2026-03-28 10:19:14 -07:00

Orca Orca

GitHub stars Total downloads across all releases License: MIT Join the Orca Discord Follow Orca on X Supported platforms: macOS, Windows, and Linux

中文 · 日本語 · 한국어 · Español · Français · Português

The AI Orchestrator for 100x builders.
Run Codex, ClaudeCode, OpenCode or Pi side-by-side — each in its own worktree, tracked in one place.

Download Orca

Orca desktop app running agents in parallel worktrees, with the Orca mobile companion app in the corner

Features

Mobile Companion

Monitor and steer your agents from your phone — get notified when an agent finishes and send follow-ups from anywhere.

iOS App Store · TestFlight · Android APK 0.0.50 · Docs →

Orca desktop with the mobile companion app

Parallel Worktrees

Fan one prompt across five agents, each in its own isolated git worktree — compare the results and merge the winner.

Docs →

Parallel worktree orchestration

Terminal Splits

Ghostty-class terminals with WebGL rendering, infinite splits, and scrollback that survives restarts.

Docs →

Terminal splits

Design Mode

Click any UI element in a real Chromium window to send its HTML, CSS, and a cropped screenshot straight into your agent's prompt.

Docs →

Embedded browser and Design Mode

GitHub & Linear, Native

Browse PRs, issues, and project boards in-app — open a worktree from any task and review without a context switch.

Docs →

GitHub and Linear task workflows in Orca

SSH Worktrees

Run agents on a beefy remote box with full file editing, git, and terminals — auto-reconnect and port forwarding included.

Docs →

Remote worktrees over SSH

Annotate AI Diffs

Drop comments on any diff line and ship them back to the agent — review, edit, and commit without leaving Orca.

Docs →

Annotate AI-generated diffs

Drag Files to Agents

VS Code's editor with autosave everywhere — drag files or images straight into an agent prompt.

Docs →

Drag files and images into an agent prompt

Orca CLI

Agents drive Orca too — script every workflow with orca worktree create, snapshot, click, and fill.

Docs →

Script Orca from the CLI

Also in the box:

  • Quick open — Search across worktrees, files, agents, commands, and repo context without leaving your flow.
  • Account switcher & usage tracking — See Claude and Codex usage and rate-limit resets, and hot-swap accounts without re-logging in.
  • Rich repo previews — Preview Markdown, images, PDFs, and repo docs in the workspace.
  • Computer Use — Let agents operate desktop apps and visible UI when a workflow needs real interaction.
  • Notifications and unread state — Know when an agent finishes or needs attention, then mark threads unread to come back later.
  • And many, many more — we ship daily, so this list is perpetually behind. The changelog is the real feature list.

Supported Agents

Works with any CLI agent — if it runs in a terminal, it runs in Orca.

Claude Code logo Claude Code   Codex logo Codex   Grok logo Grok   Cursor logo Cursor   GitHub Copilot logo GitHub Copilot   Muse logo Muse   OpenCode logo OpenCode   MiMo Code logo MiMo Code   Amp logo Amp   OpenClaude logo OpenClaude   Antigravity logo Antigravity   Pi logo Pi   oh-my-pi logo oh-my-pi   Hermes Agent logo Hermes Agent   Devin logo Devin   Goose logo Goose   Auggie logo Auggie   Autohand Code logo Autohand Code   Charm logo Charm   Cline logo Cline   Codebuff logo Codebuff   Command Code logo Command Code   Continue logo Continue   Droid logo Droid   Kilocode logo Kilocode   Kimi logo Kimi   Kiro logo Kiro   Mistral Vibe logo Mistral Vibe   Qwen Code logo Qwen Code   Rovo Dev logo Rovo Dev   + any CLI agent


Install

Desktop — macOS, Windows, Linux

Or via a package manager:

# macOS (Homebrew)
brew install --cask stablyai/orca/orca

# Arch Linux (AUR) — or stably-orca-git to build from source
yay -S stably-orca-bin

Mobile Companion — iOS, Android

Pair with your desktop app to monitor and steer your agents from your phone.


Community & Support

  • Discord: Join the community on Discord.

  • Twitter / X: Follow @orca_build for updates and announcements.

  • WeChat: Scan to join the Orca community WeChat group 10.

    WeChat group 10 QR code for the Orca community
  • Feedback & Ideas: We ship fast. Missing something? Request a new feature.

  • Privacy: See the privacy & telemetry docs 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.

The relay that pairs the mobile app with a desktop host is also in this repository under cloud/, with a separate pnpm workspace and setup guide.

Orca contributors

GitHub star history chart for stablyai/orca

Signed Builds

Windows code signing sponored/provided by SignPath.io, certificate by SignPath Foundation.

License

Orca is free and open source under the MIT License.

S
Description
Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
Readme MIT
1.4 GiB
Languages
TypeScript 95.1%
JavaScript 4.1%
Swift 0.2%
HCL 0.2%
CSS 0.1%