From 41669ca00cfc9b025b8e79172065ef3b9ded80a9 Mon Sep 17 00:00:00 2001 From: Gavin Staniforth Date: Mon, 7 Sep 2026 10:08:22 +0100 Subject: [PATCH] docs(models): explain why Bash commands need absolute paths Add a Bash commands section describing that relative paths after a cd cannot be resolved by the permission checker, so every such command triggers an approval prompt. Replace the older token-rule bullet with a pointer to the new section. Co-Authored-By: Claude Fable 5.1 --- models.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/models.md b/models.md index ca3a44e..44acf5f 100644 --- a/models.md +++ b/models.md @@ -46,11 +46,20 @@ cheapest model that does the job well. file's contents; paste the relevant doctrine into the prompt. - Batch independent agent launches in a single message so they run concurrently. -- Use absolute paths in Bash commands. A relative path needs a `cd` first, and - a `cd` inside a compound command can trigger a permission prompt and an extra - round-trip. +- Use absolute paths in Bash commands (see [Bash commands](#bash-commands)). - Scope `grep`/`rg` and other searches to a specific absolute path rather than the whole repo — a targeted search returns fewer, more relevant hits and burns fewer tokens. +## Bash commands + +Use absolute paths built from the repository root rather than `cd && ` +with relative paths. Relative paths after a `cd` can't be resolved by the +permission checker, which causes an approval prompt on every command. + +``` +Bad: cd && grep -rn "foo" src +Good: grep -rn "foo" /src +``` + Project-level `CLAUDE.md` may override this.