Claude history, usage, native-chat lookup and worktree-retirement discovery now include the user's own CLAUDE_CONFIG_DIR read from the login shell, so sessions in a custom config folder show up even when Orca was launched from the Dock.
Refs #23505
A Codex (or Antigravity/Cline/Prime Agent) dialog drawn and erased in place no longer leaves the pane "blocked" forever when no hook/OSC 7501 clears it. The line tail still decides; the live screen may only clear a tail block when caught up, quiet 3s, no blocker anywhere on screen, and the agent's composer is ready — then the stale block stamp is cleared so the send's own echo doesn't re-block. Also defers the daemon re-attach seed's output sequence until the seed lands.
Fixes#24187
Supersedes #24308
Co-authored-by: Wooseong Kim <2222333+innocarpe@users.noreply.github.com>
dsh worker dispatches (and other dsh agent-prompt sends) now get #33316's bounded Enter retry: dsh paints its launchpad before its session opens and refuses the first Enter with "still starting", so a fresh worker's task sat unsent. The retry only re-presses while the launchpad still holds the same prompt and stops once a turn starts.
Fixes#30778
Co-authored-by: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com>
After an app relaunch, the window reattaches a live pane without its spawn environment, so the
daemon client never learned the pane's ORCA_PANE_KEY. Sleep then skipped the folder read for it,
and the pane woke at its spawn folder. A move's kill-at-quiesced rollback also put a pane `cd`'d
before the relaunch back at the project root (awin verify-11, 5e). Sleep now takes the pane key
from the daemon's session list when it knows the session's distro but not its key. That is the
same one `listSessions` the adoption of an unattached session already uses.
Co-authored-by: Claude <noreply@anthropic.com>
After Wake the window paints the restored history and then blanks its viewport, so the new
shell's prompt starts on a clean screen. The daemon's own copy of the screen, seeded with the
same history, skipped that step. A later reattach (a reload, a second window, the phone)
therefore showed the new prompt beside the dead shell's last one: `p7/sub$ orca@awin:~/projects/p7$`
(awin verify-11). The seed now ends with the same viewport blanking the window writes, built by
one shared function, after the process-boundary ground, which still never moves the cursor.
Co-authored-by: Claude <noreply@anthropic.com>
Codex sessions launched from an Orca-managed account home now honor the user's global ~/.codex/rules exec-policy files: each regular global .rules file is copied in as rules/_orca-global-<name> on launch (sorted before the account's own files so its saved decisions still win last-one-wins rules); approvals keep saving to the account's default.rules.
Fixes#24431
Co-authored-by: Yuichi Uemura <82369+u-ichi@users.noreply.github.com>
Release queued startup input when a figterm-style relay (Kiro CLI's kiro-cli-term) exec-replaces the shell: if the pane's foreground process isn't a shell, accept a direct child that is the expected shell, foreground on its own tty, at an editable prompt. Startup with Kiro shell integration drops from a 15s timeout to <1s.
Fixes#25586
Supersedes #25899
Co-authored-by: ggbdpq <67929842+ggbdpq@users.noreply.github.com>
Kimi sessions keep resuming across repeated Orca restarts: register Kimi's SessionStart hook (matcher ^resume$, so new sessions pay nothing) and map a resume to an idle session-start status that refreshes the resume record; recognise npm-installed Kimi (node_modules/@moonshot-ai/kimi-code/dist/main.mjs) on Windows so the pane isn't mistaken for a shell.
Fixes#31311
* feat(ssh): list saved port forwards that couldn't start, with why, and let you remove them (#32484)
A saved forward whose local port is taken, or that keeps failing, stayed
saved but invisible, retried in the background with no way to remove it.
The port-forward lists now show each saved forward that isn't open, with
the last start error, and Remove deletes it by its mapping.
* fix(ssh): a forward whose ssh exits after starting backs off like a failed start
* fix(ssh): re-register the new forward channels, close a forward a restore reopened before removing it, and update IPC fixtures
* fix(ssh): a flapping forward keeps its backoff streak until it stays up
* fix(ssh): translate the saved-forward row, say Stopped for a forward that died, toast a failed remove, and reset backoff on manual edits
* fix(ssh): keep saved forwards listed and removable while the host is offline; label the remove button; test the healthy-uptime reset
* fix(ssh): mirror saved forwards from main with a stale-read guard, including hosts that never connect
* fix(ssh): scroll the offline ports panel when saved forwards overflow it
* test(e2e): give the saved-forward restart case's timeout its reason
Detect Qwen Code on Windows: exact node entrypoint identities for the npm (@qwen-code/qwen-code cli-entry/cli) and standalone (qwen-code/lib) layouts, and comparablePath now collapses . / .. segments so shim paths like .bin\..\ match.
Fixes#17326
Supersedes #17382
Co-authored-by: Baojiang Lee <101562714+libaojiang@users.noreply.github.com>
On a Claude account's first setup, shared folders Claude already created (e.g. plugins/) are merged into the shared ~/.claude folder and linked instead of being skipped as user-owned; conflicts keep the user's copy and retain Claude's in <name>.orca-profile-merge.
Refs #33170
Codex usage no longer double-counts forked sessions: forks copy the parent's token_count events with fresh timestamps, so cumulative events are now keyed on turn id + totals (timestamp fallback when no turn id); the turn id is kept in the incremental-scan checkpoint and the usage cache is rebuilt once.
Fixes#19139
Supersedes #19152
Co-authored-by: Jio Kim <26668612+MeroZemory@users.noreply.github.com>
Hold the orchestration mailbox pointer (and coordinator nudges) while the agent's composer has an unsent draft, so Orca never submits over what the user is typing.
Fixes#26992
Supersedes #27195
Co-authored-by: Hotragn <103170876+Hotragn@users.noreply.github.com>
Read `codex login`'s stderr too: Codex prints the browser sign-in URL there (codex-rs/cli/src/login.rs), so WSL Codex sign-in opened nothing and spun until timeout. Each stream gets its own line buffer and the URL is published once.
Windows managed hook skip paths (Devin/Grok/Cursor replay guards, and orca-agent-hook.exe) exit immediately instead of draining stdin through more.com, so a held-open writer can no longer hang the hook.
Fixes#24907
Supersedes #24909
Co-authored-by: inforanger <29155427+inforanger@users.noreply.github.com>
Ctrl+Enter reaches Claude Code as CSI-u (`\x1b[13;5u`) on local Windows ConPTY panes, matching macOS/Linux, so custom ctrl+enter keybindings work.
Fixes#29711
Terminals created with a flagged agent command (e.g. `omp --thinking high`) now get the agent's identity at creation, so `tui-idle` waits for the agent instead of reporting ready early.
Fixes#25264
Supersedes #25320
Co-authored-by: ggbdpq <67929842+ggbdpq@users.noreply.github.com>
Graceful close (mobile pane, headless tab, worktree stop) of a shell without launch metadata now sweeps descendants on macOS/Linux, matching desktop tab close, while sparing the shell's own nohup/disown jobs (login-wrapper aware). Windows graceful plain-shell close is unchanged.
Fixes#16714
Leave a user's node or python program alone after a Claude account switch; unchecked terminals get an accurate toast.
Fixes#30327
Co-authored-by: Adif Sgaid <69080239+adifsgaid@users.noreply.github.com>
* fix(terminal): a pane a relaunched app has not reopened keeps its history and folder when slept
After an app relaunch, a terminal the window had not shown again was known to the daemon client
only from its terminal list: no history writer and, for a WSL pane, no distro or pane key. Its
Sleep then wrote no final checkpoint at all (only output.log), so Wake restored from older output
and, for a WSL pane on Windows, reopened at the spawn folder (awin verify-10, X2). #33398 learned
those facts in `reconcileOnStartup`, which nothing in the app calls.
Sleep now adopts such a session first: one `listSessions`, then the same history reconciliation,
distro and pane key a startup adoption records. Its final checkpoint then lands with the shell's
folder. Sessions the client spawned or reattached skip this.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(terminal): Sleep never re-adopts a session this client suspended after a seed failure
Review of #33425: adopting an unattached session before Sleep also caught sessions this client
already holds but suspended after a history seed failed (an old daemon, an oversized seed, a
transfer failure). Re-adopting one wrote its fresh-only screen as the authoritative checkpoint,
so Wake lost everything from before the restore. Sleep now adopts only sessions the client
does not already hold as active.
A session it does adopt becomes active only once its history writer is open, so an exit
during the reconcile leaves it out.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
DSH: Orca re-presses Enter (up to a 30s launch budget) while dsh's launchpad still visibly holds the launch prompt — dsh refuses Enter while its session is starting — and stops as soon as the prompt leaves the screen, so no Enter reaches the first-run guide. The shared draft reader recognises dsh's boxed launchpad composer. Fixes#29131, #33227. Supersedes #33229.
Co-authored-by: Xulin Wu <35489799+wuuli@users.noreply.github.com>
* test(e2e): a saved SSH forward on a managed host comes back after a restart (#32484)
* test(e2e): a restart that reaches the host only through its server's tunnel restores saved forwards (#32484)
* fix(ssh): restore saved port forwards whenever a host's server is up, not only after an SSH connect (#32484)
A host whose managed server the app reaches at startup through its tunnel
publishes its served status from the tunnel path, which never ran the
forward restore. The served status itself now triggers the restore, from
any publisher, and a host kept on the legacy relay bridge restores too.
* test(ssh): type the restore spy's target argument
* fix(ssh): user forward edits keep unrestored saved forwards; restore once the tunnel is up
Add, edit and remove now merge with saved forwards that aren't live, so a
restart that restored nothing no longer lets one re-added forward erase
the rest. A call that brings up the managed server's tunnel restores too,
so a failed update check or redeploy can't skip it, and a restore runs once
per transport instead of on every status note.
* fix(ssh): a forward that failed to bind is retried on the same transport
* fix(ssh): restore again when a restored forward closed; a reused local port replaces its old mapping
* fix(ssh): user forward edits and restores share one per-host queue
A restore that ran mid-edit could reopen the mapping the edit was
replacing and save both. Every add, edit, remove and restore for a host now
runs in order through the same queue.
* fix(ssh): pace forward restores and back off a forward that keeps failing
Each runtime call triggers a restore over the managed tunnel, and with
system SSH every attempt is a new login. Restores on the same transport
now run at most once per 30 s, a forward that keeps failing waits longer
each time, and teardown forgets both. A tunnel with no status yet counts
only outside a connect; a remove re-checks its forward inside the queue;
drop a circular listener test and the plain restart e2e case.
* fix(ssh): a start a teardown cancelled records no backoff
* fix(ssh): a reconnected transport retries failed forwards at once
* perf(lint): keep JS plugins out of default oxlint and adopt ast-grep
Any jsPlugin makes Oxlint hand every file's AST to Node, so the seven custom
plugins cost the default `oxlint` run several times its native time.
- Move app-store-performance, quadratic-buffer-concat, renderer-scrollbar-style
and ime-enter-guard (scope- or dataflow-aware) to config/oxlint-js-plugins.json,
run by `pnpm lint:js-plugins`, CI, lint-staged and the changed-lines gate.
- Port sort-comparator-performance, mobile-pairing and native-chat-design-tokens
to ast-grep rules with rule tests, and delete the plugins.
- Add @ast-grep/cli, config/sgconfig.yml, `pnpm lint:ast-grep` / `test:ast-grep`,
a CI step, and an ast-grep pass in check-changed-code-quality.
- Add flaky-test rules (wall-clock reads, real-time waits, polling loops,
unquarantined skips, unexplained timeout bumps), baselined by a count ratchet.
* Enforce flaky-test ratchet on changed files; refresh baseline
* docs(agents): keep custom-rule details out of AGENTS.md
* Resolve ast-grep from the repo so gate scans of other roots work
* feat(devex): component fixtures with headless screenshots for fast UI checks
Colocated *.fixture.tsx files export named fixtures (render + optional store
seed, setup, interact, width). A dev-only Vite entry (vite.fixtures.config.ts,
extending vite.web.config.ts) renders one fixture in isolation with the real
I18nProvider, TooltipProvider, theme class, default-seeded store, and the web
client's preload bridge (installWebPreloadApi) as window.api.
`pnpm fixtures:shot <id|glob> [--theme dark|light|both]` starts or reuses a
detached server (Vite + one headless Chromium) and writes PNGs to
.cache/fixtures/. A warm page re-renders in place (~100ms/shot) and reloads
only after source changes. A stdio MCP server (registered in .mcp.json)
exposes list_fixtures and screenshot_fixture.
Fixtures load only through import.meta.glob in the fixture entry, which is
not a production build input; oxlint rejects static imports of *.fixture.
* Keep fixture config and agent config inside reviewed root entries
* Baseline the fixture page's default-settings seed in the focus-read ratchet
* docs(agents): shorten fixtures pointer
* Allowlist the dev-only fixture explorer's labels in localization coverage
macOS: Option+Forward-Delete sends ESC d (delete word forward) for shells and inline agent TUIs, so Claude Code deletes a word instead of the whole line; full-screen non-agent apps (vim, nano, less) keep the native CSI 3;3~. Linux/Windows unchanged. Fixes#21491. Supersedes #21893.
Co-authored-by: bbingz <11211020+bbingz@users.noreply.github.com>
* refactor: group local and WSL filesystem watchers
* test: isolate startup ordering from watcher initialization
* test: collect the startup preflight subject once
Windows + Codex: Ctrl+V, Shift+Insert and Edit > Paste send multi-line pastes with Alt+Enter newlines like right-click already does (restoring #14456 wiring lost in a refactor), so pasted lines no longer submit one by one when Codex's paste-burst heuristic doesn't catch them (e.g. disable_paste_burst = true). macOS/Linux clients unchanged. Fixes#30470. Supersedes #30550.
Co-authored-by: STiFLeR7 <157357792+STiFLeR7@users.noreply.github.com>
Orchestration mailbox pointers now get their delayed Enter for Cursor too (the Cursor no-Enter skip from #3156 left mail delivered but never acted on). Verified with real cursor-agent. Fixes#19760. Supersedes #19761.
Co-authored-by: Maple <54388301+zleo-ai@users.noreply.github.com>
* fix(windows): respawn a ConPTY pane that started without an input reader
Bundled ConPTY occasionally starts a pane whose console host never reads
its input pipe: the shell prints its banner and prompt, but every keystroke
and the typed launch command are dropped. Such a pane is identifiable from
its first output, because a healthy one always queries DA1 before relaying
anything else. The daemon now waits for that first output, respawns once
when it is missing, and replays the buffered startup output so no byte is
lost. The table stress probe now waits for node-pty's own readiness rather
than typed input.
* fix(windows): bound the ConPTY startup check and never re-run a command
- Respawn only when no command rode in the shell's argv; otherwise keep the
pane and say on screen that it cannot take input.
- Accept the pane unverified after 5s of silence instead of stalling the spawn.
- Distrust the check after two misses with no pane ever announcing, so a
changed ConPTY build cannot respawn every pane.
- Kill a discarded pane through its job before closing the pseudoconsole.
- Report a cancel during the wait as an attach cancel, not a spawn failure.
- Assert on real Windows ConPTY that a fresh pane announces its input reader.
* fix(windows): respawn only Orca's own shell argv and close an unready pane now
- Treat user shell args like an argv startup command: never respawn, show
the notice instead, so a command such as pwsh -Command never runs twice.
- Close a discarded pane's pseudoconsole directly; node-pty defers kill()
until first output, which a silent pane never produces. Kill the shell by
pid when no job owns it.
- Reconcile a master node-pty retired during the startup wait.
- Drop the test-only respawn counter; the count rides in the daemon log.
* fix(windows): tear a discarded unready pane down through node-pty's agent
node-pty defers kill() until first output, so closing only the native
pseudoconsole left the input pipe and output worker of a silent discarded
pane alive until daemon exit. The agent's kill closes all three.
* fix(windows): discard startup panes by handle only; account for the mock prelude
A pid-addressed kill could hit a recycled pid when the shell exited during
startup; the job and the agent's native kill both act on handles. Lifecycle
assertions now expect the replayed DA1 query when the suite runs on Windows.
* test(e2e): give the mocked Windows pane its ConPTY prelude
* fix(runtime): keep another paired runtime's terminals when one runtime republishes a shared workspace
Desktop B can mirror one SSH workspace from two paired runtimes: the host's
server, which runs its terminals, and desktop A's app, which hosts a browser
tab A opened there. Any frame from A's app replaced every mirrored terminal
row in the workspace, so B dropped the server's terminals until the server's
next frame re-created them. A frame now replaces only the mirrored terminals
and chats its own runtime owns, matching how browser and editor rows were
already scoped.
Fixes#31983
Reported-by: amara-black
* fix(runtime): retire an omitted host's rows without waiting on a sibling host's replay
A tombstone now retires only its own host's rows, so the visibility-resume
repair no longer has to hold it back until every surviving host has a frame
to replay over the wiped workspace.
* refactor(runtime): one ownership rule for rows a paired runtime's frame may retire
Bindings first, then the frames that last published the row, then the
workspace's own server; owners that were removed no longer count, so any
runtime's frame can retire their rows.
* fix(runtime): address review on cross-runtime mirror ownership
Drop the workspace-owner guess for rows with no evidence, let a frame that
publishes the same chat take its row over, and refocus a surviving runtime's
terminal when the active one is retired.
* refactor(runtime): a mirrored terminal stays while any other live runtime claims it
Union pane bindings and last-frame mappings into one claim set, so a row two
runtimes share survives one runtime's retraction. Drop the chat ownership
extension: chats are shared across runtimes by session id, and the reported
bug is terminals only.
* refactor(runtime): claims come from the frames that published a terminal
A runtime that stopped publishing a terminal no longer claims it through a
cached pane binding; bindings only speak before any frame this session.
Keep the visibility-resume repair's survivor deferral as it was.
* fix(runtime): bound pane resources decide a mirrored terminal's runtime; chats follow the same rule
A shared terminal whose bound runtime drops it is retired and rebuilt by the
other runtime's next frame, so it never streams from a runtime that left.
Chats another live runtime owns survive this frame unless it publishes or
replaces them.
* fix(terminal): close another paired runtime's terminal on that runtime
A workspace can now keep terminals another runtime publishes, so a close
follows the runtime the tab's own PTY names before the workspace catalog.
* fix(runtime): only this machine or a live paired runtime keeps a chat another frame omits
Windows Codex: when a large dispatch/worker-start/agent prompt paste is still held in Codex's composer (Codex reads the paste as key events and treats an early Enter as a newline), Orca re-presses Enter only while the composer visibly holds exactly that pasted prompt, re-checking turn start, permission and the deadline right before each Enter, within the worker-start budget. Non-Windows unchanged except the blind launch retry is skipped once a turn starts. Fixes#11343.