Repository navigation
feed: the agent searches untouched — no hook before or after a read or search - #1871
Merged
swapnilpaliwal-sd merged 2 commits intoOct 9, 2026
Merged
Conversation
The plugin no longer speaks before a Read, Grep, Glob or Bash call. What the graph adds around a search comes after it, from the grep's own result (enrich.py's grep aid): only what the search missed — which declaration each match reaches when several fit, the callers whose line never spells the name, a declaration nothing in the code calls that the runtime enters — and nothing when the grep was complete. The pre-search directive asked the agent to come to the tools before it had seen any output, and the evidence never favored that shape: the feed audit found the generic form acted on 0% of the time, and the depth ablation found injecting answers moves an agent where naming tools does not. direct.py and its suite go; mcp_first pins that no PreToolUse hook is wired on search tools; python_names keeps its launcher checks on enrich.py (its failing placeholder check fails identically on the base tip with direct.py restored — pre-existing, environment-dependent, not this change). Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
October 8, 2026 19:39
enrich.py — the PostToolUse block after a Read, Grep, Glob or shell command — is removed, the counterpart of the pre-search directive this branch already removed. The agent searches and reads untouched; the graph speaks when it is called, through the MCP tools and the CLI. Measured offline before removing it: replaying 111 real agent greps from 38 discovery tasks through the hook, grep graded on its full file list, the shipped block named no fix-site file the search had not already found, and a widened version named none either (TypeScript and Python, issue-text patterns: one hit each, one of them a false lead). The fix-site files contain the word the agent grepped, so a grep never misses them. Kept: changes.py (a signature edit's blast radius before it lands, and every change reported on the next prompt), orient.py, refresh.py. A body-only edit is now reported on the next prompt instead of right after the edit. Wiring: the Claude and Gemini hooks files drop enrich.py. Tests: enrich_budget and enrich_lines go with it; hook_languages moves its C# abstract-test-base checks to the `tests` verb; hook_rebase keeps the `changed` and pre-edit checks (and calls `changed` through the dispatcher, which the trimmed front door no longer routes); hooks_from_path proves the path lookup through changes.py; hosts drops its enrich cases; validate.py checks the pre-edit block only. The agent docs no longer promise a block after a grep. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
enabled auto-merge
October 9, 2026 19:48
swapnilpaliwal-sd
disabled auto-merge
October 9, 2026 19:48
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.
What
No hook speaks around the agent's own reads and searches any more. Both halves of the search feed are removed:
direct.py).enrich.py), in the Claude and Gemini hooks files.The agent searches and reads untouched; the graph answers when it is asked, through the MCP tools and the CLI.
Why
Measured offline before removing the post-search block: 111 real agent greps from 38 discovery tasks replayed through the hook, with grep graded on its full file list. The shipped block named no fix-site file the search had not already found, and a widened version named none either. On TypeScript and Python (issue-text patterns) it found one each, and one of those was a false lead. The fix-site files contain the word the agent grepped, so the search never misses them. The pre-search directive's own audit had found it acted on 0% of the time.
Kept
changes.py: a signature edit's blast radius before it lands, and every change reported on the next prompt. A body-only edit is now reported on the next prompt rather than right after the edit.orient.pyandrefresh.py.Tests
directive.py,enrich_budget.py,enrich_lines.py.hook_languages.py: the C# abstract-test-base checks move to thetestsverb.hook_rebase.py: keeps thechangedand pre-edit checks, and callschangedthrough the dispatcher (the trimmed front door no longer routes it, which had the suite failing 16 checks at the branch tip).hooks_from_path.py: proves the path-to-graph lookup throughchanges.py.hosts.py: drops its enrich cases.mcp_first.py: pins that no PreToolUse hook is wired on search tools.validate.py: checks the pre-edit block only.The agent docs (AGENTS.md, rules, SKILL.md, README) no longer promise a block after a grep.
Verified locally
hook_rebase 8/8, hook_languages 7/7, hooks_from_path 12/12, hosts ok, mcp_first 24/24, validate.py on a case 5 facts / 0 wrong. Pre-existing on the base and unchanged here: mcp_docs (4) and surfaces (1) from the
contexttool, the SKILL.md copies drift, and one python_names placeholder check.