fix(desktop): preserve Windows PATH for ACP probes#2533
Draft
aleixrodriala wants to merge 7 commits into
Draft
Conversation
Goose install could report success while discovery still saw NotInstalled (binary in %USERPROFILE%\goose off PATH), blocking onboarding Next (block#2239). Install shells also dropped the process PATH on Windows so system npm was invisible for Codex/Claude adapters (block#2238). Console-subsystem probes stole focus via Git Bash. - Probe well-known Windows Node/npm/goose paths; fall back to process PATH for install shells; pin goose GOOSE_BIN_DIR to ~/.local/bin on Windows. - Post-install resolve check; SetupStep only shows Installed after discovery. - Centralize CREATE_NO_WINDOW via windows_console::hide_console (and buzz-dev-mcp hide helper) on spawn sites this fix touches. Signed-off-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
…ECK AGAIN - Restore Justfile + CONTRIBUTING.md from main (accidental soft-reset squash had undone Hermit-pinned lefthook from block#2241). - beforeDevCommand: use `pnpm exec vite` instead of Unix-only `exec` (tauri.conf + instance-env) so Windows cmd can start the dev server. - After install success, reuse the existing CHECK AGAIN / CHECKING… pattern so rediscovery is not a permanent spinner. Signed-off-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
Desktop launches buzz-acp windowless; without the same flag the adapter child (cmd.exe/node, buzz-agent, …) allocates its own console per agent. Refs: block#2292, PR block#2247 review Signed-off-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
PATH often lists %LOCALAPPDATA%\Microsoft\WindowsApps\bash.exe first; that App Execution Alias launches WSL and can hang lookups (~15s+) while real Git Bash is sub-second. Prefer git-derived / install / registry paths, then PATH bash, and skip WindowsApps (and System32) on PATH. Refs: block#2328, PR block#2247 Signed-off-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
Nested CreateProcess sites still flash consoles when the parent is windowless: buzz-agent MCP spawns and buzz-dev-mcp delegated rg. Refs: PR block#2247 review, block#2292 Signed-off-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
- Route desktop spawns through windows_console::hide_console (runtime, taskkill); stop re-inlining CREATE_NO_WINDOW. - Add buzz-dev-mcp windows_console for std/tokio; use from shell + rg. - Single hide_console helper in buzz-acp and buzz-agent MCP spawn. - Drop redundant WindowsApps also_skip; one path_looks_like check. - Align Doctor/MCP PATH scan API + KEEP IN SYNC notes (full shared resolver deferred: buzz-agent forbids unsafe registry code). - SetupStep: one CheckAgainButton for auth-unknown and post-install. No push. Signed-off-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
Signed-off-by: Aleix <aleixrodriala@gmail.com>
5 tasks
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
PATHwhen login-shell PATH discovery is unavailableThis is stacked on #2247 and should be reviewed as the single additional commit
06e8a5e9. Once #2247 lands, the effective diff should collapse todesktop/src-tauri/src/managed_agents/runtime/path.rs.Root cause
#2247 fixes PATH composition for the ACP install subprocess, but runtime discovery and launched agents use
managed_agents/runtime/path.rs::build_augmented_path()instead. On Windows,login_shell_path()is intentionallyNone, managed Node is unsupported, and the existing builder did not preserve the native process PATH or add well-known Node directories.As a result, a correctly installed npm shim such as
%APPDATA%\Buzz\node-tools\codex-acp.cmdstarts but cannot resolvenode.exe. Buzz then classifies the adapter as outdated and retries installation, leaving onboarding at Installation failed.User impact
The affected Windows v0.4.23 machine had Node and Codex installed. Installing
@agentclientprotocol/codex-acp1.1.7 into Buzz's private prefix was not sufficient: the live onboarding UI still failed. Reproducing Buzz's exact augmented PATH produced"node" is not recognized as an internal or external command.A temporary local Node delegate placed in Buzz's managed prefix made the exact probe succeed and clicking Retry changed the live UI to Ready. That delegate is only a local workaround and is not part of this PR; this source change fixes the underlying PATH construction.
Validation
@agentclientprotocol/codex-acp 1.1.7; onboarding confirmed Readyruntime/path.rstests: 7 passed, 0 failedrustfmt --edition 2021 desktop/src-tauri/src/managed_agents/runtime/path.rsgit diff --checkThe full Tauri crate test was not completed in this WSL environment because its Linux build requires the full WebKitGTK development stack.