feat(pi): add active-turn steering via native steer RPC - #3752
Open
mcowger wants to merge 1 commit into
Open
Conversation
mcowger
marked this pull request as ready for review
August 23, 2026 17:53
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.
Summary
Adds active-turn steering for pi, completing the provider matrix started for Claude (#3394), Codex, and OpenCode (#3580). Sending a message into a running pi agent now delivers it into the live turn via pi's native
steerRPC instead of interrupting and restarting.Changes
steercommand variant andsteer(message, images)onPiRuntimeSession, sending pi's native{"type": "steer"}RPC frame.agent.ts): implementPiRpcAgentSession.steerActiveTurn():unavailablewhen the expected turn isn't the active one, when the prompt is a slash command (pi rejects extension commands on the steer path, so those keep the interrupt-and-replace fallback), or when an older binary answersUnknown command: steer(COMPAT(piSteerFallback)). Any other RPC failure throws, leaving the steer's fate unambiguous.clearPendingPermissions, denies each pendingextension_ui_requestafter admission, using the same denial message as the other adapters.clientMessageIdvia a pending-submission list matched by text in admission order (pi's steer RPC takes no message ID, unlike OpenCode's), consumed by thePASEO_SUBMITTED_USER_ENTRYextension marker and dropped on every turn-teardown path.PiRpcAgentSessionsteering cases (accepted steer + echo correlation, multi-steer FIFO order, stale/idle turn, slash-command fallback, unknown-command fallback, ambiguity surfacing, permission denial with/without the flag, stale correlation dropped at turn end) and 2 steer-frame tests incli-runtime.test.ts;FakePigainssteer()recording.docs/providers.mdsteering section now covers pi's RPC path, the text-correlation constraint, and the queue-clearing limitation below.Testing
FakePi; full pi provider suite passes (91 tests), plus repo-wide typecheck/lint/format.steerRPC contract directly against the installed pi 0.84.2 package (docs/rpc.md,rpc-mode.js,agent-session.js,pi-agent-core's steering queue).Notes / Follow-ups
docs/providers.md.Send and steerinto a running pi agent) before marking this ready for review.