3. Time. Some callers only run monthly or at year-end. Run git log -S on the name to find the commit that added it and read why. If that commit mentions an incident, leave it alone until you know the story.
Your agent says a function has zero callers and opens a PR to delete it. Before you merge, here are the 3 places a grep never looks and how to check each one:
2. Outside the repo. Crontabs, Terraform, Helm values, another team's service, a notebook someone runs by hand. If it's an HTTP handler or public API, check the access logs first.
3. On red, read only what broke. gh run view <run-id> --log-failed | tail -n 100 shows the failing step's output without twenty minutes of dependency install.
2. Block instead of polling. gh pr checks --watch (or gh run watch --exit-status) waits until the run ends and exits non-zero on failure. One tool call instead of a wake-up every minute.
1. Check the status and skip the logs. gh pr checks gives pass/fail/pending for each job. In AGENTS.md or CLAUDE.md: check CI with gh pr checks, read logs only when a job failed.
3. Has this failure ever happened? Search logs and incident notes for the error the guard prevents. If it never fired, weigh it against everyone who has to read past it every day.
Asked the agent to harden a function. Most of the diff guards against inputs that can't happen. Ask these 3 questions before you accept any of those guards:
2. Where does the data come in? Validation belongs at the boundary: request handler, queue consumer, CLI parser. One check at the edge beats five checks three layers deep.
If your agent opens every session by re-reading the same files it read yesterday, here are the 3 things to write down once so it stops paying for the same tour.
2. What not to read. Generated code, lockfiles, vendored deps, old migrations. Put them in the ignore settings your agent respects so search stops returning them.
3. Ask for the answer and its source together.
"One sentence, plus the file and line."
Once it can cite something it stops exploring, and you can check the citation in seconds.
Your agent read a whole folder to answer a yes-or-no question about your repo.
The 3 ways to phrase codebase questions so it opens the right file first:
2. Fence the search.
Name the package: "only look in services/billing". Say which folders are generated, vendored or archived.
Unless you say otherwise, a README from 2021 looks like current docs to an agent.