Jinwoo Hong 86b93e02a7 feat(mobile): the microphone owns the wake lock, and the stop reply carries the tail (OTA phase C, ruling 36) (#22072)
* feat(mobile): give the microphone its own screen lock (OTA phase C, ruling 36)

An open microphone holds the screen; a closed one gives it back. The lock
lives in the device-side capture on both hosts — the shell's
`native.audio.start|stop` handler and the native seam — so the page never
decides anything about the screen.

One tag per capture, minted by the module that owns the mic. Both captures
give it back on every close path: a stop, a page session ending with the
capture open, a device that would not begin, and an engine that throws after
the capture is open, which now ends the capture rather than leaving it live.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* feat(mobile): carry the capture's tail on the stop reply (OTA phase C, ruling 36)

`native.audio.stop` drains what the ring still holds into its own reply, so
the page's `end()` is one verb: stop, hand the bytes on, done. The drain,
await and read-once-more ordering goes with it, and so do `ending`,
`reading` and `released` — three variables that existed only to order a last
read against the stop and to stop a refused read re-entering `end`.

The tail fields default rather than being required: the page updates over
the air and the shell does not, so a page this new can meet a shell that
answers `stopped` alone. That dictation loses its tail where a required
field would have lost it the stop.

The heap case from PR D's bot round cannot recur: `end` issues no read, and
a stop reply carries no interruption, so the lane that re-entered is gone.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* refactor(mobile): drop the dictation finish id, which ordered nothing

`finishingIdRef` tracked the dictation a stop was finishing, and every state
it could name was already named: `cancel`, a disable, an unmount and a newer
start each bump the generation or clear the active id, so the finish guard
answered the same either way. Its one distinguishing arm released pending
audio bytes for a dictation whose budget `closeDictationAudio` had just
reset, and could subtract those bytes from a newer dictation's reserve.

`acceptingChunksRef` stays: it is what stops a late microphone event being
sent after the capture handed over its tail and before the finish goes out.
`pendingChunksRef` stays: `stop` awaits it so the finish cannot overtake the
last chunk send.

The finish guard is pinned by a case that cancels while the finish is in
flight; neutered, it reds.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* feat(mobile): delete the page's wake-lock seam (OTA phase C, ruling 36)

The page never names the screen now. `native.wakelock.set` is gone with its
schemas, its shell server, its grant rows and its harness entry; so are the
page's keep-awake owner, the Android foreground re-acquire, and the
`DictationKeepAwakeDevice` the capture contract carried. One module holds
the screen — the device calls the microphone's capture makes — and both
device-side captures share its one tag, because there is one microphone.

Deleted: native-wakelock.ts (120), native-wakelock.test.ts (140),
mobile-dictation-keep-awake.ts (248), mobile-dictation-keep-awake.test.ts
(440), mobile-dictation-foreground-keep-awake.ts (78). With the tag pools
gone, the desktop-start flow has one stale check instead of two, no startup
budget to wait out and nothing to release.

A source-scanning census pins it: no module under mobile/src or mobile/app
but the one owner imports expo-keep-awake, and nothing anywhere names the
retired verb. It reports the file and line, and checks the owner does import
the package so the absence is the rule holding and not the match missing.

KNOWN RED, reported and not recorded over: 25 golden cases in the speech.*
families fail. The recorder adapter had to drop its keep-awake owner, which
moves `adapterSha256` for every golden that mounts it, and the deleted
owner's id minting shifts the deterministic random sequence, so the recorded
`dictationId` values move too. No speech.dictation.* param, reply or
operation changed. Awaiting the lead's call on a scoped re-record.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record the corpus after the wake-lock deletion

Baseline bumped to 491eb35b4d and the corpus recorded against it. Every
changed line in `goldens/` falls into six classes and nothing else:

  baseline                            1574 lines   787 goldens
  lockfileSha256                      1574 lines   787 goldens
  adapterSha256                         38 lines    19 goldens
  scenarioSha256                         8 lines     4 goldens
  dictationId shift                    728 lines     4 goldens
  keep-awake effects + renumbering      63 lines     2 goldens
                                      ----
                                      3985 lines, which is the whole diff

`recorderSha256` is untouched: no recorder module outside `adapters/` moved.

The id shift is attributable arithmetic, not a behaviour change. The
recording scheduler seeds `Math.random` with an LCG from seed 1; replaying
it gives draw 1 `8ig2henseon` and draw 2 `dakoxjr8wun`. The deleted
keep-awake owner minted its id from draw 1 during the hook's mount, so the
dictation id took draw 2. With the owner gone the dictation id takes draw 1,
which is why four scenario steps that pinned the literal value move with it.

`adapterSha256` covers `speech.setup-sheet` as well as the three dictation
families, because one adapter module hosts them all. The two goldens with
vanished effects also renumber the ordinals after them, which is what the
removal of an entry from a sequential counter does.

`lockfileSha256` is provenance that `compareGolden` copies from the actual
and never fails on. It moves in all 787 files because main's own
`mobile/pnpm-lock.yaml` has moved since the corpus was last recorded; this
branch does not touch it.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* fix(mobile): drop the retired wake-lock grant C7.7's route row carried

The merge brought in the session route's manifest entry, which names all
four dictation grants including `native.wakelock.set`. This branch deleted
that verb, so the row granted a page something the shell no longer serves.
Ruling 32 item 6 said C7.7 takes the dictation grant from PR D's census in
this merge; this is that.

Nothing caught it automatically: the shell-side grant list is derived from
the verb tuple and is already three, and the closure census holds a route to
the grants it needs rather than refusing ones it does not.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): repin the session-route closure at the measured 4,331

