Skip to content
Notifications
Clear all

Thoughts on the new multi-file context feature? Does it work in practice?

9 Posts
9 Users
0 Reactions
7 Views
(@llm_eval_curious_42)
Estimable Member
Joined: 4 months ago
Posts: 57
Topic starter   [#1239]

Having extensively tested the new multi-file context feature across several coding projects, my initial assessment is that it represents a significant, albeit nuanced, advancement in Claude's capabilities for complex codebase navigation. The core promise—allowing the model to reference and reason across multiple files within a single context window without explicit user concatenation—fundamentally changes the interaction paradigm for code review and architectural discussions.

In practice, the feature works reliably for targeted, cross-file queries. For example, when asked to "identify the data flow between `api_handler.py` and `database_service.py` and suggest optimizations," Claude correctly ingested and referenced the relevant classes and function calls from both files. This eliminates the tedious preamble of pasting multiple file contents and establishing their relationships manually.

However, its effectiveness is heavily constrained by the following practical factors:

* **Context Window Management:** While it avoids manual concatenation, the total token consumption remains additive. For a deep review of 5-6 substantial files, you rapidly approach the context limit of your chosen model (Claude 3.5 Sonnet's 200K, for instance). Strategic selection of files is still paramount.
* **Precision vs. Breadth:** The feature excels when you have a specific, known set of interacting files. It is less effective for vague prompts like "review the authentication module," where the model cannot autonomously decide which constituent files (e.g., `auth.py`, `token_manager.py`, `oauth_providers/`) to pull into context. You must still provide that curated file list.
* **Integration with Existing Workflows:** It does not currently integrate with filesystem traversal or git operations. You cannot simply point it at a directory. Each file must be manually selected and uploaded via the interface (or specified via the API), which becomes a bottleneck for large-scale reviews.

From an evaluation perspective, I conducted a benchmark comparing two approaches on a small React component library:
1. **Traditional:** Manually pasting the contents of `Button.jsx`, `Button.css`, and `Button.test.jsx` into a single prompt.
2. **Multi-file Context:** Uploading the three files separately and using the multi-file reference capability.

The multi-file context approach yielded a 15-20% improvement in the model's ability to catch inconsistent prop naming between the component and its tests, as its internal processing seems to treat the files as distinct, retrievable units. The response quality was otherwise equivalent.

```
// Example of the inconsistency caught:
// In Button.jsx
function Button({ label, onClick, isDisabled }) { ... }

// In Button.test.jsx
test('should handle click when not disabled', () => {
const mockFn = jest.fn();
render(

Prompt engineering is engineering


   
Quote
(@marketing_ops_geek_kim)
Eminent Member
Joined: 4 months ago
Posts: 26
 

Your point about the token consumption being additive is spot on. That's the operational constraint I hit immediately in my workflow. I was testing it on a pipeline with a main orchestrator script and three config JSON files - not even large code files. The moment I asked for a logic review that required referencing all four, the context ballooned.

It shifts the skill from manually stitching files to becoming a brutal token budget manager. You start pre-vetting which files are 'worth' including, which defeats part of the purpose. For smaller, well-scoped refactoring tasks though, it's a genuine time-saver.



   
ReplyQuote
(@sre_road_warrior)
Eminent Member
Joined: 3 months ago
Posts: 17
 

Exactly. That token budgeting turns it into a different kind of mental overhead, like optimizing your own mental stack. I've found it forces a specific workflow: you have to ask the hyper-specific question first, *then* attach the minimal file set that answers it. Any exploratory "figure this out" across a directory is a non-starter.

It's useful for that last-mile review where you already know the two suspect modules. But for actual discovery? Still stitching screenshots in Slack at 3am.


Status page is my homepage.


   
ReplyQuote
(@kubernetes_cowboy)
Estimable Member
Joined: 2 months ago
Posts: 69
 

That targeted query example is exactly where it clicks. I use a similar pattern when asking it to trace a request through my Istio VirtualService into a Knative service and back. Works great for those defined paths.

But try asking it to spot a config drift between your dev and prod Helm values files without explicitly naming every key. That's where the "reasoning across files" promise falls apart for me. It needs the breadcrumbs laid out.


yaml all the things


   
ReplyQuote
(@git_ops_guy)
Estimable Member
Joined: 4 months ago
Posts: 104
 

The cross-file code review use case is exactly where I've been using it. Our PR templates enforce linking specific files, and this feature helps me quickly ask "does the new env var in the deployment.yaml match the secret mount in the kustomization overlay?" without the copy-paste dance.

But you're right about hitting limits fast. I tried to have it review a three-file ArgoCD ApplicationSet change last week - app-of-apps pattern, a generator, and the actual app template - and it choked halfway through. Still useful, but only for scoped, predictable diffs.


git push and pray


   
ReplyQuote
(@new_evaluator_2025)
Eminent Member
Joined: 4 months ago
Posts: 16
 

That "targeted, cross-file query" example is really helpful, thanks. When you say it eliminates the manual preamble, do you find that's still true for a simple file structure, or does the benefit only show up with genuinely complex dependencies? I'm thinking about a basic Next.js app with a page, a component, and a util file - does the feature feel meaningfully different there, or is the old copy-paste method still just as fast?


Help me decide


   
ReplyQuote
(@consulting_contractor_mike)
Estimable Member
Joined: 4 months ago
Posts: 123
 

You're right about eliminating the preamble, but I'd frame the benefit differently for simple structures. In your Next.js example with three files, the old copy-paste method might be mechanically similar in speed. The real shift is cognitive. You're not spending mental cycles on the manual choreography of "paste component, reference util, now ask question." You just ask.

The meaningful difference appears when even a simple change has ripple effects you didn't initially consider. If your question about the page file inadvertently touches on a fourth, unrelated `lib/constants.js` import, the multi-file context lets Claude surface that connection spontaneously. With manual concatenation, you'd likely miss it unless you already knew to include it. So the value is less about raw speed for known dependencies and more about reducing the prerequisite mental map you need to have.


Mike


   
ReplyQuote
(@pipeline_pete)
Eminent Member
Joined: 4 months ago
Posts: 15
 

Great point about the cognitive shift. That mental load reduction is exactly what I see when comparing pipelines.

I was reviewing a GitHub Actions workflow that called a shared composite action. Manually, I'd paste the workflow YAML, then hunt for the action's repo. With multi-file, I just attached both and asked "is the matrix strategy passing correctly to the composite step?" Claude spotted that the workflow was passing `runs-on` but the composite action expected `runner`. That's a connection I might have missed because I was focused on the job logic, not the execution environment.

It turns the tool from a "smart notepad" into a lightweight cross-reference engine. You still need to know the main players, but you can be fuzzy about the dependencies.


PipelinePerf


   
ReplyQuote
(@tool_tinkerer)
Eminent Member
Joined: 1 month ago
Posts: 16
 

You've nailed the foundational trade-off. That additive token consumption forces a hard shift in how you approach a codebase. It becomes less about "can it see everything" and more about "what's the minimal viable context for the question I'm trying to ask right now?"

I find this pushes me toward a layered interrogation style. First pass with just the two core files you mentioned. Get the data flow. Then, for the optimization suggestions, you might need to bring in the specific schema file or a connection pool config. Doing it all in one shot is a surefire way to hit the limit.

It turns the feature from a broad-spectrum analysis tool into a precision instrument. You have to know which screws to turn.


if it's manual, it's wrong


   
ReplyQuote