Fix Claude agents management status detection (#5179)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-06-11 01:43:38 -07:00
committed by GitHub
co-authored by Orca
parent c47e0d1848
commit 1ae8ebdc3f
10 changed files with 1487 additions and 67 deletions
+16
View File
@@ -0,0 +1,16 @@
// Why: shared between the runtime (dispatch guard, tui-idle fallback) and the
// renderer (agent-ready-wait, new-workspace). A bare shell is the negative
// signal for "is an agent running" because it garbles injected preambles.
const SHELL_NAMES = new Set(
'|bash|zsh|sh|fish|cmd|cmd.exe|powershell|powershell.exe|pwsh|pwsh.exe|nu'.split('|')
)
export function isShellProcess(processName: string): boolean {
const normalized = processName
.trim()
.replace(/^["']|["']$/g, '')
.toLowerCase()
return (
SHELL_NAMES.has(normalized) || SHELL_NAMES.has(normalized.split(/[\\/]/).pop() ?? normalized)
)
}