agent-orchestrator icon indicating copy to clipboard operation
agent-orchestrator copied to clipboard

[Bug]: Windows installer does not add the ao CLI to PATH, so the CLI is unusable outside AO-spawned sessions

Open ryanlawyer opened this issue 2 months ago • 1 comments

Summary

On Windows, the installer places ao.exe at C:\Program Files\agent-orchestrator\resources\daemon\ao.exe but never persists that directory to either the Machine or User PATH. The CLI therefore works inside sessions AO spawns (which get it injected into their environment) but is not found in a normal PowerShell or cmd window.

Reproduction

Open a fresh PowerShell window:

ao session cleanup --dry-run --project <project>
ao : The term 'ao' is not recognized as the name of a cmdlet, function, script file, or operable program.

Confirm nothing was persisted:

([Environment]::GetEnvironmentVariable("Path","Machine") -split ';') | Where-Object { $_ -like "*agent-orchestrator*" }
([Environment]::GetEnvironmentVariable("Path","User")    -split ';') | Where-Object { $_ -like "*agent-orchestrator*" }

Both return nothing.

Expected

After install, ao resolves in a new terminal without manual setup.

Actual

CommandNotFoundException. Reopening the terminal does not help, because there is nothing in persisted PATH to pick up.

Two things that make this more confusing than it needs to be

  1. The binary is not directly in C:\Program Files\agent-orchestrator\ — it is nested under resources\daemon\. Someone who navigates to the install folder looking for it will not find it there.
  2. PowerShell does not search the current directory, so cd-ing into the install folder and running ao still fails (unlike cmd).

Workarounds

Call it directly (the & is required because of the space in Program Files):

& "C:\Program Files\agent-orchestrator\resources\daemon\ao.exe" session cleanup --dry-run --project <project>

Or add it to the User PATH manually:

$dir = "C:\Program Files\agent-orchestrator\resources\daemon"
$cur = [Environment]::GetEnvironmentVariable("Path","User")
if ($cur -notlike "*$dir*") {
  [Environment]::SetEnvironmentVariable("Path", ($cur.TrimEnd(';') + ";$dir"), "User")
}

Impact

Low severity but high friction: every CLI example in the docs fails for a Windows user until they discover this, and the failure mode (command not recognized) gives no hint that the binary is installed and simply unreachable.

ryanlawyer avatar Sep 15 '26 21:09 ryanlawyer

confirmed on windows with the v0.14.7 installer. ao was not available in a normal powershell window because the installer did not add its folder to PATH. adding the folder to my user PATH fixed it locally.

codebanditssss avatar Oct 29 '26 12:10 codebanditssss