Continue with Terminal Agent (chat button, tab menu) and Session History
"Resume in new CLI" built the terminal command from desktop agent settings
even when the conversation lives on a paired Orca server. A desktop
override such as `FOO=BAR claude` leaked into the server terminal.
Both entry points now resolve launch settings once, before preparing the
fork or copy: paired hosts read settings.get through
readHostAgentStartupSettings and fail closed when settings are unavailable
or the pairing changes, so no orphan conversation copy is made. Local and
SSH sessions keep desktop settings.
Fixes#44168
Co-authored-by: Neil <neil@stably.ai>
Chat behavior, turn activity, chat naming, format on save and formatter command
entries built keywords with plain translate(), so a translated UI indexed only
the localized word. Use translateSearchKeyword() like the rest of settings
search so the English keyword stays searchable.
Fixes#44176
* fix(orchestration): keep a Run whose Task result is corrected or whose mailbox gets a reader mid-retirement
* fix(orchestration): keep a Run whose Delivery is acknowledged mid-retirement; share the mail-waiter check
* fix(orchestration): check the page's own activity stamps instead of rescanning the Run each page
* fix(orchestration): stop retiring a Run on any write to it, through a connection-local write watch
Replaces the per-page touch mark and stamp checks: every page and the Run row now stop if anything wrote to the Run since the last page, including writes in place.
* perf(orchestration): gate the retirement write watch and check only waiting readers per page
* fix(orchestration): install the retirement write watch with unqualified trigger targets; key orphan-prone children by principal and mailbox
* perf(orchestration): read a Run's legacy principals through the role index when the write watch starts
* test(orchestration): count both of the corrected Run's messages
* refactor(orchestration): keep the write watch inside retireSettledRun
* fix(orchestration): keep a Run whose Dispatch mailbox gets a reader mid-retirement
* fix(native-chat): wrap the disabled rewind reason instead of widening the chat menu
* fix(native-chat): shorten the busy rewind reason to 'Available when chat is idle'
* fix(mobile): say 'Available when chat is idle' for the busy rewind reason
* fix(chat): reuse composer editors while their views are unmounted
* fix(workspace): read persisted folder hosts through the catalog selector
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(scheduled-runs): a usage limit no longer turns scheduled background runs off
A background run that a usage limit ended counted as a failed run, so a long
or weekly limit failed each scheduled run at once and, after ten, turned the
schedule off. A usage-limited run now records the limit and its reset; it
never counts toward turning the schedule off, and scheduled runs (and the
next-run time) wait for the reset, then catch up a slot still owed that day.
* fix(native-chat): turn auto-continue on from the usage-limit row
With automatic continuation off, the row's clock opened Settings > Chat.
It now turns the setting on in place, so the host schedules this chat
without leaving it. When the host reports off while the setting is
already on (an asleep workspace, a chat it can't continue), the clock
still opens Settings.
* fix(scheduled-runs): a background run continued past its usage limit is recorded as done
A scheduled background run that a usage limit stopped was recorded as "didn't
finish" and stayed that way after its session was continued at the reset: the
runner had stopped watching it, and the run refused the suggestions the
continued turn made. The continued turn can now suggest, and when it succeeds
the run is recorded as done as of then, its failure cleared and its
suggestions replacing the open list.
* fix(orchestration): say when mail waits behind a usage-limited turn
Agent mail to a chat whose last turn failed is queued behind that failure
until the chat's next turn, but the send receipt's hold check never knew
about it, so a sender saw nothing. The receipt now says the mail waits behind
a failed turn and, at a usage limit, when Orca continues the chat, or why it
won't: automatic continue is off, was cancelled or gave up, or the chat's
workspace is asleep, which continues once it wakes.
* fix(chat): refuse single stored journal items too large for one reader reply
The reader checks a stored item's byte size in SQL before loading it and refuses
reads over the 64 MiB reply limit, and the reply limit no longer exempts replies
carrying one item, so main never decodes one huge tool output whole.
* fix(chat): size-check history, legacy client-form and fork-marker item reads too
Review found three more reader paths that loaded one stored item before any limit:
history-items, the client form for rows without a current wire form, and fork-marker
boundary groups. Sizes are measured on plain columns so SQLite never reads the text twice.
* fix(chat): show oversized items shortened in history, detail and visits instead of failing
Refusing them stopped every catch-up visit at that row and failed history pages. Display
and visit reads now get the item with its tool output or patch head cut in SQL, keeping the
original size and digest; full reads of such an item are still refused.
* fix(chat): measure the shortened item itself so escaped output still gets a stand-in
* fix(chat): shorten oversized rows in fork-marker groups, a display read
* perf(chat): build an oversized item's shortened form once
* fix(chat): shorten display and catch-up reads from half the reply limit
A row under 64 MiB stored can serialize past the reply cap when it holds any character
above U+00FF, which refused a catch-up page holding one such tool output.
* perf(session): send only the workspace entries a window changed since main acknowledged them
A tab or active-group switch re-sent every workspace's tab, group and layout maps to main (about 4 MB and 10,500 rows per switch at 1,800 workspaces). The window now remembers what main acknowledged per host partition and field and sends only the keys whose values changed; main rebuilds whole fields from its stored partition and runs the existing patch path. Saved tab sessions are cached per worktree so one switch rebuilds one worktree.
* fix(session): forget main's copy when it stores something else, after whole-session writes, and for retired hosts
Main now reports the sent fields it stored differently (normalization, fences), and the window sends those whole next time. Whole-session writes from the window (set, unload staging) clear the acknowledged copy, including one acknowledged by a write still in flight. Hosts the window no longer routes to are dropped, and empty saves still reach main so its unchanged-save handling runs.
* fix(session): compare a copy of what the window sent, and on unchanged saves too
* perf(session): restore terminal bindings copy-on-write so main compares sent fields without cloning them
* test(session): check the session terminal binding replay returns, not its input
* refactor(session): drop type assertions from the entries patch path
The changed-code gate now rejects type assertions. Session fields are read through typed records,
written with Reflect.set, and host ids are normalized instead of cast.
* perf(windows): start Git processes on the process worker so a slow launch cannot freeze the window
On Windows, creating a process blocks the calling thread inside CreateProcessW, and endpoint
security can make each launch take seconds. Captured Git commands and streamed native Git
status now start on the shared process worker on Windows, with main's current environment and
execFile's failure text. When the worker cannot run, they start on main as before.
Tracked in #36284
Co-authored-by: registered2nd <39094401+registered2nd@users.noreply.github.com>
* fix(windows): keep tree kill, admission release and spawn-error fields on worker-started Git
Review pass 1: cancel before the worker reports a PID now waits for it and kills the tree; a dead
worker's children release their Git admission; spawn errors keep errno, syscall and path; a stdin
pipe error leaves the result to Git's exit status as on main.
* fix(windows): tree-kill a worker-started Git child whose PID arrives late, and keep the stream's abandonment observer
Review pass 2: a PID reported after the 5 s wait still gets the tree kill, a dead worker ends the wait,
and an earlier child error no longer hides a later worker abandonment from the stream's termination.
* fix(windows): never root-kill a worker-started Git child before its tree kill
Review pass 3: the PID wait now ends without a root kill and clears its timer when the PID arrives,
so the late tree kill cannot be pre-empted by a queued root kill.
* fix(windows): fall back to main for Git when the process worker dies before answering
Council: a worker that starts but cannot load its entry now marks itself unavailable, so later Git
commands start on main instead of failing one after another.
* refactor(git): split streamed Git child selection out of git-stream-stdout; lint and format fixes
* chore(git): move the direct child_process baseline entry with the streamed Git spawn it belongs to
* fix(git): end a Windows Git tree the dead process worker reported before releasing it
A worker that dies can no longer stop its children, so main kills each still-running tree whose PID it knows before admission moves on.
* fix(git): send one tree kill per worker-hosted Git child
A worker that dies while a cancel's taskkill is in flight reuses it instead of walking the PID again.
* fix(git): one taskkill per worker death, and tree kill on Windows output overflow
Trees a dying worker abandons in one turn share a single taskkill launch. A capture past maxBuffer now ends the whole tree, as a cancel does, so a hook holding the pipe can't keep close from arriving.
* fix(git): let worker abandonment wait on a late-PID tree kill
After the PID wait gives up, a late PID's taskkill becomes the child's tree kill, so a worker dying meanwhile doesn't release admission early.
* fix(git): start Windows tree-kill taskkill on the process worker, and let an exited root's pipes close
taskkill now launches off Electron main whenever the worker can run, so cancel, overflow and worker-death cleanup no longer block main under endpoint security. A kill for a child whose root already exited destroys its pipes, as execFile does, so a descendant holding them can't keep close away.
* fix(git): reach an exited root's pipes on kill, and keep tree cleanup alive through worker death
The worker stand-in now forwards kill until close, so an overflow after the root exited retires the pipes a descendant holds. A taskkill whose worker dies before running it restarts from main.
* fix(git): time worker-hosted taskkill from its creation, and rerun it only if it never started
The 2 s wait starts once the worker creates taskkill, with a 30 s launch allowance, so a queued taskkill isn't abandoned for a root-only kill. After a worker death, only a taskkill whose PID never arrived is rerun from main, so a finished one can't walk a reused PID.
* test(git): drop type assertions from the worker taskkill test fixtures
* fix(git): rerun unstarted worker taskkills from main as one batched launch
When a dying worker leaves several taskkills it never started, main reruns them together, so a worker death costs one launch on main.
* perf(git): withdraw a worker launch cancelled before it starts
The worker now starts each queued launch on its own turn, so a cancel that arrives while an earlier CreateProcess blocks the worker drops the queued Git launch instead of starting and then tree-killing it. Requests for a queued launch are replayed once it starts.
* perf(git): keep a stopped Git stream's output on the worker
When a streamed reader stops early, the worker drains the pipes itself instead of copying each later chunk to main while cleanup runs.
* perf(git): keep a finished worker capture's later output on the worker
Once a capture completes (overflow, error), the worker drains any further output itself instead of forwarding it to main while cleanup runs.
* fix(git): wait for a queued worker taskkill instead of root-killing, and keep stopped output on the worker
A taskkill still queued on a live worker is never abandoned for a root-only kill; a dead worker's unstarted taskkill already reruns from main. A child being stopped, and taskkill itself, no longer forward output to main.
* test(git): a taskkill queued on a live worker is awaited past any allowance, never rerun from main
* perf(worker): drop the synchronous worker-entry check; a missing entry retires the host through its own startup error
The worker's error before answering already retires the host, and gated Git launches then fall back to main. Direct spawns after that report the worker unavailable instead of starting it again.
* fix(worker): a worker lost before it was ready fails its queued launches instead of leaving them unproven
The process worker now says when it is ready. If it dies before that it never ran a request, so its children never existed and close as failed launches; an owned-group capture (macOS worktree removal) no longer waits forever when the worker entry is missing. A worker that was ready keeps the rule that only close proves a child ended.
* fix(worker): decide a lost worker's children on its exit, after the messages it already posted
A worker error can be delivered before the ready message the worker posted first; acting on exit, which follows every queued message, keeps a worker that ran requests from having its live children reported as never started.
* perf(worker): any stop of a launch still queued on the worker withdraws it
A plain kill of a child the worker has not started yet now drops the queued launch, as cancel-spawn does, instead of starting the process only to kill it.
* chore(ratchets): shrink the main sync-fs baseline for the worker host
* fix(worker): a child stand-in never receives the host-level ready event
* perf(git): assemble failed Windows capture stderr once
* perf(git): skip capture assembly after a prior error completed it
* perf(git): treat Git's utf-8 capture as utf8 so failures reuse decoded stderr
---------
Co-authored-by: registered2nd <39094401+registered2nd@users.noreply.github.com>
* perf(session-tabs): keep phone-only chat status out of desktop session-tab frames
Every hook event restamps a running chat's status freshness, so about
1.3 frames/s per running agent reached the desktop differing only in
tabs[].chatStatus timestamps, each a full reconcile and store write.
No desktop code reads chatStatus (desktops use the status feed). Drop it
from session.tabs.subscribeAll for non-phone clients: those frames are
now version-only and the existing receiver skip drops them. Phones use
session.tabs.subscribe and are unchanged.
* test(session-tabs): drive the chat-status inventory test without type assertions
* perf(rich-markdown): stop ordered lists from rescanning the rest of the file
Tiptap's ordered-list tokenizer splits all remaining Markdown into lines
for every list it reads, so lexing a file with many ordered lists was
quadratic. Each rich-editor save of a 205 KB file spent ~264 ms there.
Pass it the source only up to the first line that always ends the list;
it returns the same token.
* perf(rich-markdown): also end the ordered-list scan at paragraph interrupters
Without a blank line before a heading or bullet, the scan ran to the end
of the file. The base tokenizer stops at those lines too.
* perf(rich-markdown): track the ordered-list blank-line state per item like the base
A blank line earlier in an item, followed by an indented continuation,
still ends lazy continuation in the base tokenizer; the scan now tracks
that state the same way, so it stops one line past what the base reads.
* perf(rich-markdown): reject non-list first lines before scanning
The start guard accepted a bare "1." line, which the base tokenizer
rejects, so such lines still scanned the rest of the file. Check the
first line with the base's own item pattern instead.
* perf(rich-markdown): recognize ordered-list items in linear time
The base item regex backtracks quadratically on long whitespace before a
U+2028/U+2029 or CR; the wrapper ran it on every scanned line. Use an
equivalent linear check: after the marker, any line terminator must sit
inside the leading whitespace.
* perf(rich-markdown): reject prose before searching for the line end
* perf(rich-markdown): reject a marker without following whitespace before the line search
* fix(native-chat): unmount hidden chat composer views
Each opened chat kept a live ProseMirror view in a detached div, whose
document selectionchange observer ran on every keystroke in any chat.
Hidden composers now keep their editor state (draft, chips, selection,
undo history) but no view; the view is rebuilt when the chat is shown.
* fix(native-chat): never give a composer editor a second view
Tiptap's createView replaces a live view without destroying it, so a
second shown composer for the same scope would leak the first view.
* perf(native-chat): keep composer decorations across view remounts
The unkerned-run plugin minted a new key per view, so each reveal of a
chat dropped its state and rescanned the whole draft.
* fix(native-chat): finish a composition's pending kerning rescan after a remount
Decoration state now survives view remounts, so a rescan still pending
when a chat was hidden mid-composition must run when its view returns.
* perf(native-chat): keep Tiptap's shared stylesheet across chat switches
Tiptap removes its shared style tag when unmounting the last editor on the
page, and remounting adds it back: a page-wide style recalc on every chat
switch now that hidden composers unmount their views. A hidden .tiptap
marker per mounted composer keeps it, as before this change.
* perf(native-chat): hide a composer without querying the page for editors
Replaces the hidden .tiptap marker: drop the editor's stylesheet handle
before unmounting on hide, so Tiptap neither scans the page for other
editors nor removes the shared stylesheet. Remounting reuses the tag.
* perf(native-chat): look up history-row owners and workspace chats through indexes, not a scan of every saved chat
AI Vault and mobile history list/search and workspace attention reads built a view of every saved chat on each request. The provider-alias index becomes a generic key index (one per key function, kept by committed writes) that also answers ownership by provider and history row id, and chats by workspace scope.
* perf(native-chat): project each matched chat's history ownership once per history projection
* perf(native-chat): share one listing order across the store's key indexes
* refactor(native-chat): keep the store's key functions with the key index; drop the unused listByScope scan
* perf(native-chat): list a workspace's chats through the workspace index
* perf(native-chat): re-key only chats whose provider, location or handle chain moved, so lease renewals skip the key indexes
* perf(native-chat): derive a re-keyed chat's old keys from its prior view instead of storing them
* feat(workspace-cleanup): show how much space Codex chats take
The Chat history setting can delete Codex chats from deleted workspaces,
but nothing showed how large that history had grown (#16776 saw 11 GB).
The row now says how much the host's Codex chats use, measured read-only
on a worker thread across every Codex home, counting each hard-linked
rollout once (set-aside copies included) and never reading through links.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(workspace-cleanup): reuse the Codex history size walk and skip it while hidden
* fix(workspace-cleanup): never answer a read after a deletion with the earlier walk
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): stream the Codex history walk, count merge folders, flag unreadable history
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(workspace-cleanup): async worker walk, ship it in the server bundle, skip hidden refreshes
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): start the walk's time budget in the worker; walk with sync calls inside the worker entry
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): budget the home listing and skip folders whose real path changed
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): every walk step checks the deadline; count a folder only if it still resolves to itself
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(workspace-cleanup): stop a Codex history walk that a deletion made obsolete
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* style: wrap reader types
* test(fixtures): show the Codex history size in the Workspace Cleanup fixture
* chore: format the walk test and list the new size keys as protected copy
* fix(settings): read the Codex history size only while settings search shows the row
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(settings): check Codex account ownership in the history worker, not on main
The main-blocking helper ratchet flagged the account ownership reads; main now
lists account folders asynchronously and the worker verifies them.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(settings): size Codex history without session discovery's sync account check
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): count relocated account homes and list each home once in the size walk
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): keep the ownership loop where the blocking-helper ratchet allows it; fix types
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): keep a folder's counted rollouts when the size budget runs out; flag skipped folders
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(settings): stop the Codex history walk when the last settings view stops waiting
Each read names its view; a view that closes, hides or switches host before the size
arrives releases it, and the host stops the walk once no view waits.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): use the non-secure-context UUID and wait for a stopped walk's worker to exit
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): release a size read when its window's connection closes; bound the wait for a stopped walk
A window that reloads, crashes or disconnects never sends its release, so each read
now registers against its connection and is released when that connection retires.
Waiting for a stopped walk's worker is capped and ends when the read is abandoned, so
a worker stuck on a hung mount can't hang every later read.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* test(settings): drop the typed-array cast in the connection-release test
* fix(settings): share one capped wait per stopping worker; skip it once the read is abandoned
Each retry no longer attaches a waiter to a worker stuck on a hung mount, and a read
released before its wait began returns at once.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): share one capped listing of Codex homes across size reads
Listing the account folders can't be cancelled, so reads abandoned while it stalls
each left one pending. Reads now share one listing and one wait for a stopped worker,
each capped at 10 s, and fail fast past the cap without attaching more waiters.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* feat(settings): show Codex history size as a badge beside Recommended
Brennan's review: the size belongs to Codex, and a sentence was wordy. The row now shows
'Codex history: <size>' (with '+' when the walk stopped early) as a muted badge; its
tooltip says the space is Codex's own history and that the setting frees only chats
from workspaces that no longer exist, so the number isn't read as what turning it on saves.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* test(settings): open the Codex history tooltip in its fixture with keyboard focus
* fix(settings): keep the Codex history badge on one line
---------
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(sqlite): checkpoint row-cache WALs on a worker instead of in main's commits
Agent status, the model catalog, the GitHub cache and mobile notification
dismissals save through the shared row cache on Electron main. A commit that
crossed the WAL auto-checkpoint threshold also checkpointed and fsynced the
database file inside the commit; under disk load one agent-status save
blocked main for 346 ms.
While a lazily started worker is healthy, row-cache connections no longer
auto-checkpoint and the worker runs a passive checkpoint after each commit
(one per file at a time, one more queued for commits during it). A worker
that fails or exits, or a file that fails three checkpoints in a row, hands
checkpoints back to the connection at once.
* perf(sqlite): per-connection checkpoint registrations, non-creating worker open, deadline
Council fixes: registrations are per connection and replies are tagged with
them; the worker opens with mode=rw so a removed cache is never recreated;
a checkpoint counts only when it folds every frame; a worker that doesn't
answer within 30 s hands checkpoints back; detach drops queued work. Unit
tests get no real worker unless they inject one.
* style(sqlite): keep the row cache under its line cap
* perf(sqlite): checkpoint row caches only past SQLite's own frame threshold
Review: checkpointing after every commit let the WAL restart after each
one, and a restart syncs the WAL header in the next commit on main. The
worker now reads pending frames (wal_checkpoint NOOP) and checkpoints only
past 1000, SQLite's own auto-checkpoint size. Drops a test that counted
posted work.
* fix(sqlite): keep row caches checkpointing themselves on SQLite before 3.51, with a 10,000-page backstop
* fix(sqlite): drain a row-cache WAL tail left by overlapping commits once writes pause, never checkpointing on main
* fix(sqlite): stop owed WAL catch-ups once nothing is pending or the WAL already restarted
* fix(sqlite): treat a shorter WAL after a checkpoint as a restart too
* fix(sqlite): hold a row-cache rebuild while its checkpoint is running, and check the real-worker test's fold
* fix(sqlite): no row-cache file removal while any checkpoint on its path is running
* fix(sqlite): load() keeps a damaged row-cache file while a checkpoint on it runs
* test(sqlite): read the WAL frame counts without a cast
* refactor(sqlite): set row-cache auto-checkpoint with the opener's pragmas and hand back by reopening
* fix(sqlite): a row cache whose checkpoints keep failing stays on SQLite's own, and hands back on its next operation
* fix(sqlite): require SQLite 3.51.3 for off-main row-cache checkpoints, and keep a failed worker's files until it exits
* fix(sqlite): post one row-cache checkpoint at a time, and keep a failed worker's late errors quiet
* perf(tab-bar): render only the visible part of a long tab strip
A strip with thousands of tabs mounted a full tab subtree for every one,
about 0.14 MB each. Past 100 tabs the strip now mounts the viewport plus a
viewport on each side, the active, dragged and focused tabs, and fixed-width
spacers for the rest, so its cost no longer grows with the tab count.
* fix(tab-bar): clamp the strip window to the current tab count and reveal unmounted new tabs
The range follows scroll after commit, so the render that closed tabs could
read past the end of the list. A tab opened beyond the mounted range is now
scrolled into view by its index, and focus tracking runs only in windowed strips.
* perf(tab-bar): find kept tabs by index instead of scanning the strip on every window move
Also keep a tab focused before the strip started windowing mounted.
* perf(tab-bar): find unmounted opened tabs in one pass over the strip order
Deferred reveal ids can include tabs that already closed; looking each one
up separately scanned the whole strip per id.
* fix(tab-bar): read the focused tab with the first windowed range
A rename in progress when the strip reached 100 tabs could unmount on the
first windowed render, before focus tracking started.
* fix(tab-bar): reveal unmounted tabs from their spacer and compare tab ids once per list
Revealing by index assumed every earlier tab was 144px, which missed past a
wider mounted tab such as one being renamed. A windowed strip re-renders on
scroll, so the tab id comparison now runs once per rebuilt list, not per render.
* perf(tab-bar): resolve the active tab's unified id once per tab change, not per strip render
A windowed strip re-renders as it scrolls, and the agent picker's excluded-tab
lookup searched every tab on each render.
* perf(tab-bar): memoize the strip layout key, which spans every tab
* perf(tab-bar): keep the strip's window state in its own component, so scrolling re-renders only the strip
* fix(tab-bar): update the strip window before paint when the tab bar scrolls the strip
* fix(tab-bar): notify the strip window after every tab bar commit
* perf(tab-bar): notify the strip window only when a tab bar commit scrolled the strip
* fix(tab-bar): notify the strip window when the mount commit scrolled the strip
* fix(tab-bar): compare the strip offset with its value before the commit's own scrolls
* fix(tab-bar): keep strip listener refs compiler-safe and notify after the pointer-leave reveal
Chats run the user's own Codex when the host has one. On a host
without it, the Codex chat's Install now downloads the latest Codex
release package into Orca's data folder on that host, with no terminal:
it checks the download against the release's published checksums,
unpacks it with the system tar, requires Codex's executables to be
present, and checks that Codex starts and reports the expected version.
Chats, model lists, sign-in and the minimum-version check then run that
copy. Orca's copy goes last on PATH in Orca terminals, so `codex login`
and CLI tabs reach it without shadowing the user's own install.
Claude and Codex now share one list of Orca's own agent copies for the
command fallback, the terminal PATH entries, the install wiring and the
catalog flags, so Claude behaves as before.
* feat(utility-worker-host): report host and reader heaps to main for crash diagnosis
The chat reader host has its own V8 cage, and a host OOM left main with only an exit code.
The host now samples its own and each reader's committed heap on main's cadence (60 s, 10 s
above 1 GB) and posts only when an isolate moves 64 MB, a reader changes or a mark is
crossed, so a steady host sends nothing. Main adds the last report to
utility_worker_host_exited by reader id and records host pressure under its own key. The
per-worker heap read moves into a Node-only module both processes share.
* fix(utility-worker-host): keep heap events out of a worker's receive type; never let sampling reject; name the report age
* fix(utility-worker-host): drop readers that left mid-sample, report a host with no readers, name the sampled reader count, and treat an unwritten ledger heap as unknown
* fix(utility-worker-host): count unknown reader heaps in the exit breadcrumb; report a host whose only reader left before the first sample
* fix(utility-worker-host): re-read the host heap on every transition to zero readers
* perf(journal): sweep retired epochs only for chats whose head moved
The per-minute retired-epoch sweep paged every ready chat head and sent each one
through a writer prune, even when nothing was retired. A pending set filled by
triggers on head epoch changes (and by fork stages) now limits the sweep to chats
that can hold retired rows; an idle store costs one empty read per pass.
* fix(journal): track items written beside a ready head with a trigger, re-seed when any pending trigger is missing
* style: format retire-pending test
* fix(journal): bound each retired pass at the highest key pending when it began
* docs(journal): note that a changed retire trigger needs a new name
* test(journal): cover the pass bound, generation settle, and live fork rows
* chore(ratchets): record the retire-pending SQL that runs on the journal worker; prune the read file's allowance
* style: format retire-pending test
* chore(ratchets): record the retire-pending SQL that runs on the journal SQL worker
* fix(journal): pass the transaction runner into the retire-pending setup so it imports no journal database module
* fix(journal): don't bound the first retired-heads page below by an empty session id
* perf(journal): keep the indexed cursor bound on later retired-heads pages
* perf(menus): one document keydown listener for every Radix menu root
Every mounted Radix Menu root, open or closed, added its own capture keydown
listener on document, and hidden workspaces keep their tab bars mounted, so a
key press ran one callback per tab context menu and create menu in every opened
workspace. One reference-counted listener now serves all roots; each root still
reads the keyboard-modality value its own listener would have held.
* perf(menus): keep a menu root's own writes ordered with shared keyboard events
A write to a root's keyboard-modality value now takes its place in the shared
event sequence, so a pointer reset armed before the write still clears it, as
the per-root listener did.
Main sits under 1 KB below the fence after the bot and group screens took
216 KiB, so phone parity fixes that reuse desktop code fail build:mobile-web.
Round the fence up to 10.5 MiB (about 40 KB more room).
* perf(claude-hooks): stop holding Claude's model request for Orca's prompt hook
Claude waits for every blocking UserPromptSubmit hook before it sends the model
request, and Orca's only reports status and always answers {}. The managed entry is
now async on Claude 2.1.280 and later; the installer owns that flag, so an older or
unknown Claude goes back to the blocking entry.
The prompt event can now land after a later event of the same turn. Every Claude
main-agent event records its prompt_id per pane, and a UserPromptSubmit whose
prompt_id was already seen is renamed before normalization, so it neither starts a
turn nor resets request matching. It still settles its task notification, and for
the pane's current turn sets the prompt label and wakeup flag.
* test(claude-hooks): cover a mid-turn prompt and a task wakeup with recorded prompt_ids
* fix(claude-hooks): key Claude turns by prompt_id so a late prompt event cannot misorder them
Claude runs Orca's prompt hook without waiting, so the prompt event can trail
its turn. The first admitted main-agent event with an unseen prompt_id now opens
the turn: it is the host's native turn key, retires the previous turn's open
calls, passes the cancel latch, resets the tool snapshot and dates the turn.
Prompt events from a cleared session are dropped, replays never advance turn
identity, and a held completion waits for the late prompt to say whether a task
wakeup started the turn.
* fix(claude-hooks): recognize replayed turns, end stale permission on a new prompt_id, keep scan order
Spool replays before any live event now record their prompt_ids, so a replayed
late prompt stays late; replays after live events are recognized but never become
current. A new prompt_id releases the previous turn's held permission card and no
longer inherits its inferred cancellation. The held-completion check runs its
eligibility gate before scanning child work, as before.
* fix(claude-hooks): follow replayed session changes before live delivery; never make a replay current
A cold spool replay now records a session change it restates, so that session's
replayed late prompt stays late. A replay after a live event with no turn yet is
passed through instead of becoming the pane's current turn.
* fix(claude-hooks): keep turns seen only in replays apart from the live turn order
A replay after live events records its prompt_id in its own list, so its replayed
late prompt is still recognized while the replayed turn never becomes current.
* fix(claude-hooks): treat agentId as a child, retire old lead requests on any new-turn event, settle an older replayed prompt as late
Addresses review: a child event naming itself only by agentId no longer opens a
lead turn; a new prompt_id retires the previous turn's lead requests whatever the
event type; an older turn's prompt replayed after live events is settled as late
and never shows the pane working.
* fix(claude-hooks): keep a permission request without a tool_use_id out of the turn order
A permission request always follows its call's PreToolUse, which already placed
the turn; one without a tool_use_id may belong to a plugin call made after Stop
and must not open a lead turn.
* perf(catalog): reuse a projected worktree row while its inputs are unchanged
A metadata write (comment, unread, status) bumped the sidebar rows revision, and the next join re-merged every worktree row in the fleet. The catalog now keeps each projected row keyed by its repo, git fields and metadata object, so a write re-merges only the rows it touched; the projection also reuses the stamp loop's metadata read.
* fix(catalog): keep scoped lookups out of the row memo, key it on rename history, and prune against current repos
uutils cat 0.8 and 0.9 splice the orcad socket into the stdout pipe and
hold the pipe lock while waiting for more data, so the desktop never reads
orcad's reply and every WSL connection drops after the handshake timeout.
The bash bridge now relays through gnucat when the distro cat reports
uutils 0.8 or 0.9, and falls back to the Node bridge when gnucat is
missing. Other cat builds (GNU, uutils 0.2, 0.10+) keep the cat relay.
Fixes#44134
Co-authored-by: Claude <noreply@anthropic.com>
When a worker start targeting a paired server failed before its request left
this Orca (the server was unreachable, or the handshake failed before it
authenticated us), the Task's remote placement stayed reserved with no
dispatch, holding the Task in `dispatched` and refusing every cancel.
Mark such a reservation never-sent: it stays reserved so a same-key retry
still resends, but a `failed`/`blocked` status update now retires it. A
resend clears the mark first, and a reservation that may stand for a server
Dispatch keeps holding the Task.
Fixes#44120
Co-authored-by: Claude <noreply@anthropic.com>
On Windows npm Command Code runs as node.exe with its generic
node_modules/command-code/dist/index.mjs bin, and process.title cannot
rename the image, so the pane's foreground resolved to the shell. The
tui-idle lane then never settled (worker-start timed out at
agent_readiness) and --terminal reuse refused the pane as
agent_unconfigured. Add the exact package entrypoint to the shared
node entrypoint identity table, matching the Kimi, Qwen and DSH entries.
Fixes#44141
Resume-here only replaced the current chat when the session's owning
workspace id matched exactly, so a sibling workspace instance of the same
folder fell back to opening elsewhere. Compare checkouts instead: ids
that differ only by the folder-workspace instance suffix now count as the
same checkout, while different repo ids on a shared path stay apart.
Fixes#44133
The file explorer row menu used the noun "Doublon" for the Duplicate
action. Use the verb "Dupliquer" and pin it in the locale key overrides
so the next catalog refresh does not revert it.
Fixes#44128