Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0a5567c
feat(codex): remember when a pane is kept on its account
QichangZheng Oct 14, 2026
d3d5d19
feat(codex): make "Keep old account" keep the pane
QichangZheng Oct 14, 2026
61ccf26
feat(agent-status): carry the account an agent runs on
QichangZheng Oct 14, 2026
c6c3729
feat(agent-accounts): publish each terminal agent's account
QichangZheng Oct 14, 2026
3c34427
feat(agent-accounts): remember kept conversations
QichangZheng Oct 14, 2026
9123b87
feat(codex): resume a kept conversation on its account
QichangZheng Oct 14, 2026
59099de
feat(claude): per-account pointer for agents started kept
QichangZheng Oct 14, 2026
920a7f4
feat(pty): start kept agents on their account in both spawn paths
QichangZheng Oct 14, 2026
35dd235
feat(tabs): show an agent's account and keep it from the tab menu
QichangZheng Oct 14, 2026
48aa22a
feat(status-bar): count terminal agents per account
QichangZheng Oct 14, 2026
40aa087
feat(accounts): say what removing an account does to kept agents
QichangZheng Oct 14, 2026
30708ba
docs(agents): explain keeping an agent on its account
QichangZheng Oct 14, 2026
baa2c51
test(e2e): keep agents through account switches
QichangZheng Oct 14, 2026
44c6b56
fix(accounts): read open tabs without tripping the layout-writer ratchet
QichangZheng Oct 14, 2026
17b1216
fix(codex): only "Keep old account" keeps a pane; Escape dismisses as…
QichangZheng Oct 14, 2026
7924b70
fix(agent-status): a facet-only republish drives no title, bell or te…
QichangZheng Oct 14, 2026
0250d60
fix(claude): harden per-account pointers for kept agents
QichangZheng Oct 14, 2026
255c4f4
refactor(agent-accounts): reuse the shared path key and persist backoff
QichangZheng Oct 14, 2026
17ee9e6
fix(agent-accounts): carry a keep through /clear, and un-keep the who…
QichangZheng Oct 14, 2026
5d0d2c3
fix(agent-accounts): un-keep an agent whose kept resume was refused
QichangZheng Oct 14, 2026
e59497a
fix(agent-accounts): a newer kept-agents file no longer refuses every…
QichangZheng Oct 14, 2026
63fe666
fix(tabs): keeping a Codex pane from the tab menu answers its switch …
QichangZheng Oct 14, 2026
db86ed9
fix(status-bar): count no agents in a store that never loaded tabs
QichangZheng Oct 14, 2026
0556df9
test(agent-status): spy on window effects without a new type assertion
QichangZheng Oct 14, 2026
ac1a40c
docs(agents): say un-keep works after a refused start, and what a rem…
QichangZheng Oct 14, 2026
213af57
fix(agent-accounts): a keep queued on an unreadable list applies on t…
QichangZheng Oct 14, 2026
75a5963
fix(agent-accounts): un-keeping says so when a newer Orca owns the list
QichangZheng Oct 14, 2026
5035087
fix(agent-accounts): un-keeping a Codex pane reports an unreadable la…
QichangZheng Oct 14, 2026
fc21c3c
Merge main into feat/agent-account-binding
QichangZheng Oct 17, 2026
f42f415
fix(agent-accounts): a kept agent whose terminal died stays un-keepab…
QichangZheng Oct 17, 2026
14bff45
Merge main into feat/agent-account-binding
QichangZheng Oct 17, 2026
2ee54a5
fix(agent-accounts): a Claude account switch never restarts a kept agent
QichangZheng Oct 17, 2026
91c602e
fix(agent-accounts): keep a kept Claude agent's facet across a restar…
QichangZheng Oct 17, 2026
4a78678
Merge main into feat/agent-account-binding
QichangZheng Oct 18, 2026
c6fb488
test(claude-accounts): compare a pointer's unchanged mtime in whole s…
QichangZheng Oct 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/site/content/docs/agents/claude-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Orca reads your local `~/.claude` usage state and shows current usage plus rate-

