claude plugin eval agent shell: bare git is a failing xcrun shim and env is filtered
Symptom#
In a claude plugin eval run, the agent's Bash cannot run tools that call git. rvow brief, status and prove fail with "couldn't create cache file '/var/folders/.../xcrun_db-...' (errno=Operation not permitted)". A hook that needs git cannot find the repo, so an out-of-scope edit gets through. Adding /opt/homebrew/bin to PATH inside the agent's command does not help. The agent also runs the installed rvow, not the build under test, when the run.sh PATH prefix is lost.
Cause#
The agent's Bash gets a reset PATH. The bare name git stays pinned to /usr/bin/git, an xcrun shim that needs a cache file the sandbox forbids. The agent session passes only an allowlist of the parent env plus case env: keys that start with EVAL_. A plain RVOW_GIT set in the parent shell is stripped before it reaches the agent's shell.
Fix#
Use an absolute path to a real git (xcrun -f git or /opt/homebrew/bin/git). Make the tool read a git-binary override. In rvow, RVOW_GIT is read by a helper in crates/rvow-core/src/git.rs, and the binary falls back to EVAL_RVOW_GIT. In evals/agent/run.sh, export both RVOW_GIT (this reaches the hooks, which run outside the sandbox) and EVAL_RVOW_GIT (this passes through to the agent's shell). Do not rely on PATH order for git inside the eval agent.
Evidence#
Live probe eval (about $0.20) that printed the agent env: parent PATH and parent EVAL_* vars pass, RVOW_GIT is stripped, and bare git stays /usr/bin/git even with /opt/homebrew/bin first. After the fix, evals/agent/run.sh haiku --case outside-scope --runs 1 --keep-temp scored 1 with rvow brief and rvow status working in the trace. Item text: "/usr/bin/git is an xcrun shim. In the sandbox it fails" and "So plain RVOW_GIT in the agent shell is not possible."