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.

feat(settings): say so when the local CLI is too old for the Auto permission mode

enes10c2455dff68
diff --git a/src/renderer/components/settings/FieldRow.tsx b/src/renderer/components/settings/FieldRow.tsx
index 80280f234..494c267ce 100644
--- a/src/renderer/components/settings/FieldRow.tsx
+++ b/src/renderer/components/settings/FieldRow.tsx
@@ -1,14 +1,18 @@
import type React from 'react'
-/** label (+ optional description) on the left, a control on the right. */
+/** label (+ optional description, + optional highlighted note) on the left, a control on the right. */
export function FieldRow({
label,
description,
+ note,
control,
htmlFor
}: {
label: string
description?: string
+ /** A caveat about the current value (e.g. "this setting can't take effect here") — same size as
+ * the description but in the warning accent, so it reads as a state, not as help text. */
+ note?: string
control: React.ReactNode
htmlFor?: string
}): React.JSX.Element {
@@ -21,6 +25,9 @@ export function FieldRow({
{description ? (
<p className="mt-1 text-[13px] leading-relaxed text-muted">{description}</p>
) : null}
+ {note ? (
+ <p className="mt-1 text-[12px] leading-relaxed text-[#ff9f0a]">{note}</p>
+ ) : null}
</div>
<div className="shrink-0">{control}</div>
</div>
diff --git a/src/renderer/components/settings/sections/AgentsSection.tsx b/src/renderer/components/settings/sections/AgentsSection.tsx
index 8c9ae9568..06e725f81 100644
--- a/src/renderer/components/settings/sections/AgentsSection.tsx
+++ b/src/renderer/components/settings/sections/AgentsSection.tsx
@@ -1,12 +1,16 @@
+import { useEffect, useState } from 'react'
import { useSettings } from '../../../state/settings'
import {
isAgentEnabled,
setAgentEnabled,
setDefaultAgent
} from '../../../state/agentAvailability'
+import { ensureClaudeCliCaps } from '../../../state/permissionMode'
+import type { ClaudeCliCaps } from '@shared/types'
import {
AGENT_CONFIG,
ALL_PERMISSION_MODES,
+ AUTO_PERMISSION_MODE_MIN_VERSION,
BUILTIN_AGENT_IDS,
PERMISSION_MODE_LABELS,
type AgentId,
@@ -51,6 +55,28 @@ export function AgentsSection({ isActive }: { isActive: boolean }): React.JSX.El
...BUILTIN_AGENT_IDS.map((id) => ({ id, label: AGENT_CONFIG[id].label, isBuiltin: true })),
...settings.customAgents.map((c) => ({ id: c.id, label: c.label || c.id, isBuiltin: false }))
]
+
+ // The LOCAL Claude CLI's capabilities (the same memoized probe the launch path uses — no extra
+ // IPC). `Auto` is silently dropped on a CLI older than the floor (it exits 1 on the flag), and a
+ // setting that quietly does nothing reads as a broken setting — so say it where it's picked.
+ // Remote (SSH) projects run their own CLI; this note is about the machine running the app.
+ const [cliCaps, setCliCaps] = useState<ClaudeCliCaps | null>(null)
+ useEffect(() => {
+ let alive = true
+ void ensureClaudeCliCaps().then((c) => {
+ if (alive) setCliCaps(c)
+ })
+ return () => {
+ alive = false
+ }
+ }, [])
+ // Only when the probe actually READ a version: an unknown version (probe failed / no CLI) is not
+ // evidence of an old CLI, and guessing would be its own kind of wrong.
+ const autoNote =
+ settings.claudePermissionMode === 'auto' && cliCaps?.version && !cliCaps.autoPermissionMode
+ ? `Your Claude CLI (${cliCaps.version.split(/\s+/)[0]}) doesn't support Auto — sessions start in "${PERMISSION_MODE_LABELS.manual}". Requires Claude Code ${AUTO_PERMISSION_MODE_MIN_VERSION} or newer.`
+ : undefined
+
return (
<SettingsSection
id="agents"
@@ -94,6 +120,7 @@ export function AgentsSection({ isActive }: { isActive: boolean }): React.JSX.El
<SearchableRow {...ROWS.permissionMode}>
<FieldRow
label="Permission mode"
+ note={autoNote}
description="The mode Claude terminal sessions start in (chat nodes are not affected). Shift+Tab still switches modes at any time. Projects can override this from the tab ⌄ menu."
control={
<Select