Measured on this merge rather than summed: 4,331 modules, 989 local.

Main is red here on its own pin. `3cfb070294` measures 4,333 / 991 against a
committed 4,330, three modules this branch never touched — measured in a
throwaway worktree detached at that commit, with the same generators run.
This merge measures 4,331 / 989, and diffing the two local lists gives the
difference exactly: `mobile-dictation-keep-awake.ts` and
`mobile-dictation-foreground-keep-awake.ts` leave, and nothing joins. So the
branch's own effect is the -2 ruling 36 implies, and repinning to the
measurement is also what takes main's closure test green again.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): repin the session-route closure at 4,331 on the merge with #22067

Measured on this merge: 4,331 modules, 989 local, against main's freshly
repinned 4,333 / 991 at `3cfb070294`.

Both provenances kept. #22067 names the three `src/shared` modules #21924
pulled into the page closure, which is what made main's earlier 4,330 stale;
this branch's own -2 is the page's wake-tag owner and its Android foreground
re-acquire, deleted by ruling 36. Diffing the two local lists gives exactly
those two leaving and nothing joining, so the number is a reading rather
than 4,333 minus an argument.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* fix(mobile): close the capture when the desktop start fails

The hook opens the microphone before it asks the desktop for a session, so a
refused session left the mic open — and, since the screen rides the mic, the
display held until the user cancelled, retried, or the screen unmounted. The
failure arm now runs the same `rollbackRecordingStart` the commit failure
does, because "undo the capture this start opened" is one thing and the hook
owns it; guarded like that arm, so a seam that throws on the way down cannot
take the desktop cancel with it.

Red-first on both hosts. Natively, a new test drives the real seam under the
engine and keep-awake mocks: the refusal used to leave `initialize` with no
`toggleRecording(false)` and a held screen. On the page, the mic control's
own test over the port pair saw `native.audio.start` with no
`native.audio.stop`. Two unit cases pin the call itself, including for a
start nobody will report.

Ruling 36's own words: mic closed means released. This closes the mic rather
than adding a release beside it.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record after the failed-start capture close

Baseline bumped to a1bdee9af9 and the corpus recorded against it. The whole
diff is two classes:

  baseline   1574 lines   787 goldens
  content      74 lines     1 golden

`lockfileSha256`, `adapterSha256`, `scenarioSha256` and `recorderSha256` do
not move: no lockfile, adapter, scenario or recorder module changed.

The one content golden is
`matrix-speech.dictation-start-speech.dictation.start-1`. Its failure
partitions now carry a `rollback-recording` effect at ordinal 3, which is
the capture being closed, and the `speech.dictation.cancel#1` entries after
it renumber from 3,4 to 3,4,4,5 — the pool holds one entry per distinct
content, so a partition whose ordinal moved stops sharing an entry with the
one it used to match. Removing the new effect and ignoring ordinals makes
the two recordings identical, checked by dereferencing every hash rather
than by reading the diff.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* fix(mobile): only the owning start rolls its capture back

There is one capture seam and it carries no start identity, so round 1's
rollback let a stale start's rejection end a live newer dictation: A opens
the capture and waits on the desktop, the user cancels, B starts and is
recording, A's request finally rejects and ends B's microphone and hands
back B's screen. The rollback now runs only while this start is still the
current one, which is what `wasCurrent` on the line above already reads; a
stale failure still cancels its own desktop session and touches nothing
else. Past the generation the capture was either already ended by whatever
superseded this start, or belongs to the one that did.

Red-first on both hosts, driving that exact sequence rather than a spy: the
native test over the real seam saw the screen go `+ - + -`, and the page's
mic-control test over the port pair saw a fourth `native.audio.` verb after
B was recording. Both now end with B still holding what it took.

The mirror image is covered and now pinned at host level too: A's request
resolving late does not commit A over B, because the stale check after the
desktop start returns through `cancelStaleStart`, which cancels A's session
without touching the capture.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record after the stale start stopped rolling back

Baseline bumped to e17b2cf603. Two classes, the whole diff:

  baseline   1574 lines   787 goldens
  content      74 lines     1 golden

`lockfileSha256`, `adapterSha256`, `scenarioSha256` and `recorderSha256` do
not move.

The one content golden is
`matrix-speech.dictation-start-speech.dictation.start-1`, whose scenario is
the superseded start, so every partition in it is a stale one. The
`rollback-recording` effect round 1 put there is gone, and the
`speech.dictation.cancel#1` entries fold back from 4 to 2 as the ordinals
after it renumber — the pool holds one entry per distinct content, so
partitions whose ordinals agree again share an entry again. Dropping that
effect from the superseded partitions and ignoring ordinals makes the two
recordings identical, checked by dereferencing every hash.

`speech-desktop-start-recording-failed` is untouched: that start still owns
its capture at failure time, so it still rolls back.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
2026-09-21 18:57:55 -04: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   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 9.

    WeChat group 9 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.2%
JavaScript 4.1%
Swift 0.2%
CSS 0.1%
HCL 0.1%