What
When Dev Fleet cannot resolve a trusted git, the failure is reported as a git
or repository problem, with no mention of the one setting that fixes it:
git worktree discovery failed in /path/to/checkout: no trusted executable for 'git'
in /usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin
Three things are wrong with that:
- It misattributes the cause. The headline says worktree discovery failed in
the checkout, so the user goes looking at their repository. The checkout is
fine; the resolver never found a git it was willing to run.
- It names no remedy.
KIROCREW_DEVFLEET_BIN_GIT — an absolute path set in
the operator-owned service environment — already exists and is exactly the fix,
and the message does not mention it. The sibling error branch for a missing
checkout does get this right ("Set KIROCREW_DEVFLEET_REPO … or clone it to
~/kirocrew"), so the pattern to follow is already in the same function.
- It leaks the trusted PATH into the UI, which is noise the user cannot act on.
Report the unresolved tool directly, name it, and give the override.
Why
This is the generic form of the Windows discovery bug that #1633 tried to solve by
growing registry hints. Fixing the message covers every install shape at once —
portable git, MSYS2, scoop, a D: drive install, a tool on a path nobody
anticipated — on every OS, and it has no security surface: no probing, no trust
inference, no filesystem work on the request path. #1633 was closed in its favour
after eight review rounds established that synchronous discovery inside a
loop-bound resolver cannot both stay off the event loop and avoid reporting
nothing.
Correction to the original report
This issue was first filed claiming Dev Fleet renders a silent empty fleet when
the toolchain is missing. That is not true on current main and the claim was
not verified before filing — apologies. Reproduced by forcing _trusted_bin("git")
to return None and calling _discover_worktrees() directly:
_discover_worktrees raises RuntimeError (it does not return []),
api_dev_fleet_fleet catches it and returns {"worktrees": [], "error": ...},
- the UI renders its Discovery Error banner.
So the user does get an error. It is simply the wrong error, pointed at the wrong
subsystem, with no fix attached. That makes this a message-attribution defect, not
a silent-failure one — a smaller change than originally described, and no
frontend work: the banner already exists and already renders whatever reason the
backend supplies.
Additional Context
- Resolver:
_trusted_bin() in src/kiro_crew/apps/builtins/dev_fleet/server.py;
it fails closed and returns None.
- The message text comes from
_run_cmd, which returns
no trusted executable for <name> in <PATH> for any unresolvable bare argv name
— so improving it there benefits every caller, not just discovery.
_discover_worktrees then wraps that in its generic git worktree discovery failed in {MAIN_REPO} branch, which is what produces the misattribution.
- Related but separate:
_resolve_primary_checkout() silently returns its input
unchanged when git is unavailable, so MAIN_REPO is left un-normalized rather
than reported. Harmless today, worth a look while in here.
What
When Dev Fleet cannot resolve a trusted
git, the failure is reported as a gitor repository problem, with no mention of the one setting that fixes it:
Three things are wrong with that:
the checkout, so the user goes looking at their repository. The checkout is
fine; the resolver never found a
gitit was willing to run.KIROCREW_DEVFLEET_BIN_GIT— an absolute path set inthe operator-owned service environment — already exists and is exactly the fix,
and the message does not mention it. The sibling error branch for a missing
checkout does get this right ("Set
KIROCREW_DEVFLEET_REPO… or clone it to~/kirocrew"), so the pattern to follow is already in the same function.Report the unresolved tool directly, name it, and give the override.
Why
This is the generic form of the Windows discovery bug that #1633 tried to solve by
growing registry hints. Fixing the message covers every install shape at once —
portable git, MSYS2, scoop, a
D:drive install, a tool on a path nobodyanticipated — on every OS, and it has no security surface: no probing, no trust
inference, no filesystem work on the request path. #1633 was closed in its favour
after eight review rounds established that synchronous discovery inside a
loop-bound resolver cannot both stay off the event loop and avoid reporting
nothing.
Correction to the original report
This issue was first filed claiming Dev Fleet renders a silent empty fleet when
the toolchain is missing. That is not true on current
mainand the claim wasnot verified before filing — apologies. Reproduced by forcing
_trusted_bin("git")to return
Noneand calling_discover_worktrees()directly:_discover_worktreesraisesRuntimeError(it does not return[]),api_dev_fleet_fleetcatches it and returns{"worktrees": [], "error": ...},So the user does get an error. It is simply the wrong error, pointed at the wrong
subsystem, with no fix attached. That makes this a message-attribution defect, not
a silent-failure one — a smaller change than originally described, and no
frontend work: the banner already exists and already renders whatever reason the
backend supplies.
Additional Context
_trusted_bin()insrc/kiro_crew/apps/builtins/dev_fleet/server.py;it fails closed and returns
None._run_cmd, which returnsno trusted executable for <name> in <PATH>for any unresolvable bare argv name— so improving it there benefits every caller, not just discovery.
_discover_worktreesthen wraps that in its genericgit worktree discovery failed in {MAIN_REPO}branch, which is what produces the misattribution._resolve_primary_checkout()silently returns its inputunchanged when
gitis unavailable, soMAIN_REPOis left un-normalized ratherthan reported. Harmless today, worth a look while in here.