Skip to content

feat(vscode): resume interrupted tasks from the send button - #13544

Merged
marius-kilocode merged 2 commits into
mainfrom
enable-send-to-continue
Aug 28, 2026
Merged

feat(vscode): resume interrupted tasks from the send button#13544
marius-kilocode merged 2 commits into
mainfrom
enable-send-to-continue

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Resuming a stopped task currently requires another typed prompt. Sending a literal continue creates 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

  • Stop a response, leave the composer empty, and click Continue to resume it without another user bubble.
  • Text, images, and review comments keep the existing Send behavior. Empty new chats and completed responses remain unavailable.
  • Continue uses the original turn's model and agent. It starts another model request, not the same interrupted network stream.
  • This does not add general error recovery. Terminal provider or authentication errors still require a new typed prompt; existing automatic retries are unchanged.
  • Resume does not roll back tool side effects or guarantee exactly-once execution. The model is instructed to check current state before retrying interrupted tools.

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

The empty composer shows a Continue tooltip after stopping a response

Resumed task with the original user message

A single user message followed by the partial response and resumed completion, with no continue message added

@kilo-code-bot

kilo-code-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/opencode/test/kilocode/server/session-resume.test.ts
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)
  • .changeset/empty-send-continue.md
  • packages/kilo-vscode/src/KiloProvider.ts
  • packages/kilo-vscode/src/kilo-provider/early-message.ts
  • packages/kilo-vscode/tests/unit/early-message.test.ts
  • packages/kilo-vscode/tests/unit/prompt-continue.test.ts
  • packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx
  • packages/kilo-vscode/webview-ui/src/context/session-continuation.ts
  • packages/kilo-vscode/webview-ui/src/context/session-types.ts
  • packages/kilo-vscode/webview-ui/src/context/session.tsx
  • packages/kilo-vscode/webview-ui/src/i18n/ar.ts
  • packages/kilo-vscode/webview-ui/src/i18n/br.ts
  • packages/kilo-vscode/webview-ui/src/i18n/bs.ts
  • packages/kilo-vscode/webview-ui/src/i18n/da.ts
  • packages/kilo-vscode/webview-ui/src/i18n/de.ts
  • packages/kilo-vscode/webview-ui/src/i18n/en.ts
  • packages/kilo-vscode/webview-ui/src/i18n/es.ts
  • packages/kilo-vscode/webview-ui/src/i18n/fa.ts
  • packages/kilo-vscode/webview-ui/src/i18n/fr.ts
  • packages/kilo-vscode/webview-ui/src/i18n/it.ts
  • packages/kilo-vscode/webview-ui/src/i18n/ja.ts
  • packages/kilo-vscode/webview-ui/src/i18n/ko.ts
  • packages/kilo-vscode/webview-ui/src/i18n/nl.ts
  • packages/kilo-vscode/webview-ui/src/i18n/no.ts
  • packages/kilo-vscode/webview-ui/src/i18n/pl.ts
  • packages/kilo-vscode/webview-ui/src/i18n/ru.ts
  • packages/kilo-vscode/webview-ui/src/i18n/th.ts
  • packages/kilo-vscode/webview-ui/src/i18n/tr.ts
  • packages/kilo-vscode/webview-ui/src/i18n/uk.ts
  • packages/kilo-vscode/webview-ui/src/i18n/zh.ts
  • packages/kilo-vscode/webview-ui/src/i18n/zht.ts
  • packages/kilo-vscode/webview-ui/src/stories/StoryProviders.tsx
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/webview-messages.ts
  • packages/opencode/src/kilocode/server/httpapi/groups/kilocode.ts
  • packages/opencode/src/kilocode/server/httpapi/handlers/kilocode.ts
  • packages/opencode/src/kilocode/session/continuation.ts
  • packages/opencode/src/session/prompt.ts
  • packages/opencode/test/kilocode/server/httpapi-exercise-scenarios.ts
  • packages/opencode/test/kilocode/server/session-resume.test.ts
  • packages/opencode/test/kilocode/session/resume.test.ts
  • packages/sdk/js/src/v2/gen/sdk.gen.ts
  • packages/sdk/js/src/v2/gen/types.gen.ts
  • packages/sdk/openapi.json

Reviewed by grok-4.6 · Input: 222.6K · Output: 6.6K · Cached: 153.3K

Review guidance: REVIEW.md from base branch main

@WebReflection WebReflection left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@marius-kilocode
marius-kilocode merged commit df80ed9 into main Aug 28, 2026
34 checks passed
@marius-kilocode
marius-kilocode deleted the enable-send-to-continue branch August 28, 2026 12:48
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.

2 participants