fabro/lib/crates/fabro-sandbox
Bryan Helmkamp 762ac19649
fix(sandbox): resolve bash via PATH instead of /bin/bash (#241)
## Summary

The local sandbox provider hard-codes `/bin/bash` at three call sites in
`fabro-sandbox/src/local.rs` (`exec_command`, `exec_command_streaming`,
`spawn_stdio_process`). NixOS doesn't ship `/bin/bash` — only `/bin/sh`
and `/usr/bin/env` are managed under `/`, with bash living on `PATH` at
`/run/current-system/sw/bin/bash`. The result: a first run on NixOS dies
on the very first sandbox call (the git probe) with `No such file or
directory (os error 2)`, surfaced as `sandbox git unavailable`.

## Fix

Switch all three sites from `Command::new("/bin/bash")` to
`Command::new("bash")`. `PATH` is already preserved by
`filtered_env_vars` (and explicitly tested at `local.rs:1164`), so
libc's `execvp` lookup resolves bash on every distribution that has it
installed, including NixOS, without forcing users to symlink
`/bin/bash`.

The `/bin/bash` references in `docker.rs` are unaffected — those execute
inside containers where the path always exists.

## Credit

Diagnosis and proposed fix by @allouis in #232 — they ran the
PATH-lookup variant locally on NixOS 26.05 and confirmed workflows ran
cleanly without the symlink workaround.

Closes #232

---

[![Compound Engineering
v2.60.0](https://img.shields.io/badge/Compound_Engineering-v2.60.0-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
🤖 Generated with Claude Opus 4.7 (1M context, extended thinking) via
[Claude Code](https://claude.com/claude-code)

Co-authored-by: Fabien O'Carroll <3218915+allouis@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 10:31:12 -04:00
..
src fix(sandbox): resolve bash via PATH instead of /bin/bash (#241) 2026-05-12 10:31:12 -04:00
tests Cancel in-flight agent stages with CancellationToken (#211) 2026-05-05 09:54:22 -04:00
Cargo.toml Add ACP backend support (#237) 2026-05-11 23:39:43 -04:00