Orca supports multiple Claude accounts and can swap between them in one click, matching the Codex flow. Switching accounts works even with live Claude sessions running — Orca holds the in-progress switch behind a guard so you don't trigger overlapping auth refreshes. See [Hot-swap Codex accounts](/docs/agents/codex-hot-swap) — the Claude flow is identical in shape.

You can also keep one Claude agent on its account from its tab's right-click menu, so switching moves the others but not it: when Orca offers to restart Claude sessions still running on the old account, it leaves kept agents out. Orca then starts that conversation on the kept account whenever it restores, wakes or resumes it. If you keep an agent after it started, a `claude` you type again in that same terminal still follows the selected account; the tab's hover card says "Kept on this account from its next start" until Orca starts it again.

## Subagents and teams

Background subagents and Agent Teams teammates can show as expandable child rows under the lead agent in the worktree agent list and [Agent Dashboard](/docs/model/agents-sessions#agent-dashboard). Selecting a child focuses the lead terminal.
Expand Down
9 changes: 9 additions & 0 deletions docs/site/content/docs/agents/codex-hot-swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Running multiple Codex accounts to maximize tokens is common. Orca lets you hot-

Click the Codex chip in the status bar to open the account switcher. Pick an account; any new Codex session launched after that uses it. Sessions already running keep their original account until restarted.

## Keep an agent on its account

Hover a Codex or Claude tab to see which account each agent in it runs on. To keep one agent on its account while you switch the others, right-click its tab and check **Keep on** followed by the account's name (a split tab has one item per agent). Answering the **Account switched** prompt with **Keep old account** does the same.

A kept agent stays on its account when you switch accounts, and every start Orca makes of its conversation — after a restart of Orca, when the agent wakes, or when you resume it from Session History — runs on that account. Agents you don't keep follow the selected account exactly as before. The account switcher shows how many terminal agents run on each account.

Uncheck the item to let the agent follow the selected account again; this also works for an agent Orca refused to start on its kept account. Removing an account releases the agents kept on it. A `claude` you type in a Claude terminal kept on a removed account does not run; open a new terminal instead.

## System default

The **System default** row is your current host Codex login under `~/.codex`. Managed accounts (added in Orca) do not rewrite that login; they run in isolated homes. Select System default when you want launches to match a terminal `codex` outside Orca.
Expand All @@ -29,6 +37,7 @@ For managed Codex accounts, Orca mirrors settings from your real `~/.codex/confi
- Existing Codex processes keep their current account until restart.
- Usage readouts in the status bar follow the currently-active account.
- The restart chip preserves the active account at the time of restart.
- Keep is not offered for a Codex agent started while `CODEX_HOME` was set, or for terminals in WSL or on a remote host.

## Claude Code accounts

Expand Down
26 changes: 26 additions & 0 deletions src/main/agent-accounts/agent-account-keep-wiring.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { agentHookServer } from '../agent-hooks/server'
import { getCodexPaneAccount, setCodexPaneKept } from '../codex/codex-pane-account-registry'
import { keepStaleCodexPanes } from '../codex/codex-stale-pane-accounts'
import { getPtyIdForPaneKey, ptyPaneKey } from '../ipc/pty/pane/key-state'
import type { AgentKeepDeps } from './agent-account-keep'
import { getAgentRunAccounts, getKeptAgentConversations } from './agent-run-accounts-installed'

/** Null where the producer is not installed (orcad): there, keeping is not offered. */
export function installedAgentKeepDeps(): AgentKeepDeps | null {
const producer = getAgentRunAccounts()
const kept = getKeptAgentConversations()
if (!producer || !kept) {
return null
}
return {
getRow: (paneKey) => agentHookServer.getRunAccountRow(paneKey),
refresh: (paneKey) => producer.refresh(paneKey),
withdraw: (paneKey) => producer.withdraw(paneKey),
kept,
getPtyIdForPaneKey,
getPaneKeyForPty: (ptyId) => ptyPaneKey.get(ptyId),
readCodexRecord: getCodexPaneAccount,
setCodexPaneKept,
keepStaleCodexPanes
}
}
Loading