perf: reuse normalized executable during agent recognition

This commit is contained in:
Orca Worker
2026-09-11 23:51:44 -07:00
parent 20ab995065
commit 9868eefa73
+1 -1
View File
@@ -289,7 +289,7 @@ export function recognizeAgentProcessFromCommandLine(
const keep = options?.includeHeadlessOneShot === true
const tokens = tokenizeCommandLine(commandLine)
const firstNormalized = normalizeProcessName(tokens[0])
let direct = recognizeAgentProcess(tokens[0])
let direct = recognizedAgentForProcess(firstNormalized)
// Why: the generic Orca CLI is not an agent; only this subcommand launches its TUI mode.
if (direct?.agent === 'claude-agent-teams' && tokens[1]?.toLowerCase() !== 'claude-teams') {
direct = null