fix(agent-manager): prevent false GitHub CLI warnings on project switches - #13448
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summary (commit 613414e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 613414e)Status: No Issues Found | Recommendation: Merge Files Reviewed (10 files)
Reviewed by grok-4.6 · Input: 45.2K · Output: 5.5K · Cached: 249.3K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 26, 2026 07:56
marius-kilocode
disabled auto-merge
August 26, 2026 08:23
marius-kilocode
enabled auto-merge
August 26, 2026 08:35
WebReflection
approved these changes
Aug 26, 2026
This was referenced Aug 26, 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
Agent Manager can report that the GitHub CLI is not installed even when
ghis available, most often while switching between projects or after a managed worktree disappears. Node returns the samespawn gh ENOENTfailure for a missing executable and a missing working directory, while background or stopped project pollers could surface errors in the newly active project.Why This Change Was Made
A deleted working directory must not invalidate global GitHub CLI availability. PR errors also need the same project ownership as PR status updates so late responses, cached error replay, and background polling cannot leak notifications across project boundaries.
User Impact
Switching Agent Manager projects and removing worktrees no longer produces misleading GitHub CLI installation warnings. Genuine missing-CLI and authentication errors remain visible for the active project, and existing single-project messages continue to work.
Evidence
knip, formatting, and the Kilo-owned-file guard pass.