Skip to content

fix(vscode): stop background-project session spinners from leaking - #14348

Merged
marius-kilocode merged 1 commit into
mainfrom
fix-multi-project-progress-pinner-leak
Sep 21, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
fix-multi-project-progress-pinner-leak

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Issue

No linked issue. This is a regression observed directly in multi-project Agent Manager usage.

Context

When several projects are open in Agent Manager, a session running in a project that is not currently selected could keep showing a running spinner after it had already finished. The status only corrected itself later if something else refreshed it.

Implementation

Session status is directory scoped, but the provider was filtering status events against the currently active project directory. Terminal events (idle, offline, deleted) from a session whose project was no longer active were rejected, so the last known status stayed busy.

The change routes status by the session's own directory instead of the active project:

  • owned() now resolves a session directory from the registered project route, a released-child owner, or the tracked session directory, and accepts a terminal status that matches that directory.
  • Status recovery now queries every retained session directory. Responses are only applied to sessions owned by the directory that produced them, so an empty snapshot from one project cannot clear another project's running session.
  • A child session no longer has to be released for its completion to be accepted.

Screenshots / Video

N/A. This is a behavior fix with no visual styling change. Evidence is the Agent Manager self-test described below.

How to Test

Manual/local verification

  • Ran the focused regression tests. Twelve new cases fail against the previous provider and pass with the fix.
  • Ran the focused provider, status, and project suites: 115 passed, 0 failed.
  • Ran bun run typecheck in packages/kilo-vscode: passed.
  • Ran an isolated VS Code Agent Manager self-test with two disposable projects and a local mock provider. Started both sessions, switched projects, and confirmed both spinners settled to idle/done. Backend logs confirm both loops exited. No paid model requests were made.

Reviewer test steps

  1. Open Agent Manager with multi-project enabled and at least two projects.
  2. Start a longer running session in project A.
  3. Switch to project B while A is still running.
  4. Confirm A's spinner stops once its response completes, without reopening project A.

Blocked checks and substitute verification

  • The full extension unit suite (bun run test:unit) timed out in this environment, both before and after the change, with no assertion failures. Substitute verification was the focused provider, status, and project suites plus the isolated VS Code Agent Manager flow above.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Session status events were filtered against the active project, so an
idle event from a session that finished in another project was dropped
and its spinner kept running. Accept terminal events for tracked
sessions using their own directory, and reconcile status across every
retained session directory after reconnecting.
@kilo-code-bot

kilo-code-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files)
  • .changeset/fix-background-project-spinner.md
  • packages/kilo-vscode/src/KiloProvider.ts
  • packages/kilo-vscode/src/session-status.ts
  • packages/kilo-vscode/tests/unit/kilo-provider-followup.test.ts
  • packages/kilo-vscode/tests/unit/kilo-provider-load-messages.test.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit ce94bda into main Sep 21, 2026
25 checks passed
@marius-kilocode
marius-kilocode deleted the fix-multi-project-progress-pinner-leak branch September 21, 2026 10:27
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