Streamed replies stored a whole-message record per revision, and nothing removed the
superseded ones: on a long-lived profile item records reached 884 MB, and one week-old
chat held 26k item records for 13.7k messages.
A schema trigger now deletes the records a new item record supersedes, keeping each item's
first record (restore reads it as admission evidence) and its newest (what a chat opens
to). History written before this change is compacted once on a worker thread with its own
connection, in small resumable pages at a 10% duty cycle.
Agent reload treated did-fail-load as success, so it returned ok while the page showed a network error page; it now reports the page's load error like goto. A restored page stopped before its first commit holds only Chromium's initial empty entry, so native reload did nothing: the Reload button now navigates to the saved URL, and agent reload fails fast instead of waiting 10s and claiming success.
* fix(runtime): hold tui-idle until a cold-starting Claude has painted (STA-2380)
A shell auto-title (oh-my-zsh preexec) names the pane `claude` the moment
the command execs. Claude's `idle_title` rule counts that bare name as weak
idle once output has been quiet for 3s, so a Claude that took >3s to draw
its first frame settled `terminal wait --for tui-idle` on a blank screen.
`dispatch --inject` then pasted into a TUI that had not mounted yet and the
prompt was lost.
Name-only idle lanes (agent rule verdicts that require quiet, and the
sustained-title lane) now also require that the running command has painted
something since the shell's OSC 133;C command-start marker. Shells without
the marker keep today's behavior.
* fix(runtime): corroborate Claude's name-only idle with its own composer marker (STA-2380, C1 F1)
Orca's zsh OSC 133;C hook is first in preexec_functions, so a later user or
framework preexec hook (zsh-you-should-use, a custom echo) prints after the
command-start marker and before Claude runs. The any-visible-byte paint latch
counted that text as Claude's paint, so a silent cold start under such a hook
still settled tui-idle ready-weak on the shell's bare `claude` title.
For agents whose worker start already trusts their composer marker (Claude),
"painted" now means that marker (`❯`+NBSP after DECSET 2031, which no shell
sends) arrived since the command started. Other agents keep any-byte paint;
markerless shells and output gaps keep the permissive default.
Evidence: a real-zsh live-shell test under the production wrapper with
oh-my-zsh title-only, p10k/starship-style silent, and you-should-use-style
printing hooks, replayed through the real wait; runtime tests for the hook
text, a boot banner, the positive bare-title + composer path, and worker-start
readiness plus brief delivery timing.
* fix(ci): route command-paint attribution sources to shell_contracts; attribute live-shell bytes by stream offset (STA-2380, C2 F1/F2)
- pr-shell-contract-prefixes: the live-shell test, terminal-command-paint.ts,
tui-idle-evidence-source.ts and draft-paste-ready-scanner.ts route to the
shell_contracts job; a routing test reads the job's step from pr.yml and
asserts every listed test routes there.
- tui-idle-zsh-preexec-hook-order.live-shell.test: locate the DECSET 2031
anchor by offset in the accumulated stream, split a straddling read, carry
pending escapes across the shell/agent halves, and assert attribution is
invariant under coalescing and 3-byte re-chunking.
- terminal-command-paint: disclose the accepted trade-off (a known Claude with
marker history but no supported composer signal times out; markerless shells
and output gaps still fail open; no version cutoff claimed).
* test(ci): stream-offset launch-order proof, route tui-idle-evidence.ts, parse the whole shell-contracts step (STA-2380, C3-1/2/3)
- live-shell test: assert the launch order on the joined bytes by stream
offset (133;C, then the user hook's output, then the agent's anchor and
composer); no read-boundary or timestamp assertions remain. Re-chunk
cases add a split anchor and a shell-tail/agent-start coalesced read.
- pr-shell-contract-prefixes: route tui-idle-evidence.ts, the readiness
evaluator the live-shell replay exercises.
- routing ratchet: read the step's run script through the YAML parser so
a blank line or later command cannot truncate it; cross-check against
the real-shell tests UNIT_EXCLUDE drops so a dropped entry fails rather
than a smaller count; fixture tests for blank line, exact list, missing
step.
* test(ci): answer compinit's insecure-directory prompt in the zsh preexec live-shell test (STA-2380)
Ubuntu's global zshrc runs a plain compinit, which on CI runners stops at
"Ignore insecure directories and continue [y] or abort compinit [n]?"
before zle exists, so the stand-in never launched and the shell-contracts
job failed with "no composer frame from the stand-in". Answer the prompt
with y as zsh-startup-hook-pty-harness.ts does. The prompt bytes precede
Orca's OSC 133;C marker, so stream-offset attribution is unchanged.
The numeric reasoning_effort a model sees is not on a 0-100 scale
(claude-opus-5-5: low=5, medium=10, high=15, xhigh=40). Workers launched
with --effort high read 15 as low and misreported their effort.
* Preserve bounded diagnostics for main-thread stalls and observer gaps
* Use a typed file-read fault injection in watchdog coverage
* Record reviewed incident-only watchdog file operations
* Clarify watchdog snapshot types and validated parser conversions
* Place validated object assertion rationale at its conversion
* Capture executing stacks after main and renderer hangs
* Preserve hang capture progress through late cleanup and reporting
* Publish renderer hang baseline before collecting stacks
* Service capture cleanup in packaged watchdog smoke
* Release native capture after dependency load failure
* Revert "Make chat wait check the chat's work state instead of reading its history every second (#41129)"
This reverts commit 9a10464bec.
* Revert "feat(cli): read, message and wait on agent chats with orca chat list/read/send/wait (#40836)"
This reverts commit c2e6ebbf0b.
* fix(wsl): show Connecting instead of a stale read error while a WSL host starts
After Start, a WSL host can take tens of seconds to boot and update its server. The editor,
file tree and source control dropped the stopped notice as soon as the host left 'stopped'
and showed the error from the read that failed while it was down, telling the user to go to
Settings. They now keep the notice up as 'Connecting to <distro>…', and the editor's retry
waits for the WSL host and reloads the file when it answers, as it already did for SSH.
* fix(wsl): skip the post-Start reload when the WSL retry already loaded the file
Review follow-up: once the editor's retry reloads a file when its WSL host turns ready, Start's
own reload would clear and re-read it, flashing a spinner. Start now reloads only a file that is
still failed.
* fix(wsl): reduced-motion spinner for Connecting; SSH targets keep their own retry signal
Review follow-up: the Connecting notice uses LoadingSpinner at size-4 per the style guide, and
the editor reads WSL host status only for a workspace with no SSH target.
* test(editor): cover a Start reload of a still-failed file; share reload option constants
* fix(wsl): reduced-motion spinner on the Start button too
* fix(native-chat): refresh skills when reopening the picker
* fix(native-chat): show the last skill list while the reopened picker rechecks
Clearing the renderer snapshot on close made every / or $ open start in a
loading state. Keep the last answer per pane, show it at once on reopen, and
ask the host once per open.
* fix(native-chat): keep a late skill scan as the next open's fallback
* test(native-chat): feed skill picker tests fixed host answers
Importing the main-process scanner pulled src/main into the web typecheck
project.
---------
Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
* fix(runtime): close a paired session tab when the desktop window is gone
Paired session-tab closes carry the device id as a navigation id, and that
path captured a renderer graph epoch before the headless retirement. A
closed window leaves the graph unavailable, so the close threw
runtime_unavailable and the phone showed nothing. Skip the epoch only while
the graph is unavailable. A reloading renderer still fails closed.
* refactor(runtime): tighten the windowless paired-close fence
* fix(runtime): keep a booting desktop renderer fenced for paired tab closes
---------
Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
* fix(computer): stop macOS type-text and paste-text entering text twice
Chromium answers an AX value read from a cache that trails a successful
write by about 100 ms. type-text and paste-text read the field once right
after writing, saw the old value, and typed or pasted the same text again
as keys. set-value read back the same stale value and reported that a
landed write did not take effect.
Both now wait up to 500 ms for the readback to settle, and text input
falls back to keys only when the field still holds its old value. Text
input into Chromium web content skips the AX write and sends real keys,
because the write fires no beforeinput/input events (none at all for a
contenteditable), so editors such as Discord's search never saw the text.
* fix(computer): bound the macOS value readback wait by wall clock
* docs(computer): say why text readback polls for async AX trees
ProseMirror resolves a click on the right half of an inline atom to the
position after it, so the rich editor's modifier-click router read the
following node. Wikilinks and superscript citation links did nothing when
clicked there. Resolve the atom the click landed on instead.
Co-authored-by: Wooseong Kim <innocarpe@gmail.com>
Each pause cut was decoded and committed on its own, so Parakeet capitalized the word after a mid-sentence pause. Pause cuts now only update the live text.
Orca refused any image over 5 MiB before handing the message to Claude.
That is the Anthropic API's per-image limit, but Claude Code shrinks every
image it receives over stream-json (to 2000 px, then a ~500 KB JPEG) before
the API sees it, so the check only blocked images Claude would have sent.
The per-image cap now matches the 50 MiB attachment upload cap and the
per-message total is 64 MiB; both only bound host memory.
* test: remove internal query-plan assertions
* test: remove startup sweep plan-only suite and mailbox plan observer
* test: remove terminal link grant metadata suite
* test: trim hosted review eligibility projections and probe inventories
* test: keep peer reply selection without query plan assertions
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* revert: worker permission approvals (#40756)
This reverts commit 818055fcbb.
The feature misbehaves in real use: an Allow on a worker's approval card
was recorded as closed without an answer, and closed approval cards render
at the bottom of the coordinator chat, below newer messages.
Removed: the Claude PermissionRequest hook hold and its 130 s timeout,
the approval card in the coordinator chat, `orchestration deny`, the
approval payload on stop escalations, and the held-delivery lines on send
receipts. Escalation text goes back to its pre-#40756 wording.
Kept from later commits:
- #40983 (lost-worker alerts): its `lost` reason, cause/leftover/settled
fields, turnStartedAt and the rejected-report check stay; only the
approval branches around them are removed.
- #41158 (owner moves) and the test cleanups (#41151, #41175, #41177)
only touched approval code that is now deleted.
* feat(orchestration): answer workers' permission prompts from the coordinator (re-land of #40756)
* fix(orchestration): credit an approval from Claude's own decision record and place each worker card at its time
- An Allow that Claude took is answered by the person even when the command then fails or is still running; a failed command's PostToolUseFailure counts as ran.
- Expired means the agent's own timeout only; a close Orca can't name is not an expiry, and reasonDelivered is true only with a reason.
- Escalations wait for the dialog to paint and read Claude's warning even when a long command hides the top of its box.
- Worker cards and receipts render after the message they followed in time, not after the whole conversation; the toast says what happened.
* fix(native-chat): place timed rows without a memo the compiler skips
* perf(orchestration): feed chat approvals from their own stream, pin open cards, close cards whose worker ended
Native chats no longer subscribe to the crew stream for worker approvals. A
narrow orchestration.workerApprovalsSubscribe stream per chat party wakes only
on that party's own mail and on Run/Dispatch changes, never on agent status,
and reads the crew only when the approval list itself changes. The pane no
longer redraws for approvals: the transcript receipts and the pinned stack
each hold the feed themselves.
Open worker prompts are pinned above the composer (above the chat's own
prompt), oldest first, in a bounded scrolling stack; the transcript keeps only
receipts, at the time the worker asked. The countdown ticks only for open
cards in a visible pane.
An approval whose Dispatch is no longer running reads as closed ("No longer
open · worker ended"); a hook that hangs up after its worker is gone closes as
worker-ended rather than "answer it in the terminal"; and a click that finds
the prompt or Dispatch already gone turns the card into its receipt at once.
Also carries over: a stop owes a closing line only to an approval whose
escalation went out.
* fix(native-chat): no toast when a worker approval answer lands; the card's receipt says it
* fix(native-chat): a worker approval card answers on click, as the chat's own prompt does
The card turns into 'Allowed by you' at once and Claude's confirmation runs behind it; only an answer
Claude did not take changes it to the real outcome, and a failure reopens the card.
* fix(orchestration): keep main's stop-report index for the open-approval sweep after the re-land
* fix(orchestration): final-review fixes for chat worker approvals
- A click that gets approval_not_open no longer hides the card: the host's list decides, so a
prompt the host still holds stays answerable. Only dispatch_inactive closes it locally.
- The approvals stream watches only the orchestration database's own changes (Runs, Dispatches,
mail), not terminal identity notices, so agent status and title changes cost it nothing in main.
- Receipts are the chat's history: no 30-minute window, bounded by 100 rows with still-open
prompts kept first.
- The pinned stack is capped against the pane and gives way first, so the chat's own prompt keeps
its room; a prompt that closes while shown stays pinned as its receipt for 4 s, and one only the
worker's terminal can answer stays pinned.
- A close no one named, after the worker's Dispatch ended, reads as worker-ended, and an
unanswered close of an ended worker sends the coordinator no second notice.
- The transcript's receipts keep one array until a receipt changes.
* refactor(native-chat): a worker approval card waits on the host after a click instead of answering ahead of it
Both buttons turn off and the clicked one shows a spinner until the answer returns; the host's list
then turns the card into its receipt. Drops the client-side close and its reconciliation.
* fix(native-chat): let the compiler memoize the worker approval answer handler
* perf(orchestration): back off idle remote relays and pull only pending peer replies
* test(orchestration): prove idle backoff at the federation relay
* perf(orchestration): a sync another caller ran that moved mail wakes the relay
* perf(orchestration): a re-verified server keeps its relay awake
* perf(orchestration): a relay tick that moves mail keeps the relay awake
* feat(project-admission): open menu-first Add project flow with synced host header
* fix(project-admission): keep pending remote default hosts and settle partial folder batches
* refactor(project-admission): dedupe Add project menu items and surface picker failures
- Render Browse/Clone/Create from one action table with a shared submenu-close handler
- Toast native folder-picker rejections instead of leaving an unhandled promise
- Fall back to the plain combobox Add project row whenever the cascade menu is unavailable
- Memoize the host index in useAddRepoHostSelection and drop stable setters from deps
* fix(project-admission): keep state setters in host-selection deps for React Compiler
* perf(orchestration): stop coordinator check and worker-list from rescanning Run history
- check: the empty-check hint projects only workers that can still be running or owe an action
- worker-list: later pages reuse the first page's inventory counts from the cursor
- check: read completion reports for follow-ups in one query
- outstanding-delivery lookups and the worker seat-grab check use their indexes
- hot by-id lookups name their columns so prepared statements are cached
- stop-archive checks archive existence without reading the archive
* fix(orchestration): judge the check hint per worker-list page and tie carried counts to their filter
* fix(orchestration): reuse carried worker-list counts only for the same Run scope
* perf(orchestration): find empty-check hint candidates through indexes and refresh the stale delivery trigger
* perf(orchestration): read only the worker-list pages that hold hint candidates
* perf(orchestration): look up page owners through indexes instead of reading pages
* perf(orchestration): batch hint candidate positions and join pages that share no identity
* perf(orchestration): keep creator hand-back lookups on the creator index
* fix(browser): keep popups an agent opens from bringing Orca forward
A page popup opened by an agent's click (OAuth, share) was created with
show:true, which on macOS activates Orca over the app the user is in. The
gesture tracker now records whether the opening input was agent-injected,
and such popups are created hidden and shown without focus once Orca is in
front.
* test(browser): attribute popup gestures to agent input
* fix(browser): hold popups the desktop user didn't click, and count any Orca window as active
* fix(browser): share one app listener for popups waiting on Orca, keep BrowserWindow type
* fix(browser): drop the app listeners when the last waiting popup closes
* Tidy the Settings → Agents installed list
Rows line up on one line, the default agent gets a Default pill, and
Set as default moves into each row's ⋯ menu. Chat/CLI stays in place,
grayed out, when an agent is off. Click a row to expand its settings.
* Keep a saved default clearable when its agent isn't installed
The ⋯ checkbox follows the saved default, not the badge, so a saved
agent that isn't detected still shows Default and can go back to Auto.
Row hover uses the list-row accent token.
* Use plain items in the agent row's ⋯ menu
No checkmark column: Set as default, or Clear default agent on the saved
default, then Docs/Install aligned to the menu edge.
* Move local usage services into a supervised backend process
* Own usage recovery and worker retirement lifetimes
* Preserve answered usage data during background refresh
* Run independent usage scans concurrently in the backend
* Limit backend startup paths to the delegated usage service
* Show usage failures through backend recovery
* Include usage failure strings in the English catalog
* Keep usage update details beside refresh failures
* Resolve usage freshness failure from the final producer snapshot
* Retain the forced refresh completion requirement
* Keep managed backend failures out of application crash reports
* Preserve usage recovery boundaries across backend reconnects
* Match the backend RPC cancellation signal in the usage seam proof
* Avoid serializing backend requests before port delivery
* Keep receiving request validation in the boundary schemas
* test: align usage transport coverage with renderer project
* fix: preserve unknown usage state and renderer retirement
* fix(usage): revalidate tracking before scan admission
* fix(usage): retry failed backend startup on demand
* test(usage): isolate stale backend ownership checks
* fix(pr-page): let the Start workspace button grow to fit its label
The pull request header pinned that button to 180px with nowrap, so longer
translations overflowed both edges and the arrow slid under the chevron.
A minimum width keeps the stable size for short labels.
tracked in STA-14595
Co-authored-by: 정의현 <rabbitdy0101@lemong.ai>
* fix(pr-page): wrap the header when the workspace button no longer fits
A long Start or Resume label grew past a narrow pull request page, the title
collapsed, and the chevron was clipped. The title now keeps a floor so the
actions wrap under it, and the label wraps only when that row is still too
narrow.
tracked in STA-14595
Co-authored-by: 정의현 <rabbitdy0101@lemong.ai>
---------
Co-authored-by: 정의현 <rabbitdy0101@lemong.ai>
* fix(native-chat): hold an automatic continue until the chat's account has usage again
The automatic continue after a usage limit sent at the cut's reported reset
without looking at the account, so it could send into a still-spent weekly
window. Each sweep pass now attributes the chat's launch account (the host's
launchAccountHome) to Orca's polled reading taken in that same home, and holds
the send until the latest spent window's reset (+15 s). The hold is derived
each pass, never saved, only grows for one cut and account, and waits up to two
minutes for a reading taken since that reset before falling back to the reset
it has. A spent window with no known reset stops the automatic continue for that
cut; on System Default, where Orca can't tell which login a reading saw, a fresh
reading with room releases both. Rows on desktop and phone show the held time
through an optional continueAt; older clients keep the cut's time.
* fix(native-chat): attribute usage holds once per account and retire them with their scope
- C1/X7: launch home resolved once per provider and reading once per (provider, home) per pass; narrow usageReading accessor replaces getState().
- X8: forget() drops the hold; hidden-chat caches are pruned while the setting is off; readState stores nothing for an unattributed chat.
- X3/C3: launch and reading homes compared in canonical form (~, dot segments, async realpath, bounded cache).
- X4/C2: a hold belongs to its scope (canonical home + billing kind) and retires when it changes.
- X2: a launch whose provider has no reading yet asks once and waits within the two-minute window.
- X5: attribution runs before the overdue check, so a restart keeps the account's later reset.
- X6: the launch account is re-attributed right before each send; beforeRun refuses a changed attribution.
- C5: cold chats publish when their continue time moves.
- X1/C4: WSL launches keep the cut's own reset (no hold).
* fix(native-chat): gate held continues on an account scope token and stop reviving stale cuts
- C6: a hold extends only with a spent window that had begun by the cut's reset.
- X6-R2, X10, P1-1: a synchronous account scope token (selection, launch env, reading home and
provenance) is captured at attribution; send() re-resolves only when it moved, memoized per
token, and beforeRun compares live and captured tokens. Opening a chat drops only cold-cut caches.
- X11: production tick() test at N=300 and 10N=3000 counts resolver and reader calls.
- X2-R2: the bootstrap wait starts when a pass first sees the due send without a reading.
- X9: canonical homes are resolved once per account per pass; the unbounded-lifetime cache is gone.
- C5-R2: unloaded chats have no status push path, so the cold continueAt publication is removed.
* fix(native-chat): separate continue eligibility from current spending and bind sends to their attribution's sources
- X12: a cut's eligible anchor (its reset, an established hold, or a covering window) takes the
24 h overdue test; once eligible, every currently spent window holds the send.
- X13/P1-2, X6-R3: the account owner returns attributions with a synchronous source witness
(settings snapshot identity, cached login-shell capture revision, reading-source identity);
Claude billing comes from the launch's own env composition. A result whose sources moved while
it resolved is discarded; send() and beforeRun bind to the attribution's own witness and
supersede without spending an attempt.
- CI-1: the scope-token type assertion is gone with the token.
* fix(native-chat): keep a covering hold beside spent windows of unknown reset
- X12-R4 / C7: rebuilding the covering anchor skips spent windows whose reset, and so start, is
unknown; the eligible branch still refuses on them.
- E1-R4: the preparation-change and suspended-attribution race tests run on a Claude chat
through the real host send, mutation and accepted settlement.
* refactor(native-chat): move the usage-limit continue status into its own wire module
The merge with main put agent-session-wire.ts one line over the 300-line limit.
* fix(native-chat): read the shell capture revision lazily so module mocks without it still load
Tests that main added mock login-shell-environment without the revision accessor, so binding it at module load failed.
* fix(native-chat): release a usage hold on fresh room for any account without stranding the cut
- QA-1: room in a fresh attributed reading newer than the last spent evidence (spentSeenAt)
releases the hold and clears an unknown reset for every account; the System Default-only
branch and identityKnown are gone.
- QA-1b: the release pulls heldUntil down to that reading instead of clearing it, and an
unknown-reset hold anchors on its last evidence, so a release over a day after the cut sends.
* fix(native-chat): release an expired usage hold from its room reading and ask for readings while a reset is unknown
- R6-1 / QA-1b-R6: a release sets heldUntil to the room reading itself, so an expired finite
hold followed by an unknown reset no longer strands the cut.
- R6-2: the usage poller idles while Orca is unfocused with no viewer, so an unknown reset asks
for a non-forced reading at most every 10 minutes through the existing refresh.
* fix(native-chat): bound unknown-reset readings per account and honor the failure backoff
- R7-1 / X-R7-1: the rate-limit service owns the automatic-read cadence: a read waits while the
provider's last reading or admitted automatic read is within the asked interval, so held chats
on one account cause at most one unknown-reset read per 10 minutes.
- R7-2: automatic reads wait out the poller's failure backoff (shared failureRetryDue) and start
its clock; forced refreshes are unchanged.
* fix(rate-limits): scope automatic usage-read admission to the selected account
- R8-1 / X-R8-1: an admitted automatic read counts toward the cadence only for the account whose
reading source the service held then, so a switch never lets one account's read delay another's.
- Prunes the flaky-test-pattern baseline: service-refresh-orchestration no longer reads the wall clock.
* fix(native-chat): keep a usage-reading request retryable until the service starts it, and show the last known reset while one is unknown
* fix(native-chat): show no automatic continue while a chat waits on an unknown reset, since fresh room still releases it
* fix(native-chat): publish no continue time for a cancelled or stopped cut while its account's reset is unknown
* fix(browser): stop agent clicks from opening the system file picker
An agent click on a file input opened the macOS Open panel, which brought
Orca's window forward over the app the user was in. Page actions now catch
the picker the way upload does and tell the agent to use upload.
* fix(browser): enable Page, cancel the picker, and clean up outside host scope
* fix(browser): limit picker blocking to input delivery and bound its setup
* perf(browser): skip picker blocking for actions without user activation
* fix(browser): bound picker interception cleanup on a hung page
* fix(browser): bound the picker interception setup as a whole
* fix(emulator): let iPhone Duo fold in release builds
Release signing gave serve-sim's in-simulator helpers the hardened runtime,
which drops the DYLD_ROOT_PATH that simctl spawn hands them, so the Duo HID
and accessibility helpers aborted at launch. Sign just those two with only
allow-dyld-environment-variables.
serve-sim's uncaught errors print its minified source, which contains the
"No serve-sim server running" text, so every crash was reported as no active
emulator. Report the thrown error line instead.
Fixes#40509
* fix(emulator): keep multi-line serve-sim error messages
* refactor(emulator): simplify serve-sim failure message parsing