Skip to content

fix(agents): send every repo search to code_search - #35

Merged
wongk merged 1 commit into
mainfrom
fix/opus-55-code-search-first
Sep 25, 2026
Merged

wongk merged 1 commit into
mainfrom
fix/opus-55-code-search-first

Conversation

@wongk

@wongk wongk commented Sep 25, 2026

Copy link
Copy Markdown

Why

An audit of transcripts from Sep 22–25, after the code-index fixes (#25–#34), found that code search no longer fails (0 of 383 calls, down from 47%). But agents on Opus 5.5, the default model since Sep 22, almost never use it:

Build agents (lemoncrow:code) Transcripts Code search per 100 calls Shell repo searches per 100 calls Code search's share of repo searches
Opus 5, before Sep 19 513 1.9 13.5 12%
Opus 5, Sep 22–25 12 2.6 18.4 12%
Opus 5.5, Sep 22–25 36 0.8 22.0 3%

The instruction said "otherwise start with code_search" and banned grep only "to read, search, or recheck indexed results". Opus 5.5 reads that narrowly. It runs grep -rn, rg and git grep over the tree for symbols, UI copy, flag names and constants, which are all things code search answers.

Change

In the write-capable tool-discipline section, which build agents and main sessions get:

  • Any repo search goes to code_search, including symbols, strings and regex, with every term in one query.
  • bash names the banned commands: grep -r, rg, git grep, find, sed, cat and head over the repo. Shell search stays allowed for logs, scratch files and a command's own output.

The persona budget has only 16 tokens to spare on main, so the rule replaces existing wording instead of adding to it. Persona sources now total 4,949 of 4,950 tokens. It drops the clause "related_symbols/candidate_files cover every site" and tail from the list of banned readers.

The read-only section is unchanged.

Checked

  • make sync-agent-context regenerated 31 host files.
  • The persona budget and generated-context tests pass (47 passed).
  • Code search finds exact string literals in code, so steering string lookups to it is sound.

Follow-up

Rerun the audit a few days after this is installed and compare Opus 5.5's share of repo searches against the 3% above.

@wongk
wongk merged commit 4e3ccc9 into main Sep 25, 2026
9 checks passed
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