Files
gbrain/test
2de65136c5 fix(subagent): bound per-tool execution with timeout + idempotent retry (takeover of #2086)
toolLoop and the legacy Anthropic subagent path ran handler.execute()
unbounded — a wedged pooler or half-open client socket squatted the worker
slot until the JOB-level wall-clock timeout reaped the whole job. Every tool
call is now bounded by GBRAIN_SUBAGENT_TOOL_TIMEOUT_MS (default 60s) and
idempotent tools retry transient/timeout failures up to
GBRAIN_SUBAGENT_TOOL_MAX_ATTEMPTS (default 2, parsed as a count — not through
resolveAiTimeoutMs). Retries emit a typed tool_retry heartbeat (no casts).

The original PR's queue.ts retryJob hunk is dropped: master already resets
started_at/attempts on retry.

Co-authored-by: JiraiyaETH <JiraiyaETH@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:50:43 -07:00
..