Repository navigation
feat(cli): reload the whole project from /reload - #14103
Merged
Merged
Conversation
Reload now reboots every loaded instance of the current project instead of only the directory the request came from. A reload started in an Agent Manager worktree therefore also refreshes the main checkout and sibling worktrees, which is what users expect after a project config change. The 409 guard now checks sessions across the whole project, so a busy session in any loaded instance of the project blocks the reload. The endpoint stays project-scoped for every caller, so the chat slash command, the settings button, the CLI palette, and JetBrains behave the same. The VS Code provider refreshes config, agents, skills, and commands after a successful reload so the UI reflects the reloaded state.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Overview
Both previously reported findings are resolved in the latest commit:
The new behavior is covered by unit tests for the request-directory failure and the sibling-failure skip paths. Files Reviewed (4 files)
Previous Review Summary (commit 3a2c5d5)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 3a2c5d5)Status: 2 Issues Found | Recommendation: Address before merge Fix these issues in Kilo Cloud Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (8 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
The request directory's reload failure now propagates so callers still see a failed reboot; sibling failures stay logged and isolated. InstanceStore.list() only returns settled instances, so a reload is no longer blocked by another project's in-flight boot.
marius-kilocode
enabled auto-merge
September 14, 2026 07:55
eshurakov
approved these changes
Sep 14, 2026
This was referenced Sep 14, 2026
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.
What Problem This Solves
/reload(editor chat slash command, settings reload button, CLI palette, JetBrains) only rebooted the instance for the directory the request came from. In an Agent Manager worktree that meant the worktree instance reloaded while the main checkout and sibling worktrees kept their cached config, so a project config change appeared to apply in only one place.Why This Change Was Made
Instances are keyed per directory on the server, so a reload scoped to the request directory cannot refresh the rest of the project. Project config changes normally affect the whole project, including linked worktrees. The endpoint is now project-scoped: it reboots every loaded instance whose project id matches and leaves unloaded directories untouched, so no worktree is started only to be reloaded.
The 409 guard moved from the per-directory session list to the project-wide status store, so a busy session anywhere in the project blocks the reload instead of producing a partial reload. The shared
InstanceStorechange is limited to a genericlist()accessor; project selection and the reload loop live inpackages/opencode/src/kilocode/project/reload.ts.All callers share the endpoint, so the chat slash command, the settings reload button, the CLI palette, and JetBrains all become project-scoped with no client-side enumeration.
User Impact
Evidence
POST /instance/reload?directory=<worktree>. The response was200 trueand the global event stream emittedserver.instance.disposedfor both the worktree directory and the main directory, both with the same project id.bun test ./test/kilocode/instance-store-project-reload.test.ts ./test/kilocode/instance-reload.test.tspasses (7 tests), including the case where another project's loaded instance is left alone.POST /instance/reloadhttpapi exercise scenario passes.check-opencode-annotations.ts --worktree, VS Code typecheck, lint, and unit tests pass.