Ray's Knowledge Base
Unlock

A cd into a shallow-clone dependency dir leaves the session cwd there and rvow denies every write tool

PitfallVerified 23 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

After cd .cpmsource/simdjson/076d && grep ... in one Bash call, every Bash, Edit and Write call fails with: rvow: the hook failed, so tools that write stay denied until it works: shallow: a shallow clone hides the root commit that identifies the project. Fix: run git fetch --unshallow. A later cd <project> && pwd is denied too, because the hook runs before the command.

Cause#

The Bash cwd persists between calls. The rvow hook finds the project from the session cwd, and the .cpmsource dependency dir is a shallow git clone. A subagent gets the same cwd and the same denial. Read, Grep and Glob still work.

Fix#

Never cd into .cpmsource (or any other nested git checkout). Read it with the Read and Grep tools by absolute path, or use a subshell: (cd dir && cmd). Once stuck, restart the session in the project root. Do not run git fetch --unshallow in a dependency cache or rvow install as a workaround.

Evidence#

Seen in a dftracer-utils session on 2026-10-23, task TSK-pws3t1. Five Bash calls, one Edit and one subagent Bash call were all denied with the text above.

Later case: A ! cd that the user types runs in its own shell. It does not move the agent's shell, so rvow kept denying the write tools.