Bug
sh1pt agents list --json probes each agent CLI with <binary> --version. Some CLIs print version text to stderr while still exiting 0. The current parser reads result.stdout ?? result.stderr, but an empty stdout string is still defined, so stderr is ignored and the installed agent is reported with an empty version.
Repro
Mock or run an agent command that exits 0 with:
stdout: ""
stderr: "claude 1.2.3\n"
Observed JSON before the fix:
{ "id": "claude", "installed": true, "version": "" }
Expected
When stdout is empty, agents list should fall back to stderr and parse the version:
{ "id": "claude", "installed": true, "version": "1.2.3" }
I have a focused regression test and fix ready.
Bug
sh1pt agents list --jsonprobes each agent CLI with<binary> --version. Some CLIs print version text to stderr while still exiting 0. The current parser readsresult.stdout ?? result.stderr, but an empty stdout string is still defined, so stderr is ignored and the installed agent is reported with an emptyversion.Repro
Mock or run an agent command that exits 0 with:
Observed JSON before the fix:
{ "id": "claude", "installed": true, "version": "" }Expected
When stdout is empty,
agents listshould fall back to stderr and parse the version:{ "id": "claude", "installed": true, "version": "1.2.3" }I have a focused regression test and fix ready.