File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -864,11 +864,11 @@ export async function processChat(
864864 const hasActiveClients = channel . sse . clients . size > 0 ;
865865 // Keep interactive web turns bounded so stalled sessions still reach a
866866 // terminal state, but do not clamp them too aggressively. A 5 minute cap
867- // proved too short for legitimate long-running tool workflows, and 15
868- // minutes has still been a little tight for some real sessions, so allow up
869- // to 20 minutes here while still respecting any lower global timeout.
867+ // proved too short for legitimate long-running tool workflows, 20 minutes
868+ // has still been too tight for some real sessions, so allow up to 40
869+ // minutes here while still respecting any lower global timeout.
870870 const agentRuntimeConfig = getAgentRuntimeConfig ( ) ;
871- const INTERACTIVE_WEB_TIMEOUT_MS = Math . min ( agentRuntimeConfig . timeoutMs , 20 * 60 * 1000 ) ;
871+ const INTERACTIVE_WEB_TIMEOUT_MS = Math . min ( agentRuntimeConfig . timeoutMs , 40 * 60 * 1000 ) ;
872872 const timeoutMs = hasActiveClients
873873 ? INTERACTIVE_WEB_TIMEOUT_MS
874874 : ( agentRuntimeConfig . backgroundTimeoutMs > 0 ? agentRuntimeConfig . backgroundTimeoutMs : agentRuntimeConfig . timeoutMs ) ;
Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ export const AGENT_RUNTIME_CONFIG = Object.freeze<AgentRuntimeConfig>({
396396 envConfig . PICLAW_AGENT_TIMEOUT ||
397397 process . env . AGENT_TIMEOUT ||
398398 envConfig . AGENT_TIMEOUT ||
399- "1800000 " ,
399+ "3600000 " ,
400400 10
401401 ) ,
402402 backgroundTimeoutMs : parseInt (
Original file line number Diff line number Diff line change @@ -332,6 +332,19 @@ test("agent runtime config getter groups foreground and background timeout setti
332332 ) ;
333333} ) ;
334334
335+ test ( "agent runtime config defaults to a one-hour foreground timeout" , async ( ) => {
336+ await withTempWorkspaceEnv (
337+ "piclaw-config-" ,
338+ { } ,
339+ async ( ) => {
340+ const cfg = await importFresh < typeof import ( "../../src/core/config.js" ) > ( "../src/core/config.js" ) ;
341+
342+ expect ( cfg . AGENT_RUNTIME_CONFIG . timeoutMs ) . toBe ( 3600000 ) ;
343+ expect ( cfg . AGENT_RUNTIME_CONFIG . backgroundTimeoutMs ) . toBe ( 0 ) ;
344+ } ,
345+ ) ;
346+ } ) ;
347+
335348test ( "runtime timing config getter groups poll intervals and timezone" , async ( ) => {
336349 await withTempWorkspaceEnv (
337350 "piclaw-config-" ,
You can’t perform that action at this time.
0 commit comments