Skip to content

perf(prompts): drop prompt text the request already carries - #421

Merged
mrnasil merged 1 commit into
mainfrom
perf/prompt-dedup
Nov 7, 2026
Merged

mrnasil merged 1 commit into
mainfrom
perf/prompt-dedup

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 7, 2026

Copy link
Copy Markdown
Member

Part of the token-efficiency series (#418, #419, #420).

  • build.txt. The "Filesystem tools" section listed list, repomap, glob, grep and read, and repeated what each tool's own description already says. Only the guidance the descriptions lack is kept: prefer these tools over shell, orient with repomap instead of a first-turn glob+read loop, use offset/limit on large files, and skip the cargo registry, ~/.cargo, target/ and node_modules.
  • build.txt. The "Time-sensitive facts" section repeated the # Environment line that every agent's system prompt already ends with ("do not pin the query to a past year; prefer canonical sources"). It is removed.
  • ask.txt. The same duplicated half-sentence is removed.
  • Kept. "Mode switches" stays: it is how the model can answer "how do I go read-only?".

The build prompt goes from 1,092 to 948 tokens (o200k, −13%), on every request of a build session.

Checks: cargo test -p whycodes-agent passes (764).

🤖 Generated with Claude Code

- build: the "Filesystem tools" list restated each tool's own description;
  keep only what the descriptions do not say (prefer them over shell,
  orient with repomap, offset/limit, which directories to skip).
- build: "Time-sensitive facts" repeated the `# Environment` line every
  agent already gets (trust the date, do not pin a past year).
- ask: same duplicate half-sentence.

build.txt 1,092 -> 948 tokens (o200k), on every request of a build session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mrnasil
mrnasil merged commit 11204c6 into main Nov 7, 2026
7 checks passed
@mrnasil
mrnasil deleted the perf/prompt-dedup branch November 7, 2026 13:36
@mrnasil mrnasil mentioned this pull request Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant