AI Coding Agent Getting Worse? What a Codebase Map Can Fix
Part of the AI Code Quality guide. Start with How to Reduce AI Coding Mistakes: A Practical Guide
Your AI coding agent is getting worse, or at least it feels that way. Last week it traced a call chain correctly on the first try. This week it renames a helper, misses two downstream callers, and quietly breaks a cron job. Same repo, same prompts, same you.
Before you decide you've forgotten how to prompt, know that this complaint has a documented precedent. It's also worth being clear about which part of the problem a codebase map addresses and which part it never will.
I build Pharaoh, so I have a stake in the map half of this. I'll try to be straight about where it stops.
The documented case: Claude Code quality complaints in 2026
On April 23, 2026, Anthropic published a postmortem on weeks of user complaints about Claude Code quality. It traced the problem to three product-level changes, not to the underlying models. One was a change to the default reasoning effort, which dropped from high to medium on March 4. Anthropic reported that the API and inference layer were unaffected, said it never intentionally degrades its models, and listed the issues as resolved on April 20 with version 2.1.116.
Fortune's coverage added a second layer. It reported that Anthropic first implied users were partly to blame, which damaged trust before the postmortem arrived. VentureBeat and Business Insider also covered the episode, and the picture across the coverage is consistent: users noticed something real, were told it might be them, and were later vindicated by the vendor's own writeup.
I'm not citing this to pile on. Product defaults change, and any tool you run daily can shift under you. The lesson for a senior engineer is narrower and more useful:
- A real regression can exist in the product layer while the model itself is unchanged
- Your sense that "it got worse" is a legitimate signal, but without measurements behind it, it's an unreliable instrument
- You usually find out weeks late, from a changelog or a postmortem, not from your own tooling
That third point is the one you can do something about.
Why a degraded or inconsistent agent hurts a codebase
A weaker or more variable agent doesn't fail loudly. It fails in ways that survive code review on a busy afternoon. With less reasoning budget, an agent tends to fall back on the cheapest strategy available: search, open a file, read, search again. The failure modes are familiar:
- More file-by-file grepping. The agent reconstructs the shape of your system one
grepat a time, every session, and the reconstruction gets sloppier when effort drops. - Missed callers. A text match finds the function you named. It doesn't reliably find the code two hops away that depends on its behavior.
- Duplicated functions. If the agent can't cheaply discover that a utility already exists, it writes another one, and you end up with three slightly different
formatCurrencyimplementations. I've written separately about duplicate functions in AI coding and why this compounds. - Tests that pass while the feature stays unwired. The agent builds the handler, writes a test for the handler, and never connects the handler to a route or entry point. Green CI, dead feature. That pattern gets its own treatment in passing tests with missing feature wiring.
None of these are exotic. They're what happens when an agent has to infer structure instead of reading it. A degraded session makes the inference worse, and even a normal session makes it expensive. If you've watched your usage climb on a large repo, that's the same mechanism showing up in your bill, which I get into in the guides to Claude Code context limits and Claude Code cost.
What stays stable: a persistent map the agent queries
This is the part a codebase map can address. Pharaoh builds a persistent map of your repository: functions, callers, modules, and dependencies. For live repositories, a push to the default branch queues a refresh. The agent queries the latest completed map over MCP.
The shift is small to describe and large in practice. Your agent reads files. Pharaoh can show it detected callers before it makes a change. Instead of searching and opening files to guess what a change touches, the agent asks the map where code lives and what depends on it.
A few queries do most of the work:
- Blast radius. Before editing a shared function, ask what calls it, directly and transitively. This is code impact analysis as a lookup instead of an investigation, and it's the most useful thing to put in front of an agent before it changes shared code.
- Entry-point tracing. Given a new handler, ask whether it's reachable from a route, job, or exported entry point. This is the direct check against the "tests pass, feature unwired" failure.
- Reuse and dead-code lookup. Before writing a new helper, ask whether something equivalent already exists. After a refactor, ask what's no longer called.
Here's why this matters for the degradation question. These answers come from the map, not from the model's in-session reasoning. If a session runs at lower effort, the structural facts the agent works from are the same ones it would have had at high effort. The map reduces how much the agent has to infer, so a worse day costs you less.
There’s a cost angle too. In our 182-session Claude Code study, we measured token use on a fixed set of codebase questions. Try the same questions with and without a map on your own repository to see where it saves context.
PR Guard as a second check
The map also powers PR Guard, which reviews a pull request against that same structure: what the diff touches, and what depends on it. I think of it as a second check, not a replacement for review. The agent that wrote the change and the reviewer of the change shouldn't share the same blind spot. PR Guard's full analysis is a Pro feature.
Honest limits
I said I'd be fair about the boundaries, so here they are.
The map doesn't fix the model. If the model reasons poorly in a given session, it still reasons poorly. A map gives it better inputs; it doesn't give it a better brain.
It can't stop a vendor-side regression. A change to default reasoning effort, a tool-use change, a prompt-layer change: none of that is something a codebase map can see or block. If the product layer shifts underneath you, you'll still feel it.
It doesn't guarantee bug prevention. A blast-radius query tells you what a change touches. It doesn't establish that the change is correct, that runtime behavior is right, or that requirements are met. Use it to help catch the missed-caller and unwired-feature classes of bug, not to certify a diff. Pharaoh analyzes TypeScript, JavaScript, Python, C and C++. For mixed-language repositories, check whether the relationships you need stay within the mapped code.
The map reflects the default branch. An unmerged feature branch stays outside the map until it lands on the default branch. Check which revision an answer reflects, the same way you would with any indexed tool.
If someone tells you a tool makes your agent immune to model drift, they're selling something. The honest claim is smaller: some failure modes come from inferring structure, and you can remove that inference.
A checklist to detect degradation on your own repo
A hunch isn't a measurement. The April episode is a good argument for instrumenting your own workflow so you notice a shift in days, not weeks. Here's what I'd track.
1. Duplicate-function rate. Count new functions per week that duplicate existing ones. A rising rate suggests the agent is failing to discover existing code. A reuse lookup against a map makes this cheap to check, and a manual sample works too.
2. Unwired features. Count merged changes where new code isn't reachable from any entry point. Entry-point tracing turns this from a post-incident discovery into a routine check.
3. PRs touching callers the agent didn't mention. When the agent summarizes a change, compare its stated impact to the actual set of callers. A widening gap is one of the clearest signs that structural inference is slipping.
4. Reasoning-effort and config changes. Read release notes and changelogs for default changes, and check your own settings. The March 4 effort change is a good example of a default you wouldn't notice unless you went looking. Record your effective settings in the repo so a change shows up in a diff.
5. Pinned versions. Where your tooling allows it, pin the client version and upgrade deliberately. If quality shifts, you want to know whether you changed something or the tool did.
6. A small regression task set. Keep five to ten representative tasks with known-good outcomes: rename a shared helper, add a handler and wire it, find all callers of a function. Rerun them after any tool update or whenever something feels off. It takes an hour to build and gives you something better than a feeling.
None of this requires Pharaoh. It does get easier when the structural questions are queries instead of manual reconstruction.
Trying it
If you want to test the map against your own checklist, install it with:
npx @pharaoh-so/mcp@latest install
The trial needs no credit card. Pick a relationship you know exists in your TypeScript code, trace it through the map, and inspect whether the answer matches what you know. If it does, run your regression tasks with and without it and see what changes. That comparison is worth more than anything I could assert here.
Get started free at pharaoh.so.
FAQ
Was Claude Code actually degraded in early 2026?
Anthropic's April 23, 2026 postmortem attributed quality complaints to three product-level changes, including a default reasoning-effort drop from high to medium on March 4. It said the API and inference layer were unaffected and that the issues were resolved on April 20 in v2.1.116. It also stated it never intentionally degrades its models.
Can a codebase map stop my agent from getting worse?
No. A map can't prevent a model or product-layer regression. It reduces how much structure the agent has to infer, so lower-quality sessions have less room to go wrong on questions like "what calls this?" and "where does this live?"
How do I tell whether my agent got worse or I'm imagining it?
Measure. Track duplicate-function rate, unwired features, and callers missed in agent summaries, and keep a small regression task set you can rerun after tool updates. Changes in those numbers are evidence. A hunch isn't.
Does the map replace code review or tests?
No. It helps catch missed callers and unwired code, but it doesn't establish runtime correctness or that requirements are met. PR Guard acts as a second structural check on a pull request, and its full analysis is a Pro feature.
Does it work with languages other than TypeScript?
Yes. Pharaoh analyzes TypeScript, JavaScript, Python, C and C++.
How current is the map?
For live repositories, pushes to the default branch queue a refresh. Check the last mapped revision when freshness matters.
Conclusion
Whether your agent actually got worse is a question only your own measurements can answer. The April 2026 episode shows the complaint can be real and still take weeks to confirm. Build the habit of checking: pin versions, keep a regression set, and track the failure modes that matter in your repo. Then give the agent structural facts to query instead of asking it to rebuild them every session. That won't fix a bad model day, but it shrinks the part of the work where a bad day does the most damage.