fix(desktop): use augmented PATH for model discovery subprocess#2753
Merged
Conversation
Model discovery spawns buzz-acp models with PATH from login_shell_path(), which is always None on Windows by design — the child inherited a raw process PATH missing the Buzz-managed Node/npm dirs, so the ACP adapter's .cmd shims failed to find node and the model dropdown stayed empty (works on macOS only because a login-shell PATH exists there). Reuse the same augmented-PATH helper the CLI probes and launched agents use, so model discovery resolves the identical toolchain the agent will actually run with. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
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.
On Windows, the model dropdown never populates for CLI harnesses (Claude Code, Codex) while the same flow works on macOS.
Model discovery spawns
buzz-acp modelswithPATHtaken fromlogin_shell_path()— which by design always returnsNoneon Windows (Git Bash's POSIX-shaped PATH would poison native children). The discovery child therefore ran with only the raw inherited process PATH, missing the Buzz-managed Node/npm directories and exe-parent sidecar dir, so the ACP adapter's.cmdshims failed to resolvenodeand discovery returned nothing. macOS worked only because a login-shell PATH exists there.The fix reuses the existing
augmented_path()helper (already used by CLI login probes and auth commands, built on the samebuild_augmented_pathkernel as the real agent spawn), so model discovery resolves the identical toolchain the agent will actually run with.login_shell_path()remains the login-shell component inside that composition — on macOS the composed PATH is a superset of the previous value.Related: #2661 (managed Node fallback these entries point at), reported in the Windows install-issues follow-up.