-
-
Notifications
You must be signed in to change notification settings - Fork 53k
Description
Problem
When spawning subagents via sessions_spawn, the runTimeoutSeconds parameter must be set on every individual spawn call. There's no way to configure a global default.
The current agents.defaults.subagents config section supports:
maxConcurrentmaxSpawnDepthmaxChildrenPerAgentarchiveAfterMinutesmodelthinking
But no runTimeoutSeconds (or equivalent timeout default).
Proposed Solution
Add a runTimeoutSeconds (or defaultTimeoutSeconds) field to agents.defaults.subagents in the config schema:
{
"agents": {
"defaults": {
"subagents": {
"maxConcurrent": 8,
"runTimeoutSeconds": 1800
}
}
}
}This would serve as the default when sessions_spawn is called without an explicit runTimeoutSeconds. Individual spawns could still override it.
Use Case
Agents that manage teams of subagents (PM, Coder, QA, etc.) frequently spawn tasks that need 15-30 minutes. The current default (5-10 min) causes timeouts mid-work. Having to remember to pass the timeout on every spawn is error-prone — a config-level default would be much more reliable.
Current Workaround
Documenting the default in the agent's AGENTS.md file and relying on the agent to always pass it manually.