fix(input): clear SDK prompt suggestion only after a prompt is dispatched - #377
Merged
Merged
Conversation
…ched - Move the `prompt_suggestion = None` reset out of `submit_input` and into the `Ok` arms of `dispatch_prompt_turn` and `dispatch_active_turn_prompt`, so the suggestion survives local slash commands, rejected submissions and send failures - Rename the `/config` submit test to assert the suggestion is preserved and still renders in the composer hint rows after returning to chat - Extend the pending-queue, capacity-rejection, send-failure and advertised-slash tests to pin down when the suggestion is cleared - Assert the suggestion survives chat resize, fullscreen resize and fullscreen Ctrl+C exit in the event handler tests Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
srothgan
added a commit
that referenced
this pull request
Sep 13, 2026
- Reopen the Unreleased section - Record the Agent SDK 0.3.270 migration under Features - Record the prompt suggestion lifecycle fix under Fixes
srothgan
added a commit
that referenced
this pull request
Sep 13, 2026
* feat(agent-sdk): migrate to 0.3.270 - upgrade the Agent SDK dependency and bridge runtime guard to 0.3.270 - honor permission safety hints and SDK-controlled Task and Todo availability - preserve plural message correlation, permission denials, retry errors, and rate-limit scope - protect prompt caches with held plugin reloads and explicit force confirmation - render staged writes, project memory, and expanded Artifact metadata * docs(changelog): add unreleased entries for #377 and #378 - Reopen the Unreleased section - Record the Agent SDK 0.3.270 migration under Features - Record the prompt suggestion lifecycle fix under Fixes
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.
Summary
submit_inputno longer drops the SDK prompt suggestion up front. The reset now lives in theOkarms ofdispatch_prompt_turnanddispatch_active_turn_prompt, so it only happens once a prompt is actually dispatched or queued./config), submissions rejected at queue capacity, and send failures keep the suggestion in place./configsubmit test now verifies the suggestion survives the fullscreen round-trip and is still rendered in the composer hint rows after returning to chat.Why
Submitting anything cleared the suggestion before the input was resolved, so opening
/configor hitting a send failure silently discarded an SDK hint the user never acted on. Tying the reset to a successful dispatch keeps the suggestion visible until it is genuinely consumed.Closes #
Validation
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test(1813 lib tests passing)Notes
🤖 Generated with Claude Code