Skip to content

fix(vscode): prevent completed sessions from staying busy - #13450

Merged
marius-kilocode merged 2 commits into
mainfrom
investigate-agent-manager-false-stops
Aug 26, 2026
Merged

fix(vscode): prevent completed sessions from staying busy#13450
marius-kilocode merged 2 commits into
mainfrom
investigate-agent-manager-false-stops

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Completed Agent Manager and sidebar sessions can remain stuck on "Considering next steps" even after the backend has finished and the final assistant response is persisted. Pressing Stop can make a normally completed session appear interrupted.

Why This Change Was Made

Live SSE events and directory-wide HTTP status snapshots update the same session state independently. A delayed snapshot can overwrite a newer idle event, overlapping snapshots can arrive out of order, and reconnects previously avoided reconciling already-known busy sessions.

Track session event freshness and directory request ordering, reconcile sessions omitted from authoritative status responses, and recheck status after terminal assistant or turn-close events. Preserve worktree directory boundaries and the explicit-abort handling already present on main.

User Impact

Completed sessions return to the idle state, the working indicator disappears, and the Send control becomes available again. Active sessions and sessions in other worktrees are not incorrectly marked idle.

Evidence

  • bun run build:check passes, including extension typecheck, webview typecheck, lint, and bundling.
  • bun run test:unit: 4,194 tests passed.
  • bun run knip and bun run check-kilocode-change pass.
  • Six focused regression cases cover stale busy responses, missing idle recovery, overlapping directory and seed requests, and worktree isolation.
  • Isolated VS Code Agent Manager verification confirmed a completed local test-model session returns to idle without a stuck indicator or interruption warning.

Completed Agent Manager session with idle prompt input and no stuck working indicator

@kilo-code-bot

kilo-code-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • .changeset/fix-stale-agent-session-status.md
  • packages/kilo-vscode/src/KiloProvider.ts
  • packages/kilo-vscode/src/session-status.ts
  • packages/kilo-vscode/tests/unit/kilo-provider-load-messages.test.ts

Reviewed by grok-4.6 · Input: 128.8K · Output: 29.6K · Cached: 2.5M

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit cf7a002 into main Aug 26, 2026
24 checks passed
@marius-kilocode
marius-kilocode deleted the investigate-agent-manager-false-stops branch August 26, 2026 08:33
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