#21004: feat(runtime): enable loop detection by default + support timeout=0
docs
gateway
commands
agents
size: S
Cluster:
Timeouts and Memory Management Fixes
## Summary
- enable tool-loop detection by default
- allow `agents.defaults.timeoutSeconds = 0` to represent no-timeout (timer-safe max delay internally)
- align gateway timeout parsing and tests with new timeout semantics
- update config schema/help/docs (including zh-CN docs) for new defaults
## Why
This reduces runaway tool-loop incidents out of the box and makes timeout behavior explicit and consistent across runtime + gateway paths.
## Validation
- `pnpm vitest run --config vitest.unit.config.ts src/agents/tool-loop-detection.test.ts src/agents/subagent-depth.test.ts`
- `pnpm vitest run --config vitest.e2e.config.ts src/commands/agent-via-gateway.e2e.test.ts`
Most Similar PRs
#12477: fix(agents): prevent TimeoutOverflowWarning when timeout is disabled
by skylarkoo7 · 2026-02-09
62.9%
#8332: fix: add per-tool-call timeout to prevent agent hangs (v2 - fixes m...
by vishaltandale00 · 2026-02-03
62.0%
#22589: fix: trigger failover on gateway websocket connection errors
by pandego · 2026-02-21
61.5%
#7615: fix(gateway): add request timeout to GatewayClient
by alamine42 · 2026-02-03
61.0%
#16856: feat(agents): add tool execution duration tracking with configurabl...
by EunHyeokJung · 2026-02-15
60.4%
#10636: fix: setTimeout integer overflow causing server crash
by devmangel · 2026-02-06
59.5%
#23153: feat(pipeline): fix agent timeouts, engine logging, and enhanced JS...
by Sashamine · 2026-02-22
59.0%
#22110: fix(tools): prefer loopback for internal tool-to-gateway RPC calls
by pierreeurope · 2026-02-20
58.7%
#18221: fix(cli): raise cron command timeout to 90s and retry read-only RPCs
by BinHPdev · 2026-02-16
58.0%
#6268: fix: add timeout to compaction retry to prevent session lockout
by batumilove · 2026-02-01
58.0%