Repository navigation
fix(mcp): send every repo search to code_search in the server instructions - #37
Merged
Merged
Conversation
…tions Claude Code reads Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-Authored-By: lemoncrow <302591943+lemoncrow-agent[bot]@users.noreply.github.com> LemonCrow-Session: 90d6a214-e1bd-4377-b621-531411b973b6 LemonCrow-Model: claude-opus-5-5
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#35 made the "search with
code_search" rule firmer inintegrations/agents/shared/tool-discipline.md. It never reached Claude Code.scripts/sync_agent_context.pydeliberately gives Claude personas only a one-line tool rule (_CLAUDE_TOOL_DISCIPLINE), because Claude Code gets the full tool discipline from the MCP server'sinstructionsfield,SERVER_INSTRUCTIONS. Claude Code'slemoncrow:codebuild agents and main sessions are exactly the population the audit measured:#35 left all of them with the old wording. I claimed otherwise in #35's description without checking the generated Claude files.
Change
SERVER_INSTRUCTIONSgets the same rule #35 gave the other hosts:code_search, all terms in ONE call" replaces "Lead withcode_search… never shell-grep or re-verify indexed results". Opus 5.5 read the old wording as covering only results already indexed.bashbullet now names the commands: nevergrep -r/rg/git grep/findon the repo.SERVER_INSTRUCTIONSwas already at its 215-token ceiling. It stays at exactly 215, because the new wording replaces two things:code_searchcall returns, which the tool's own schema already carries;This string ships to every host that renders MCP instructions. Codex and OpenCode ignore it; they already got the rule through #35's persona text.
Checked
test_telegraphic_budget.pypasses; the instructions are 215 of 215 tokens.initializeor the instructions pass.Follow-up
Once this is installed, rerun the transcript audit and compare Opus 5.5's share of repo searches against the 3% baseline.