Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

Merge branch 'main' into feat/server-claude-accounts-313

eneskirca8cd56c8f80bd
diff --cc CLAUDE.md
index 92c0902a6,28c3a466b..bac566892
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@@ -1318,9 -1322,22 +1322,22 @@@ else, and its context links must keep c
connection-cached `remoteHome` (skipped **fail-open** if home is unresolved). `AUTH_ENV_STRIP`
(`ANTHROPIC_API_KEY` / `ANTHROPIC_AUTH_TOKEN` / `CLAUDE_CODE_OAUTH_TOKEN`) is deleted from the
child env so a stray env key can't shadow the account. A **missing** account dir → warn +
- silent system fallback.
+ silent system fallback. **The account-scope names ride the LOCAL conf's `update-environment`
+ (`ACCOUNT_SCOPE_UPDATE_ENV`, issue #419)** — the shared tmux server inherits the env of the
+ client that STARTS it, so a server started by a managed-account node used to leak that
+ account's `CLAUDE_CONFIG_DIR` (and any un-stripped auth key) into every session created
+ without a `-e` override: system nodes, plain terminals and the missing-dir fallback silently
+ ran as that account ("the system account is entangled with the next account in the list").
+ Listing the names makes tmux copy each from the creating client's env and **strip it when the
+ client lacks it** (proven against a real tmux in `account-env.realtmux.test.ts`, seeded-server
+ case included; `ensureUpdateEnvKeys` retrofits a long-lived pre-fix server). The same listing
+ is what makes codex's explicit system-scope overwrite (`CODEX_HOME` /
+ `NODETERM_CODEX_ACCOUNT_ID`) actually reach sessions on a shared server. **LOCAL conf only**
+ — the remote conf must NOT get these names: a remote attach client's env is the login
+ shell's, and the copy/strip would run against that wrong environment (pinned in
+ `ssh.test.ts`).
- **Login flow** — Settings → Accounts → **Add** creates a `pending` account and drops a canvas
- **login node** that runs `claude /login` under the account dir. Main polls the dir's
+ **login node** that runs `claude /login` under the account dir. Core polls the dir's
`.claude.json` (`LOGIN_POLL_MS` 2 s, up to `LOGIN_TIMEOUT_MS` 5 min) for `oauthAccount.email`;
on capture the account flips out of `pending` with its email as the default label. Account
removal cancels any pending wait + `markDirty`. **Codex accounts have the same two halves** —