Repository navigation
fix(pi): settle prompts consumed by input handlers #33329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+55
−8
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
25bdf2c
fix(pi): settle a turn when an input handler consumes its prompt
StiensWout 5b52525
refactor(pi): scope command-only check to the prompt's own turn
StiensWout 0bd59af
test(pi): keep handled prompts open while native work is busy
StiensWout 8b4ac71
chore: credit the models that built this PR
StiensWout File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: pingdotgg/t3code
Length of output: 18480
Script executed:
Repository: pingdotgg/t3code
Length of output: 42386
Script executed:
Repository: pingdotgg/t3code
Length of output: 31088
Web query:
github earendil-works pi-coding-agent 1.5.0 rpc mode handleCommand prompt get_state async readlineResult:
Script executed:
Repository: pingdotgg/t3code
Length of output: 27943
Script executed:
Repository: pingdotgg/t3code
Length of output: 26636
Wait for pending steer ACKs before settling a handled prompt.
If a steer is awaiting an input handler when the turn-start ACK arrives, the new probe can see Pi as idle and complete the turn before the steer starts. The later work then loses its original turn ownership. Defer settlement until pending steer ACKs arrive, and rearm the probe afterward.
Script executed:
Repository: pingdotgg/t3code
Length of output: 7368
Script executed:
Repository: pingdotgg/t3code
Length of output: 37374
Script executed:
Repository: pingdotgg/t3code
Length of output: 37374
Script executed:
Repository: pingdotgg/t3code
Length of output: 23250
Script executed:
Repository: pingdotgg/t3code
Length of output: 28903
Script executed:
Repository: pingdotgg/t3code
Length of output: 28897
Preserve prompt response ownership before settling handled prompts.
If a steer’s input handler returns
handledbefore the initial prompt’s handler finishes, the FIFO assigns the steer response to the initial prompt. The new branch can then settle the turn while the initial prompt is still pending. Its later work loses turn ownership.Correlate responses with their prompts before applying handled settlement. Waiting for pending steer ACKs alone does not correct the swapped ownership.