Repository navigation
fix: treat extension commands handled by Pi as non-turn prompts - #438
Conversation
|
Runtime evidence (pie-verify web, isolated PIE_HOME / PI_CODING_AGENT_DIR, fake e2e provider). Before ( recording-002.webmrecording-002.webm |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
commit: |
|
auto-merge: no head
No allowed group (docs/tooling, lint/format, UI presentation) covers these hunks. Needs human review; rebase onto main to clear the conflict. Not merged. |
…-commands # Conflicts: # packages/server/src/harness/pi/process.ts # packages/server/src/harness/pi/rpc/rpc-mode.ts # packages/server/src/harness/pi/rpc/rpc-types.ts # packages/server/test/harness/pi/agent.test.ts
|
Merged Conflicts were only in the prompt-admission path ( Resolution:
Checks: server |
Review + verification record — #438
Conclusion: verified, merging. Review
Independent verificationClean worktrees, isolated
Gaps / notes
Re-review is warranted if the receipt or status handling in 438-before-main.webm438-after-pr.webm438-desktop-pr.webm |
|
Merged as 9960a7b (squash of verified head 03cfced; record: #438 (comment)). |












Requirement
Sending an extension slash command such as
/mcpor/mcp login <server>in Pie fails with "Model request failed … Pi queued a prompt without an active server turn". Found while verifying #433, and it reproduced onmainat18ba5813.Regression from #426. Pi reports a prompt
disposition(started|queued|handled).rpc-mode.tsreduced that tostarted: disposition === "started", so a prompt an extension command consumed (handled) looked like a queued prompt with no active turn.Since this opened, #429 forwarded
dispositionand stopped failing a queued prompt that has no server turn. The client still stayed on the optimisticsubmittedstatus, so the composer kept waiting.Expected behavior
mainafter fix(server): stream a prompt Pi queued after the server turn ended #429. It is not anAgentOperationError.Changes and risks
apps/appchat.ts: when a receipt is not started and the status is still the optimisticsubmitted, the status resets toready. A running turn re-stamps the phase from its events.Server admission already returns a non-started receipt for
disposition: "handled"(fix(server): stream a prompt Pi queued after the server turn ended #429). This merge keeps that, and keeps fix(server): stream a prompt Pi queued after the server turn ended #429's attach-and-stream for a queued prompt with no server turn. The branch'sprompt-admission-stateerror for that case is gone.Prompt RPC
dispositionstays optional, matchingmain. Pi 1.0.2 still reportsstarted|queued|handled; an extension command still callspreflightResult("handled")and returns without a turn. chore: stop passing --no-extensions to the Pi child #443 loads those commands in the Pi child, so this path is live.Out of scope (would need contract changes):
notify) is still not shown in Pie.So
/mcpruns without error, but its output is not visible yet.Verification
Tested revision:
84dbc549(merge oforigin/main6bb30797intoffb36b64).pnpm --filter @getpie/server exec vitest run test/harness/pi/agent.test.ts: 24 passed. The handled-prompt case checks an empty non-started receipt and that the next prompt starts and finishes.pnpm --filter @getpie/app exec vitest run src/features/chat/runtime/chat-queue.test.ts: 14 passed. The handled command returns status toready.pnpm checkpassed.AgentSession.promptstill reportshandledfor an extension command and does not start a turn (installed package). Not re-run: the live web/mcppass fromffb36b64.