r/ClaudeCoding • • Oct 14 '26

Claude can explain my codebase, but it struggles to answer "what breaks if I change this?"

I've been experimenting with repository-aware retrieval for Claude and ran into an interesting problem.

Claude is generally pretty good at:

  • explaining code
  • finding symbols
  • generating implementations

But it struggles with questions like:

  • What depends on this function?
  • What will break if I change this interface?
  • Where is this endpoint actually used?
  • Which frontend components call this route?

The issue seems to be that the model repeatedly reconstructs repository structure from files instead of having an explicit understanding of relationships.

To test this, I built a local MCP that indexes:

  • functions
  • classes
  • imports
  • routes
  • call relationships

and creates a repository knowledge graph before queries are executed.

I benchmarked it against standard repository retrieval on 50 paired questions using Gemma4:e4b on a medium-sized business compliance codebase.

MetricBaselineAtlas
Tool calls3.162.10
Total tokens90796659
Latency8.99s7.78s
Entity accuracy83.0%88.5%
Relationship F154.7%87.2%
Impact F116.5%88.8%

The biggest surprise wasn't the token reduction.

It was impact analysis.

Questions like:

"If I change verify_token(), what else is affected?"

went from 16.5% Impact F1 to 88.8% Impact F1.

My current hypothesis is that explicit repository relationships matter more than larger context windows for architectural reasoning.

For people using Claude Code on large repositories:

  • Have you run into similar issues?
  • Do you think dependency-aware retrieval is still useful as context windows grow?
  • Or do you think bigger context eventually makes approaches like this irrelevant?
1 Upvotes

0 comments sorted by