Skip to content

fix(desktop): align CLI readiness with agent PATH - #5479

Open
etinpres wants to merge 1 commit into
block:mainfrom
etinpres:fix/managed-agent-cli-readiness-path
Open

fix(desktop): align CLI readiness with agent PATH#5479
etinpres wants to merge 1 commit into
block:mainfrom
etinpres:fix/managed-agent-cli-readiness-path

Conversation

@etinpres

Copy link
Copy Markdown

Summary

  • Resolve CLI login probes from the same augmented PATH used by the managed-agent child process.
  • Prevent an older ambient PATH wrapper from falsely marking a healthy CLI as logged out and forcing the agent into setup mode.
  • Add a regression test and document the readiness invariant.

Problem

Managed-agent readiness resolved the CLI with the desktop process ambient PATH, then executed the login probe with the augmented child PATH. Those two operations could select different executables.

For example, an older wrapper earlier on the desktop ambient PATH can fail codex login status, while the managed-agent child PATH correctly prefers an authenticated Codex CLI installed under NVM. Buzz then reports a false login requirement and starts the otherwise healthy agent in setup mode.

Implementation

  • Build the augmented child PATH before resolving the login-probe executable.
  • On Unix, search that PATH in order and require an executable file.
  • Retain the existing resolver as the fallback for explicit paths and platform-specific command handling.
  • Add resolve_probe_command_prefers_augmented_child_path to pin the precedence.

Related work

No exact open issue or PR was found for this login-readiness mismatch.

Validation

  • just ci — passed
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml managed_agents::readiness — 54 passed, 0 failed
  • Desktop frontend tests — 4,535 passed, 0 failed
  • Tauri workspace tests — 2,271 passed, 0 failed, 14 ignored
  • Mobile tests — 1,261 passed
  • Desktop and web production builds passed

No UI changes.

Signed-off-by: Yonghae Kim <dr.ocean@gmail.com>
@etinpres
etinpres requested a review from a team as a code owner August 10, 2026 14:57
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