Repository navigation
fix(agent): Do not yield after a step that ends the run - #3398
Merged
Merged
Conversation
A yield was checked before the run-ended check. When a soft yield was due
right after noReply, the Turn parked at the tool-result tail. The resumed
slice called the model again, and its text ("Nothing was posted to Slack
this turn...") was posted as the reply, because the noReply from the
earlier slice was not part of the new messages.
Check run-ended first. No step follows a reply, noReply, or blocked
report, so there is nothing to resume.
Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 13, 2026
BYK
enabled auto-merge (squash)
November 13, 2026 22:32
This comment has been minimized.
This comment has been minimized.
Contributor
|
23 screenshot changes — 23 changed · 0 added · 0 removed Review screenshots in Frameshift Show 12 more changed screenshots5 more changed screenshots in Frameshift. |
23 tasks done
This branch was successfully deployed
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.
An Event Turn on #3395 called
noReplywith a note. Then Junior posted this to Slack:The Turn had run for about 3 minutes, so a soft yield was due. The step listener checked for a yield before it checked whether the run had ended. So it parked the Turn at the
noReplytool result. The resumed slice called the model again, and the model wrote that text.buildTurnResultreadsnoReplyonly from the new messages of the slice, so the text became the reply.Now the
turn_endlistener checks run-ended first. A reply,noReply, or blocked report has no next step, so nothing is left to resume.Behavior change: a dispatch Turn that ends with
replywhile a yield is due now finishes in one slice. Before, it parked and resumed into the gated answer guard. That guard stays for crash recovery.The fake agent in
agent-run-provider-retry.test.tsyielded at aturn_endwith no tool results. Real Pi emits that only after the final response, so the fake now yields after a tool batch.via @BYK.
--
View Session [Sentry]