diff --git a/src/headless-triage.ts b/src/headless-triage.ts index 85a51bb2c..d97873ea1 100644 --- a/src/headless-triage.ts +++ b/src/headless-triage.ts @@ -443,6 +443,11 @@ async function defaultAgentRunner( tools: options.tools ?? agent.tools, }) ?? agent.systemPrompt; const appendedPrompt = `${composed}\n\n## Task Input\n\n${task}`; + // noOutputTimeoutMs = 60000 (60s): without this, a hung session.prompt + // (sf-mp8e02m1-zpk903 — Promise deadlock pre-LLM-dispatch with 0 syscall + // activity) blocks for the full timeoutMs (8min) before the parent + // abort fires. 60s no-output captures the hang fast enough to keep the + // autonomous loop moving while the root-cause investigation continues. const result = await runSubagent( { systemPrompt: appendedPrompt, @@ -452,7 +457,7 @@ async function defaultAgentRunner( name: agent.name, }, task, - { timeoutMs: DEFAULT_AGENT_TIMEOUT_MS }, + { timeoutMs: DEFAULT_AGENT_TIMEOUT_MS, noOutputTimeoutMs: 60_000 }, ); return { ok: result.ok,