Repository navigation
Conversation
Pi 0.73.1 replies to unknown commands such as get_available_thinking_levels
with `{ type: "response", command, success: false, error }` and no `id`.
The adapter already treated an id-correlated Unknown command as
PiRpcUnsupportedCommandError so inspect could continue, but an id-less
frame faulted the whole RPC session at the capabilities stage and marked
Pi unavailable.
Route an id-less unknown-command frame back to the unique pending command
it names; any other id-less frame still faults.
Verified against Pi 0.73.1 on Linux: inspect reaches ready after this
change. Independent of Codex Desktop / Renderer injection.
Owner
|
你可以使用@earendil-works/pi-coding-agent |
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.
Why
Pi 0.73.1 (current
@mariozechner/pi-coding-agent) answers unknown RPC commands with an error frame that omitsid:{"type":"response","command":"get_available_thinking_levels","success":false,"error":"Unknown command: get_available_thinking_levels"}get_stateandget_available_modelsstill echo the request id. Inspect then callsget_available_thinking_levels; the adapter already maps an id-correlatedUnknown commandtoPiRpcUnsupportedCommandErrorso Thinking can degrade to unsupported. An id-less frame instead tripsPi RPC response has no id, faults the whole session, and the connections panel marks Pi as error.This is a Pi RPC protocol quirk, not a Codex Desktop / Renderer injection bug. It reproduces by talking to
pi --mode rpcdirectly, on any OS that runs that Pi version.Change
If a response has no
id, but it is anUnknown command: <name>error and exactly one pending request uses that command name, reject that pending request withPiRpcUnsupportedCommandError. Any other id-less frame still faults.Test
packages/adapters/pi/test/pi-rpc-session.test.ts—degrades an unknown Thinking command whose error frame has no id(41 tests in this file pass).codexhostbinding probe reportspi: ready.Relation to #113
#113 already contains this adapter hunk, mixed with the 26.810 Renderer request-bridge work. That PR is waiting on whether the Desktop probe issue is Linux-only. This change is independent and can land on
mainwithout that Desktop discussion.