Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A paginate step sends its page requests the same way an action step does, but got no abort signal, so after reporting its timeout it kept fetching pages in the background. It now shares the action step's controller: a timeout aborts the in-flight page and no further page is requested or reported, even when a page resolves late. Docs: the step-type reference said a timed-out step's API call is never cancelled. That is now wrong for action and paginate steps; it says which step types abort and which keep running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two tests wait for an abort to reject a request against a local server. If the signal ever stops reaching fetch, they waited forever and hung the whole run (CI would sit until its 6-hour limit). A test-level timeout does not help: the timed-out body never reaches its finally, so the server stays open and keeps the process alive. Bound the waits in the body instead, so the test fails in 5s and still closes its server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main took 2.16.1 (withoneai#244) while this PR was open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @RachitSrivastava12, this is a real bug and a careful fix. I reproduced it on main with I pushed a few changes to your branch so we can ship it:
CI is green on Ubuntu and Windows for Node 22, 24 and 26. Loop, parallel, while and sub-flow steps still keep running the steps inside them after a timeout. That problem predates this PR, so we'll fix it separately. Thanks again! |
Appreciate it @paulkr |
Flow action steps could report a timeout while the underlying request was still running. A slow preflight could also finish after the timeout and dispatch a write.
This change propagates an
AbortSignalthrough connection lookup, action-details resolution, and passthrough requests, so timed-out actions can be cancelled before further work is dispatched.It also preserves the existing retry/backoff behavior and carries the signal across same-origin redirects.
Added regression tests for in-flight cancellation, late preflight responses, stale-cache fallback, retries, and redirect handling.
Tested
npm run typechecknpm run buildnpm test— 891 passed, 6 existing config test failures on macOSgit diff --cached --checkAborting a request doesn't guarantee a remote write was rolled back. Retries can still overlap an earlier request that hasn't settled, particularly with zero retry delay.