feat(vscode): resume interrupted tasks from the send button - #13544
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Previous Review Summary (commit f5a7a1d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f5a7a1d)Status: No Issues Found | Recommendation: Merge Files Reviewed (43 files)
Reviewed by grok-4.6 · Input: 222.6K · Output: 6.6K · Cached: 153.3K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 28, 2026 11:33
marius-kilocode
disabled auto-merge
August 28, 2026 11:34
WebReflection
approved these changes
Aug 28, 2026
WebReflection
left a comment
Contributor
There was a problem hiding this comment.
This looks good but I start feeling the current "keep adding logical boolean branches via fields" is not the best strategy in the long run.
We are basically dealing with a state machine and maybe it's worth thinking if some sort of refactoring that would handle properly a state machine (and sub-machines per state) could help us simplifying code.
Just a comment for the future, no action needed in here.
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.
What Problem This Solves
Resuming a stopped task currently requires another typed prompt. Sending a literal
continuecreates a new user turn, even though the original task is still unfinished.Why This Change Was Made
Use the existing OpenCode prompt loop to resume the original user turn instead. The empty send button becomes Continue only when the latest assistant response is eligible for continuation. Its tooltip and accessible label change together.
The backend checks the target assistant ID and current session state before starting. Busy, completed, reverted, archived, and blocked sessions are rejected. Pending permissions, questions, and suggestions are not answered or dismissed by this action. Partial output and interrupted tool results remain in history.
A request-only resumption instruction is added for the model so the request does not end in partial assistant text. It is not stored as a new user message or displayed in the transcript.
User Impact
Evidence
Validated the actual OpenCode runtime with a controlled local provider: stopped streaming resumes on the original user turn, interrupted tool results are retained, completed turns do not produce another request, and HTTP requests for stale, active, or blocked turns are rejected.
After rebasing onto main, the extension build, lint, typechecks, Knip, change-marker guards, 186 focused extension tests, and 12 backend tests passed. The new route also passed focused coverage, authentication, and execution checks. The broader local HTTP route sweep exceeded its 120-second timeout; no full-suite pass is claimed.
In isolated VS Code, verified empty new-chat Send is disabled, Stop changes the button and tooltip to Continue, Continue finishes the task with no new user bubble, empty Send becomes disabled after completion, and typing a follow-up enables normal Send. This used a local deterministic provider, not live-model validation across providers.
Continue after Stop
Resumed task with the original user message