diff --git a/investigator-runtime/src/detectives/case_writer.ts b/investigator-runtime/src/detectives/case_writer.ts index e605c15..04ae51d 100644 --- a/investigator-runtime/src/detectives/case_writer.ts +++ b/investigator-runtime/src/detectives/case_writer.ts @@ -385,12 +385,15 @@ export async function runCaseWriter(task: CaseWriterTask): Promise< const systemPrompt = await readFile(PROMPT_PATH, "utf-8"); const prompt = buildPrompt(task, scenes, evidence, witnesses, gaps, tensions, brief, lang); - // Case-writer wants more output budget than the other detectives. + // Case-writer wants more time + budget than the other detectives. The + // enriched prompt (scenes + verbatim + anomalies + witnesses + tensions + + // strategic brief) produces a long bilingual narrative; 300s was too tight + // and timed out at the claude CLI. Floor at 600s. const llm = await callClaude({ prompt, systemPrompt, model: env.CLAUDE_MODEL, allowedTools: [], - timeoutMs: Math.max(env.JOB_TIMEOUT_SECONDS, 240) * 1000, + timeoutMs: Math.max(env.JOB_TIMEOUT_SECONDS, 600) * 1000, budgetCapUsd: task.budget_cap_usd ?? Math.max(env.BUDGET_CAP_USD_PER_JOB, 0.50), }); await audit({