Brennan BensonandOrca bf1e925a1f perf(session): gate session-write subscriber on relevant field changes (#1720)
* perf(session): gate session-write subscriber on relevant field changes

The App-level Zustand subscriber that debounces buildWorkspaceSessionPayload
fires on every store update (agent status, usage refreshes, runtime title
ticks, …). Each fire reset the 150ms timer, and when the timer eventually
expired the rebuild crossed 70-110ms with many tabs open, tripping
setTimeout violation warnings. Add a shallow reference-equality gate over
the fields actually consumed by the payload so the timer only resets when
those fields change. The field list is co-located with
WorkspaceSessionSnapshot and locked to it via a compile-time exhaustiveness
check, so adding a future snapshot field will fail to typecheck rather
than silently skip the gate.

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

* test(session): regression test for session-write debounce gate

Extract the subscriber into createSessionWriteSubscriber so a vitest can
drive the real Zustand store and assert which mutations cause a session
write. The gate against unrelated updates (agent status, cache timers,
runtime title ticks) is load-bearing for setTimeout violation budgets
and the failure mode is silent — without this test, future store
additions could re-introduce the regression unnoticed.

Six cases lock in the contract: no write while not ready, exactly one
write when ready flips, no write on unrelated mutations, exactly one
write on a relevant mutation, coalescing within a debounce window, and
cleanup cancels a pending timer.

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

* perf(session): rebuild session payload from latest store state in debounce

Replace the closed-over `state` snapshot captured at timer-schedule time
with `store.getState()` inside the setTimeout callback. Today this is
behaviorally equivalent because `buildWorkspaceSessionPayload` reads only
SESSION_RELEVANT_FIELDS (the same fields gating the timer reset), but a
future refactor that adds a non-relevant field read to the payload builder
would silently start emitting stale values without this guard.

Also tighten the cleanup test: mutate the store after `cleanup()` and assert
no persist, so a regression where the timer is cancelled but the listener
is left subscribed would now fail rather than pass.

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-05-12 14:31:02 -07:00
2026-04-06 23:32:45 -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

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   Autohand Code   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] View Live Status of All Agents

See what every agent is doing — at a glance.

Track the live status of every agent across every worktree from one place. Spot which agents are working, waiting on input, or done — without clicking through tabs.

Orca Agent Statuses — view live status of all agents across worktrees


[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 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.

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.5 GiB
Languages
TypeScript 95.2%
JavaScript 4%
Swift 0.2%
CSS 0.2%
HCL 0.1%