From b96ef07b714a585c3dfc190bed6d9a474a08dacf Mon Sep 17 00:00:00 2001 From: Gavin Staniforth Date: Fri, 4 Sep 2026 14:48:43 +0100 Subject: [PATCH] feat(models): prefer absolute, scoped paths in Bash and search Add token rules instructing Claude Code to use absolute paths in Bash commands and to scope grep/rg searches to a specific path. A relative path requires a preceding cd (which can trigger a permission prompt and an extra round-trip), and an unscoped search returns more noise and burns more tokens than a targeted one. Co-Authored-By: Claude Opus 4.8 --- models.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models.md b/models.md index a1c7300..ca3a44e 100644 --- a/models.md +++ b/models.md @@ -46,5 +46,11 @@ 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. +- 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. Project-level `CLAUDE.md` may override this.