{"record":{"id":"0c880b699f61dbb7","repo":"Hmbown/CodeWhale","slug":"child-wall-time-budget-exhausted-limit-s-rai","errorCode":null,"errorMessage":"child wall-time budget exhausted (limit: {}s); raise it with wall_time_secs or split the work into smaller independent tasks","messagePattern":"child wall-time budget exhausted \\(limit: (.+?)s\\); raise it with wall_time_secs or split the work into smaller independent tasks","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/tools/subagent/mod.rs","lineNumber":9942,"sourceCode":"                    acquire_queued_launch_permit(&task, Arc::clone(gate)),\n                )\n                .await\n                {\n                    Ok(permit) => _launch_permit = permit,\n                    Err(_) => launch_wait_timed_out = true,\n                }\n            }\n            Err(tokio::sync::TryAcquireError::Closed) => {\n                crate::logging::warn(format!(\n                    \"sub-agent launch gate closed for {}; proceeding without backpressure\",\n                    task.agent_id\n                ));\n            }\n        }\n    }\n\n    let result = if launch_wait_timed_out {\n        Err(anyhow!(child_wall_time_exhausted_reason(task.wall_time)))\n    } else {\n        tokio::time::timeout_at(\n            deadline.into(),\n            run_subagent(\n                &task.runtime,\n                task.agent_id.clone(),\n                task.agent_type,\n                task.prompt,\n                task.assignment,\n                task.allowed_tools,\n                task.fork_context,\n                task.started_at,\n                task.max_steps,\n                task.token_budget,\n                task.input_rx,\n            ),\n        )\n        .await","sourceCodeStart":9924,"sourceCodeEnd":9960,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tools/subagent/mod.rs#L9924-L9960","documentation":"The child's wall-time budget expired: either the launch-gate wait consumed the entire budget before the child started (launch_wait_timed_out), or run_subagent did not finish by the deadline via tokio::time::timeout_at. The budget comes from wall_time_secs at spawn (or the agent profile's default_wall_time, else DEFAULT_CHILD_WALL_TIME), and the error names the limit in seconds so you know what to raise.","triggerScenarios":"Spawning with wall_time_secs too small for the assignment; large fan-outs where launch-gate backpressure delays start until the deadline; slow provider steps or stuck tool calls burning the clock.","commonSituations":"Heavy tasks spawned with default budgets; many concurrent children queuing on the launch gate so each starts with almost no budget left; provider latency spikes or API-timeout retry storms (each retried step still consumes wall time).","solutions":["Raise wall_time_secs at spawn (or the agent profile's default_wall_time) comfortably above expected run time.","Split the assignment into smaller independent child tasks that each fit the budget.","Reduce fan-out concurrency so the launch gate doesn't consume each child's budget before it starts.","Check for stuck steps: per-step API timeouts get their own retry budget (SUBAGENT_API_TIMEOUT_MAX_RETRIES), so repeated slow provider calls can still eat wall time — consider a smaller step timeout."],"exampleFix":"// before\ninput[\"wall_time_secs\"] = json!(60); // heavy task -> Err 1219\n\n// after\ninput[\"wall_time_secs\"] = json!(900);\n// or split the work into smaller child assignments","handlingStrategy":"retry","validationCode":"// Budget sanity check before spawn: estimated work must fit the wall clock.\nlet budget_secs = input[\"wall_time_secs\"].as_u64().unwrap_or(DEFAULT_CHILD_WALL_TIME_SECS);\nif estimated_task_secs > budget_secs {\n    input[\"wall_time_secs\"] = json!(estimated_task_secs * 2);\n}","typeGuard":null,"tryCatchPattern":"match run_child(task).await {\n    Err(e) if e.to_string().contains(\"wall-time budget exhausted\") => {\n        // read the named limit, raise wall_time_secs (or split the task), then retry once\n    }\n    r => r?,\n}","preventionTips":["Set wall_time_secs per assignment size instead of relying on the default.","Cap fan-out concurrency so the launch gate doesn't consume each child's budget.","Split large assignments into smaller independent child tasks.","Watch for provider latency spikes: retried slow steps still burn wall time."],"tags":["subagent","timeout","wall-time","concurrency","rust"],"backgroundTag":"operation-timeout","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}