Skip to content

fix(acp): harden prompt suggestion handoff stripping, continuation check, and session-switch cancellation - #1

Open
mrtoaf wants to merge 1 commit into
nozamdavid:feat/antigravity-prompt-suggestionsfrom
mrtoaf:fix/antigravity-prompt-suggestions-review
Open

mrtoaf wants to merge 1 commit into
nozamdavid:feat/antigravity-prompt-suggestionsfrom
mrtoaf:fix/antigravity-prompt-suggestions-review

Conversation

@mrtoaf

@mrtoaf mrtoaf commented Nov 22, 2026

Copy link
Copy Markdown

Follow-up fixes for pingdotgg#40420:

Changes

  • Check offerContinuationRun return value (packages/provider-acp/src/server/adapter.ts): Assign offeredContinuation = yield* offerContinuationRun(sessionId) instead of unconditionally setting offeredContinuation = true, so prompt suggestions aren't suppressed when offerContinuationRun returns false.
  • Cancel in-flight suggestions on session switches (packages/provider-acp/src/server/adapter.ts): Call cancelPromptSuggestion() in resumeThread (when switching sessions or restarting after teardown) and readThreadSnapshot (when loading a different session) before resetting snapshot.
  • Keep stripping inlineContextLength on turn 2+ (packages/provider-acp/src/server/adapter.ts): Record each stored user message's inlineContextLength in SnapshotMessageState (without altering the stored message text returned by readThreadSnapshot), so earlier handoff turns don't leak raw inline handoff prefixes into later turns' suggestion transcripts.
  • Tests (apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts): Extended the prompt-suggestion tests to cover multi-turn inlineContextLength stripping and cancellation on resumeThread and readThreadSnapshot session switches.

Verification

  • vp run check:changed nozamdavid/feat/antigravity-prompt-suggestions passed (format, lint, knip, graphql, typecheck across 14 packages, 37/37 tests in 2 files).

Created with Gemini 4 Neon in T3 Code.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant