Skip to content

fix(pi): clear native queues before Stop aborts - #805

Merged
thevarsek merged 1 commit into
mainfrom
agent-9/t27514
Nov 28, 2026
Merged

thevarsek merged 1 commit into
mainfrom
agent-9/t27514

Conversation

@thevarsek

Copy link
Copy Markdown

Queued steer and follow-up messages could enter Pi's persisted session when Stop sent abort, causing them to reach the model again on the next T3 turn.

Send a best-effort clear_queue request before abort in both Pi interrupt paths. Reuse the extension notification notice helper to list cleared messages on the stopped turn, counting blank image-only messages without listing blank text. Unsupported commands, RPC failures, and timeouts still allow Stop to proceed. T3's own queue is unchanged. Pi versions before 0.84.4 retain the existing limitation because they do not support clear_queue.

Validation:

  • Added a parametrized regression that failed before the fix on both Stop paths; it checks request order, cleared-message notices, image-only message counts, and unsupported-command fallback.
  • All 131 Pi package tests and all 8 Pi replay scenarios pass with the two updated abort transcripts.
  • Pi package typecheck, formatting, and git diff checks pass.
  • check:changed passed its 2 test files (92 tests) and GraphQL check. Lint, knip, and dependent typechecks are blocked by missing dependencies in the filtered workspace (@oxlint/plugins, Expo/Astro configs, typescript-legacy, and Cloudflare worker types). The initial formatting finding was fixed and formatting was rechecked successfully.

Model: GPT-6. Harness: Codex.

@thevarsek
thevarsek enabled auto-merge November 28, 2026 03:20
@thevarsek
thevarsek added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 0a6a5db Nov 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant