fix(agent-manager): log errors and trigger git refresh in worktree migration#8139
Merged
marius-kilocode merged 2 commits intomainfrom Apr 2, 2026
Merged
fix(agent-manager): log errors and trigger git refresh in worktree migration#8139marius-kilocode merged 2 commits intomainfrom
marius-kilocode merged 2 commits intomainfrom
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (12 files)
Reviewed by gpt-5.4-20260305 · 706,732 tokens |
chrarnoldus
approved these changes
Apr 2, 2026
421e35f to
88e44e2
Compare
…gration fixGitWorktreeRefs silently swallowed errors when rewriting .git/worktrees/*/gitdir during the .kilocode → .kilo migration. If the rewrite failed (permissions, file locks, race with VS Code), worktrees moved on disk but git refs still pointed to the old path, causing VS Code to stop showing them in Source Control. - Log all errors instead of empty catch blocks - Verify gitdir writes by reading back after write - Return count of fixed refs from migration - Trigger git.refresh when refs were rewritten so VS Code re-discovers worktrees without requiring a restart
2a04087 to
e801b1f
Compare
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.
Summary
fixGitWorktreeRefssilently swallowed errors during the.kilocode → .kilomigration (catch {}blocks). If the gitdir rewrite failed (permissions, file locks, race with VS Code's git extension), worktrees moved on disk but git internal refs still pointed to.kilocode/paths — causinggit worktree listto return stale paths and VS Code to stop showing worktrees in Source Control.catchblocks infixGitWorktreeRefsnow log errors instead of silently skippinggit.refreshso VS Code re-discovers worktrees without requiring a manual restartContext
User report: worktrees that used to appear in VS Code Source Control disappeared after updating. Root cause traced to commit
466644eb25(.kilocode → .kilorename) where the migration's error handling silently swallowed failures, leaving git worktree references permanently broken.Test plan
bun run compilepasses (typecheck + lint + build)