Skip to content

Stop the stall watchdog from aborting healthy parallel tool fan-outs - #383

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-5641-stall-watchdog-aborts-healthy-parallel-runs-because
Aug 8, 2026
Merged

Stop the stall watchdog from aborting healthy parallel tool fan-outs#383
TheGreatAxios merged 1 commit into
mainfrom
cl-5641-stall-watchdog-aborts-healthy-parallel-runs-because

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • awaitingResponse flips true the instant any one tool call in a parallel fan-out finishes, even while sibling calls are still running
  • The stall watchdog treated that flag alone as proof of silence, so a healthy multi-agent run got a false stall notice at 90s and a hard abort at 900s, killing every live sub-agent
  • Threaded activeToolCalls into ShouldAbortForStallArgs so outstanding tool calls suppress both the notice and the abort; genuine stalls (no active calls) still abort as before

Test plan

  • Added a failing test first: active tool call + awaitingResponse: true + 20-minute-stale lastActivityAt -> shouldAbortForStall false, shouldNoticeStall false; confirmed it failed before the fix
  • Existing genuine-stall tests (no active calls) still pass
  • bun run typecheck — only pre-existing, unrelated vendor/intx-inference/arktype errors
  • bun run build — passes
  • bun run test — 4080 pass, 1 pre-existing environment-dependent failure (lsp-availability.test.ts, unrelated to this change)

awaitingResponse flips true the instant any one tool call in a parallel
fan-out finishes, even while sibling calls are still running. The stall
check treated that flag alone as proof of silence, so a multi-agent run
with real work in flight got a false stall notice at 90s and a hard
abort at 900s, killing every still-running sub-agent. Outstanding tool
calls now suppress both the notice and the abort.
@linear-code

linear-code Bot commented Aug 8, 2026

Copy link
Copy Markdown

CL-5641

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Root-cause follow-up filed per Greybeard's review: CL-5661 (https://linear.app/abklabs/issue/CL-5661) — turn-state.ts's tool.done handler sets awaitingResponse unconditionally instead of gating on remaining activeToolCalls like inference.done/connector.reply already do. This PR's fix at the watchdog layer is correct and matches the Linear acceptance criteria; CL-5661 tracks fixing the underlying asymmetry at the source.

@TheGreatAxios
TheGreatAxios merged commit 3c0c14a into main Aug 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant