feat(config): add workflow.subagent_timeout to replace hardcoded 5-minute limit
The map-codebase workflow had a hardcoded 300000ms (5 minute) timeout for parallel subagent tasks. On large codebases or with slower models (e.g. GPT via Codex), subagents can need 10-20+ minutes, causing the parent to kill still-working agents and fall back to sequential mode. Changes: - Add workflow.subagent_timeout config key (default: 300000ms) - Register in VALID_CONFIG_KEYS (config.cjs) - Add to loadConfig() defaults and return object (core.cjs) - Emit in map-codebase init context (init.cjs) - Update map-codebase.md to use config value instead of hardcoded 300000 - Document in planning-config.md reference Users can now increase the timeout via: /gsd:settings workflow.subagent_timeout 900000 Closes #1472 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
||||
AGENT_SKILLS_MAPPER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-codebase-mapper 2>/dev/null)
|
||||
```
|
||||
|
||||
Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`.
|
||||
Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`, `subagent_timeout`.
|
||||
</step>
|
||||
|
||||
<step name="check_existing">
|
||||
@@ -199,9 +199,11 @@ Wait for all 4 agents to complete using TaskOutput tool.
|
||||
TaskOutput tool:
|
||||
task_id: "{task_id from Agent result}"
|
||||
block: true
|
||||
timeout: 300000
|
||||
timeout: {subagent_timeout from init context, default 300000}
|
||||
```
|
||||
|
||||
> The timeout is configurable via `workflow.subagent_timeout` in `.planning/config.json` (milliseconds). Default: 300000 (5 minutes). Increase for large codebases or slower models.
|
||||
|
||||
Call TaskOutput for all 4 agents in parallel (single message with 4 TaskOutput calls).
|
||||
|
||||
Once all TaskOutput calls return, read each agent's output file to collect confirmations.
|
||||
|
||||
Reference in New Issue
Block a user