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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(agents): the auto permission mode floor is claude 2.1.71, not 2.1.90 (measured)
enes288afe6baf72
diff --git a/src/core/claude-cli.ts b/src/core/claude-cli.tsindex d525c0e8b..d07b6c782 100644--- a/src/core/claude-cli.ts+++ b/src/core/claude-cli.ts@@ -1,5 +1,5 @@// Capability probe for the LOCAL Claude CLI. Today it answers exactly one question — does this-// CLI accept `--permission-mode auto`? (Claude Code >= 2.1.90; older CLIs exit 1 on the value, see+// CLI accept `--permission-mode auto`? (Claude Code >= 2.1.71; older CLIs exit 1 on the value, see// AUTO_PERMISSION_MODE_MIN_VERSION) — but it is shaped as a caps bag so the next version-gated// flag lands here instead of growing another probe.//diff --git a/src/main/remote-ssh/ssh-project.ts b/src/main/remote-ssh/ssh-project.tsindex 9614c64ec..2709d3181 100644--- a/src/main/remote-ssh/ssh-project.ts+++ b/src/main/remote-ssh/ssh-project.ts@@ -51,7 +51,7 @@ interface Conn {/** The project's remote repo cwd (Phase 4). Lets `refForRemoteCwd` route remote git ops to this* connection's master. Undefined when the project has no folder selected. */remoteCwd?: string- /** Does the REMOTE host's claude CLI accept `--permission-mode auto` (>= 2.1.90)? Probed once at+ /** Does the REMOTE host's claude CLI accept `--permission-mode auto` (>= 2.1.71)? Probed once at* connect: the remote CLI can be older than the local one, and the local answer must never be* applied to a remote launch. Undefined/false ⇒ the renderer omits the flag for this project's* Claude nodes (bare command — today's behavior), never a failed launch. */@@ -211,7 +211,7 @@ export class SshProjectManager {}}// Probe the REMOTE claude CLI once per connect: `--permission-mode auto` only exists in- // >= 2.1.90 and the host's CLI may be older than the local one. Unknown ⇒ false ⇒ the+ // >= 2.1.71 and the host's CLI may be older than the local one. Unknown ⇒ false ⇒ the// renderer launches this project's Claude nodes with the bare command (fail-open).const claudeAutoPermissionMode = supportsAutoPermissionMode(await this.remoteClaudeVersion(conn, controlPath)diff --git a/src/renderer/boot.tsx b/src/renderer/boot.tsxindex f585a553d..97f43f778 100644--- a/src/renderer/boot.tsx+++ b/src/renderer/boot.tsx@@ -6,7 +6,7 @@ import './styles.css'import './tailwind.css'// Probe the local Claude CLI once, up front (never awaited — a launch is never blocked on it):-// `--permission-mode auto` only exists in Claude Code >= 2.1.90, and until we know the version we+// `--permission-mode auto` only exists in Claude Code >= 2.1.71, and until we know the version we// conservatively omit the flag. The shell warms the same memo at startup, so this normally// resolves immediately.void ensureClaudeCliCaps()diff --git a/src/renderer/state/permissionMode.test.ts b/src/renderer/state/permissionMode.test.tsindex 7e883db93..0fb8d0d5b 100644--- a/src/renderer/state/permissionMode.test.ts+++ b/src/renderer/state/permissionMode.test.ts@@ -73,7 +73,7 @@ describe('activePermissionMode', () => {})})-// The whole point of the version gate: `auto` is our DEFAULT, and a Claude CLI < 2.1.90 exits 1+// The whole point of the version gate: `auto` is our DEFAULT, and a Claude CLI < 2.1.71 exits 1// on `--permission-mode auto`. Degrading to `manual` (= no flag) keeps every launch working.describe('activePermissionMode — the `auto` version gate', () => {it('keeps auto when the local CLI is new enough', async () => {diff --git a/src/renderer/state/permissionMode.ts b/src/renderer/state/permissionMode.tsindex 73bd1b7b5..aec897f0b 100644--- a/src/renderer/state/permissionMode.ts+++ b/src/renderer/state/permissionMode.ts@@ -51,7 +51,7 @@ function autoSupportedFor(project: Project | undefined): boolean {/*** The permission mode a session launched RIGHT NOW actually starts in: the active project's* override, else the global setting — with `auto` degraded to `manual` (no flag → bare command)- * when the CLI that will run it is too old to know the value (Claude Code < 2.1.90, which exits 1+ * when the CLI that will run it is too old to know the value (Claude Code < 2.1.71, which exits 1* on it) or hasn't been probed yet. The other four modes are never touched by the gate.** Lives in its own module rather than in workspace.ts because projects.ts imports workspace.tsdiff --git a/src/renderer/state/sshConn.ts b/src/renderer/state/sshConn.tsindex 34398d8fa..c63f37346 100644--- a/src/renderer/state/sshConn.ts+++ b/src/renderer/state/sshConn.ts@@ -13,7 +13,7 @@ export interface SshConnInfo {/** The connection's resolved remote `$HOME`. Used to build an ABSOLUTE remote* `CLAUDE_CONFIG_DIR` for a managed remote account. Optional: absent if it couldn't resolve. */remoteHome?: string- /** Does the REMOTE host's claude CLI accept `--permission-mode auto` (>= 2.1.90)? Probed on the+ /** Does the REMOTE host's claude CLI accept `--permission-mode auto` (>= 2.1.71)? Probed on the* host at connect — the local CLI's answer says nothing about the remote one. Absent/false ⇒* this project's Claude nodes launch with the bare command (no `auto` flag). */claudeAutoPermissionMode?: booleandiff --git a/src/shared/agents/auto-mode-gate.test.ts b/src/shared/agents/auto-mode-gate.test.tsindex 85d96aa3e..65bf444e2 100644--- a/src/shared/agents/auto-mode-gate.test.ts+++ b/src/shared/agents/auto-mode-gate.test.ts@@ -1,4 +1,4 @@-// The `auto` permission mode only exists in Claude Code >= 2.1.90. Older CLIs REJECT it+// The `auto` permission mode only exists in Claude Code >= 2.1.71. Older CLIs REJECT it// (`error: option '--permission-mode <mode>' argument 'auto' is invalid.` → exit 1), which would// kill every Claude node launch. These tests pin the version predicate + the gate that degrades// `auto` to the bare command (and nothing else) when the CLI is too old or unknown.@@ -14,9 +14,9 @@ import {describe('supportsAutoPermissionMode', () => {it('accepts the first version that knows `auto` and everything above it', () => {- expect(AUTO_PERMISSION_MODE_MIN_VERSION).toBe('2.1.90')- expect(supportsAutoPermissionMode('2.1.90')).toBe(true)- expect(supportsAutoPermissionMode('2.1.91')).toBe(true)+ expect(AUTO_PERMISSION_MODE_MIN_VERSION).toBe('2.1.71')+ expect(supportsAutoPermissionMode('2.1.71')).toBe(true)+ expect(supportsAutoPermissionMode('2.1.72')).toBe(true)expect(supportsAutoPermissionMode('2.1.207')).toBe(true)expect(supportsAutoPermissionMode('2.2.0')).toBe(true)expect(supportsAutoPermissionMode('3.0.0')).toBe(true)@@ -24,14 +24,15 @@ describe('supportsAutoPermissionMode', () => {it('rejects the versions that reject the flag value', () => {expect(supportsAutoPermissionMode('2.1.50')).toBe(false)- expect(supportsAutoPermissionMode('2.1.89')).toBe(false)+ // 2.1.70 is the last version confirmed to reject `auto`; 2.1.71 is the measured boundary.+ expect(supportsAutoPermissionMode('2.1.70')).toBe(false)expect(supportsAutoPermissionMode('2.0.99')).toBe(false)expect(supportsAutoPermissionMode('1.9.999')).toBe(false)})it('reads the real `claude --version` output shape', () => {expect(supportsAutoPermissionMode('2.1.207 (Claude Code)')).toBe(true)- expect(supportsAutoPermissionMode('2.1.50 (Claude Code)\n')).toBe(false)+ expect(supportsAutoPermissionMode('2.1.70 (Claude Code)\n')).toBe(false)})it('fails open (unsupported) on anything it cannot read', () => {diff --git a/src/shared/agents/config.ts b/src/shared/agents/config.tsindex 623a7cd45..6a014b7eb 100644--- a/src/shared/agents/config.ts+++ b/src/shared/agents/config.ts@@ -132,8 +132,11 @@ export type AgentPermissionMode = 'manual' | 'auto' | 'acceptEdits' | 'plan' | '* Allowed choices are acceptEdits, bypassPermissions, default, dontAsk, plan.* Since `auto` is our default, an ungated flag would break every Claude launch on an older CLI.* The other four modes are accepted by every CLI we support, so ONLY `auto` is gated.+ *+ * MEASURED, not guessed: 2.1.0 through 2.1.70 reject `auto`; 2.1.71 is the first published+ * version that accepts it (verified by running each published tarball's CLI directly).*/-export const AUTO_PERMISSION_MODE_MIN_VERSION = '2.1.90'+export const AUTO_PERMISSION_MODE_MIN_VERSION = '2.1.71'const MIN_AUTO_VERSION: readonly number[] = AUTO_PERMISSION_MODE_MIN_VERSION.split('.').map(Number)diff --git a/src/shared/types.ts b/src/shared/types.tsindex 9f22ff249..df57bb9db 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -378,7 +378,7 @@ export interface Settings {/** The permission mode Claude TERMINAL (CLI) sessions START in — passed as `--permission-mode`* at launch; Shift+Tab still cycles modes at runtime. SDK chat nodes are NOT covered (the chat* driver runs in `default`). Overridable per project via Project.defaultPermissionMode.- * `auto` is version-gated: CLIs below 2.1.90 reject the value, so it degrades to no flag. */+ * `auto` is version-gated: CLIs below 2.1.71 reject the value, so it degrades to no flag. */claudePermissionMode: AgentPermissionMode/** Send anonymous usage data (version/OS) to the telemetry backend. Opt-in (default off)* so we never collect without explicit consent (GDPR). Toggle in Settings → Privacy. */@@ -871,7 +871,7 @@ export interface TranscriptsApi {* is unknown (missing CLI, timeout, unreadable output). */export interface ClaudeCliCaps {version: string | null- /** `--permission-mode auto` is only accepted by Claude Code >= 2.1.90. */+ /** `--permission-mode auto` is only accepted by Claude Code >= 2.1.71. */autoPermissionMode: boolean}