Skip to content

fix(agent-manager): preserve worktree sessions when backend listing fails#8902

Merged
marius-kilocode merged 1 commit intomainfrom
diagnostic-singularity
Apr 15, 2026
Merged

fix(agent-manager): preserve worktree sessions when backend listing fails#8902
marius-kilocode merged 1 commit intomainfrom
diagnostic-singularity

Conversation

@marius-kilocode
Copy link
Copy Markdown
Collaborator

Summary

  • Track worktree directories that fail during session.list() and pass preserveSessionIds to the webview so reconciliation skips deletion for sessions whose absence is transient.
  • Prevents worktree sessions from disappearing after Agent Manager restart when the CLI backend is temporarily unhealthy.

Closes #7466

…ails

When the CLI backend is temporarily unhealthy, session.list() for worktree
directories throws and the catch returns []. The webview reconciliation then
deletes those sessions from the store, making them disappear. Track failed
directories and pass preserveSessionIds so the webview skips deletion for
sessions whose absence is transient.

Closes #7466
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Apr 14, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • packages/kilo-vscode/src/kilo-provider-utils.ts
  • packages/kilo-vscode/tests/unit/kilo-provider-session-refresh.test.ts
  • packages/kilo-vscode/webview-ui/src/context/session.tsx
  • packages/kilo-vscode/webview-ui/src/types/messages.ts

Reviewed by gpt-5.4-20260305 · 690,506 tokens

@marius-kilocode marius-kilocode enabled auto-merge (squash) April 14, 2026 11:10
@marius-kilocode marius-kilocode merged commit fb6bedd into main Apr 15, 2026
19 checks passed
@marius-kilocode marius-kilocode deleted the diagnostic-singularity branch April 15, 2026 09:08
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.

fix(agent-manager): worktree sessions disappear after restart; sidebar prompt silently fails

2 participants