Repository navigation
fix(think): a recovery attempt runs outside the turn its run was started in (F29) - #3491
Closed
mattzcarey wants to merge 2 commits into
Closed
mattzcarey wants to merge 2 commits into
mattzcarey wants to merge 2 commits into
Conversation
|
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
Contributor
|
✅ agents import sizes: no significant changes ( |
mattzcarey
marked this pull request as draft
November 27, 2026 16:51
mattzcarey
marked this pull request as ready for review
November 27, 2026 16:51
mattzcarey
force-pushed
the
slim/turn-task-f29
branch
3 times, most recently
from
November 28, 2026 14:32
046e2e9 to
200b308
Compare
mattzcarey
force-pushed
the
slim/turn-task-f29
branch
from
November 28, 2026 14:33
200b308 to
1fe1f2b
Compare
…ce the turn has ended
mattzcarey
force-pushed
the
slim/turn-task-f29
branch
from
November 28, 2026 14:45
1fe1f2b to
72c24c7
Compare
Member
Author
|
Replaced by #3503, which carries this change with the rest of its unit, integrated and tested together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Think's chat recovery attempt now runs outside the context of the turn whose run carries it, so
continueLastTurnin a recovery no longer fails with "cannot be called from inside an active turn".A stalled turn could be given up with
recovery_errornow and then:chat-recovery-public, "gives a stalled turn up at stall maxAttempts + 1…"); not in a release, where an attempt was a run of its own started from the alarmTests ran:
think-session.test.ts,chat-recovery-public.test.ts,channel-recovery.test.tsandempty-reply.test.tson the class. The new test starts a recovery run from inside a turn and failed before the fix; it is class-only (the harness-backed Think has no attempt callback).Cost: none. How to probe: stall a Think turn with
chatRecoveryon (a model stream that goes quiet pastchatStreamStallTimeoutMs), many times; no turn ends withrecovery_errorand "cannot be called from inside an active turn" does not appear in the logs.