Arquivo do dia
A Claude Code subagent that finds code without eating your context
Slava Sazhin 24 de setembro de 2026 2 min de leitura 0 visualizações
A Claude Code subagent that searches unfamiliar code in its own context and hands back only paths and line numbers. One file, a minute to install.
Today's file is a subagent for Claude Code. You ask where something lives in code the session has never seen, the search runs in a separate agent, and what comes back is addresses rather than file contents.
Why a separate agent
Everything the main session reads stays in its context. To find where a function is defined and who calls it, it may open a dozen files, and by the time the real edit starts a good part of the context is taken up by text it no longer needs. A subagent reads in its own context, and only its answer comes back, in lines like these:
app/Services/Billing.php:142 - charge() is defined here app/Http/Controllers/CheckoutController.php:58 - the only caller
Plus two or three lines on how the thing is built. Its prompt calls retelling a file instead of giving addresses a failed job.
What to change
Ours runs on opus with effort: high, because a wrong address costs more than the search. Put sonnet or haiku in the model line for a cheaper search, or inherit to run it on whatever the main session runs on.
It has no Edit or Write tool, so it cannot change a file through them. It does have Bash, for grep and find, which makes read only a rule in its prompt rather than a lock. If you want the lock, take Bash out of the tools line.
Install
One file goes into ~/.claude/agents/, and a new session picks it up. The word PROACTIVELY at the start of its description nudges Claude to call it on its own before an edit. The command and a one-line check are in the note below.
Os arquivos
Os arquivos do dia são para assinantes pagos: qualquer plano libera todos. Já é assinante? Então entre.
Ver os planosEste artigo valeu o seu tempo?
Leia também
Context Will Not Create Itself
The bank asked for its annual KYB. Why the agent uploaded the documents rather than me, and why it writes a diary entry after every task.
Arquivo do dia
A Claude Code hook that keeps the agent from wiping your database
A PreToolUse hook that stops Claude Code before it runs DROP TABLE, TRUNCATE or DELETE without WHERE. One script, a minute to install.
Claude Code VPS and hosting compared: seven always-on machines and what they cost
Seven machines that keep Claude Code running around the clock, from 2.99 EUR to 29.99 USD a month: what each one includes, what we left out and why.
Dê ao Claude um computador só dele
Sua própria máquina Linux com o Claude Code, trabalhando 24 horas por dia enquanto seu notebook está fechado. A partir de $3.49 por mês.