Uh oh!
There was an error while loading. Please reload this page.
fix(session): use parent link for loop exit - #29032
Conversation
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
The following comment was made by an LLM, it may be inaccurate: Potentially Related PRs Found:
The search results show related PRs that touch on session loop exit conditions and parent-child message relationships, but these appear to be older fixes addressing different aspects of the same system. PR #29032 (your current PR) is a distinct fix targeting the specific issue of using parent links for loop exit conditions instead of relying on message ID ordering. |
BestSithInEU
commented
May 23, 2026
Closing to recreate with the repository pull request template. |
Summary
Motivation
The current loop exit guard compares message IDs:
That can be fragile when user and assistant messages are created in different contexts or clocks, and can prevent the prompt loop from exiting even after a final assistant response.
Assistant messages are created with:
So checking that relationship is the direct condition.
This is related to reports of repeated
session.prompt step=N loopafter tool/assistant completion.Validation
bun run build -- --single --skip-install --skip-embed-web-uiopencode --versionbun turbo typecheckpassed during branch push hooksession.prompt ... exiting loopandsession.idle publishing