Repository navigation
fix: deliver steers that ask to clear pending permissions - #73
Merged
Merged
Conversation
Paseo marks every message typed in the app during a run with clearPendingPermissions. The provider failed such steers, so Paseo interrupted the turn and resent the prompt with the same clientMessageId, which the provider then rejected as a duplicate. Send these steers as native guidance and, once ZCode accepts them, decline pending permissions, questions and Plan approvals with their deny action until ZCode reads the message. Allow the clientMessageId of an input that was not admitted to be reused. Record the decision in ADR 22.
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.
Problem
Sending a message while ZCode was running failed with
[System Error] Duplicate ZCode clientMessageId, and the message was not delivered. Every steer from the Paseo app was affected.Cause
clearPendingPermissions: true(Paseosession.ts). The provider rejected such steers withINTERACTION_UNSUPPORTED.PluginAgentSession.steerActiveTurntreats a failed result asunavailable.steerOrReplaceActiveTurnthen interrupts the turn and resends the prompt with the sameclientMessageId. The provider kept every used ID, sosend()threwDuplicate ZCode clientMessageId.test:upstreamandtest:steering-runtimesteered without the flag, so neither covered this path.Change
userInputrow appears. Requests opened in the meantime are declined too, because a later tool of the same model step can ask again. Requests after the message is read are left to the user. This follows Paseo's provider contract (docs/providers.md), as the Codex and Claude providers do.clientMessageId, so Paseo's interrupt-and-replace fallback can resend it.PresentedInteraction.declineis the first deny option for permissions (ZCode'sdeny, listed beforeworkflowRefine) anddeclinefor questions and Plan approvals.cancelis not used.docs/verification.mdare updated.ZCode behavior at
3c5b227: aguidesendTextis accepted while an interaction is pending and is read only after every tool call of the model step settles. Declining a permission or question keeps the turn running, so the message is read in the same turn. Declining a Plan approval in Plan mode ends ZCode's turn (stopTurnAfterResult); the message falls back to the queue and starts the next native turn in the same Paseo run.resolveInteractionacknowledges even when the interaction is already gone. ZCode Desktop hides its composer while an interaction is pending, so it never takes this path.Verification (Linux x64, Node.js 26.8.1)
failed, and resending its ID threwDuplicate ZCode clientMessageId. With the decline call removed, pending permissions were not declined.npm run typecheck,npm test(22 files, 209 tests),npm run build,npm run format:checkandgit diff --checkpassed.npm run test:upstreamagainst Paseo 0.12.0 (cafe4b01c8522ff39560241c5deb01427dc8dc5b) passed. It now steers through Paseo's real adapter withclearPendingPermissions: true. Locally,NODE_PATHresolves a globalzodand breaks the Git preparation check, so it ran withoutNODE_PATH.adrs doctorreports no new diagnostics.Not verified