Skip to content

fix(desktop): use augmented PATH for model discovery subprocess#2753

Merged
wpfleger96 merged 1 commit into
mainfrom
paul/models-spawn-path
Jul 24, 2026
Merged

fix(desktop): use augmented PATH for model discovery subprocess#2753
wpfleger96 merged 1 commit into
mainfrom
paul/models-spawn-path

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

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 models with PATH taken from login_shell_path() — which by design always returns None on 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 .cmd shims failed to resolve node and 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 same build_augmented_path kernel 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.

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>
@wpfleger96
wpfleger96 requested a review from a team as a code owner July 24, 2026 19:57
@wpfleger96
wpfleger96 merged commit 3bd3a01 into main Jul 24, 2026
25 checks passed
@wpfleger96
wpfleger96 deleted the paul/models-spawn-path branch July 24, 2026 20:13
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.

1 participant