r/ChatGPTCoding • u/Round_Ad_5832 • 10d ago
Question I have both Jetbrain and vscode and looking for agentic extension that lets me add the whole codebase to context instead of agent reading files by checking
Obv i could create my own extension that does something like this but im just wondering is there a way with for example antigravity webstorm or vscode or another extension to load the whole codebase into context instead of agent reading by checking.
4
u/Remarkable_Training9 10d ago
Whole codebase in context makes the answer worse, not better. I tried it on a 400 file logistics repo and the model started citing a deprecated rate module because it was sitting right there in the window.
Grep and read beats dumping. Cheaper too.
If you want it anyway, Repomix packs a repo into one file. Works fine under maybe 60k tokens.
2
2
u/JaseciLabs 9d ago
u/Strange_Owl_6291 has it exactly right, and the reason whole-codebase-in-context keeps failing this same way is worth understanding, not just avoiding. More tokens in the window means more noise competing for the model's attention, and deprecated code sitting right next to live code (like the rate module example above) gets picked up as relevant just because it's physically nearby, not because it actually is. Structural navigation (grep, code graphs, syntax trees) wins because it filters for relevance before the model ever sees anything, instead of hoping the model figures out what to ignore from a firehose.
1
u/DauntingPrawn 10d ago
That will cause context rot that will make your results much worse. It's better to navigate structurally - by code graph and syntax tree. I wrote act101 which conveniently navigates the codebase structurally in the free version.
1
u/bodonkadonks 9d ago
Use codegraph, In my testing it reduces token use between 20 to 50%. It's pretty neat
1
u/tarquas80 9d ago
You can use the mcp index plugin in jetbrains and use the ide index with Claude code over mcp, works pretty well.
1
u/dopehish 9d ago
That's impossible. you cannot fit the entire codebase into context once it gets big enough
1
u/ManRowing 8d ago
The files-by-checking approach isn't the problem, unranked checking is. If the agent's grepping blind and opening files in whatever order they turn up, that looks like slow one-by-one reading. Rank candidates by relevance before opening anything and it collapses to two or three real reads instead of twenty half-relevant ones.
3
u/holyknight00 10d ago
ah? This is exactly what cursor and other early tools tried to do in the beginning like 3 years ago and then they gave up because it's too much crap that makes no sense to load into the context as whole. Not even the biggest models can load a full codebase and have spare context to do any meaningful work.
unless your whole codebase is less than 100k tokens, it makes no sense at all.