Cloud Mode: warn on shell-command first query and recover from Ctrl-C state [REMOTE-1533]#9496
Draft
warp-dev-github-integration[bot] wants to merge 1 commit intomasterfrom
Draft
Conversation
… state [REMOTE-1533] Two Cloud Mode UX fixes from user feedback in REMOTE-1533: 1. Warn when the first query for a cloud agent is a shell command. When composing a cloud agent run in V1 cloud mode (without CloudModeInputV2) with the input switched to shell mode, submitting would silently fall through to the shell-execution path on the deferred cloud-mode terminal that has no PTY to run against. Now surface a toast that tells the user the first query in a cloud conversation must be an AI prompt and short circuits submission. 2. Recover from the broken state when re-entering a cancelled cloud conversation via the parent terminal's blocklist entry. After Ctrl-C during cloud agent startup the model lands in Status::Cancelled (similarly Failed / NeedsGithubAuth pre-first-exchange). Re-entering then leaves the view in a half-broken layout because the cloud-mode-v2 composing input only renders for Status::Composing, so the regular block list and input chrome take over against a deferred terminal session that has nothing to run. Reset the model back to Composing while preserving the user's environment and harness selections so the composer is usable again, ready to dispatch a fresh run. CHANGELOG-BUG-FIX: Cloud Mode: warn when the first query in a cloud agent run is a shell command, and recover the composer when re-entering a cancelled cloud conversation. Co-Authored-By: Oz <oz-agent@warp.dev>
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: {"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/users/users#get-the-authenticated-user","status":"403"}.
|
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.
Description
Two Cloud Mode UX fixes from user feedback in REMOTE-1533:
1. Warning toast when the first query is a shell command
When composing the first query for a cloud agent run in V1 cloud mode (without
CloudModeInputV2) with the input switched to shell mode, submitting silently fell through to the shell-execution path on the deferred cloud-mode terminal that has no PTY to run against. The user got no signal that nothing happened.Now we surface a clear error toast (“Cloud agent conversations need an AI prompt as the first query…”) and short-circuit the submission instead. Implemented as a new
should_warn_cloud_mode_first_query_must_be_aihelper onInputand a newelse ifbranch ininput_enterbetween the existingshould_block_cloud_mode_setup_submissionguard and the AI/shell branches.2. Recover from the broken state after Ctrl-C during startup
After Ctrl-C during cloud agent startup the model transitions to
Status::Cancelled(and the same broken state applies forFailed/NeedsGithubAuthpre-first-exchange). Re-entering the conversation by clicking the parent terminal’s blocklist entry block left the view in a half-broken layout: the cloud-mode v2 composing input only renders forStatus::Composing, so the regular block list + input chrome takes over against a deferred terminal session that has nothing to run.The fix adds
AmbientAgentViewModel::reset_to_composing_after_terminal_statewhich resets the run back toComposing(clearingtask_id,conversation_id, the queued-prompt + harness-started flags, andrequest) while preserving the user's environment and harness selections. TheAmbientAgentEntryBlockAction::OpenAmbientAgenthandler calls it before pushing the cloud-mode terminal view back onto the pane stack, so the user lands on a usable composer ready to dispatch a fresh run.Testing
cargo fmt -- --checkandcargo clippy -p warp --all-targets --tests -- -D warningsboth pass cleanly.cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warningscould not be run end-to-end in this sandbox becauselibclangis not installed; the warp package's clippy check passed cleanly which covers all changed files.Server API dependencies
This change does not depend on any server API changes.
Agent Mode
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Cloud Mode: warn when the first query in a cloud agent run is a shell command, and recover the composer when re-entering a cancelled cloud conversation.
Conversation: https://staging.warp.dev/conversation/c07c27bf-dc85-46a7-ab48-76959ba08fea
Run: https://oz.staging.warp.dev/runs/019ddb0d-c830-790a-b6f7-f544fad95e94
This PR was generated with Oz.