Just an anecdote: I was designing a project for LLMs onboarding and orchestration. Claude chose to read only the first 40 lines of each file. Later, in another session, looking for causes of low quality result, Claude detected the fault and changed the code to perform an AST analysis, so now the analyzer takes documentation lines and functions signature (input/output) as input. Claude's initial approach was really po…
I think it's taught to look at source code through a peephole for the sake of context preservation, but I feel like this could be a good use-case for some sub-logic or even a full sub-agent. Like, here sub-agent, you skim that file and tell me a summary, and highlight any areas related to X and Y so that I can look at them in my main context. You can also periodically observe the main work stream and interrupt me if…
How Claude Code works in large codebases
171–180 of 191 posts
Re: How Claude Code works in large codebases
#172Re: How Claude Code works in large codebases
#173Earlier quoted context omitted.
The article listed explains how to avoid this. If you naively turn it loose on a big code base, yes, you’ll burn a lot of tokens while it tries to find stuff.
This is such a shame, finding where stuff is in a large codebase is my number 1 use for LLM. I hate it that it relies on grep so much, I can do grep better and faster myself.
Re: How Claude Code works in large codebases
#174Re: How Claude Code works in large codebases
#175Earlier quoted context omitted.
My last project was about 400Gb, and probably 2M lines of C++. The days size is mostly assets but there’s still a lot of code.
>2M lines of C++ Even with a git history, wouldn't that only be maybe a few hundred MB?
Re: How Claude Code works in large codebases
#176How important are Claude.MD files when they don’t even describe (with concrete terms) what should even go into each one?
the fish: you can read about that here: https://code.claude.com/docs/en/best-practices#write-an-effe... the fishing: 1) install the official `skill-creator`; 2) use that with the above link to create `claude-md-improver`; 3) improve the skill by tasking claude with researching the topic of `progressive-disclosure`, in the official docs; 4) point the new skill at you CLAUDE.md file and accept the changes
Re: How Claude Code works in large codebases
#177Earlier quoted context omitted.
If you’re message is in response to me, which I think it is, I deliberately don’t give access to credentials and env variables. I’ve worked to create restrictions and seen AI models use very interesting methods to bypass them. Even now my prompt says the AI must verify the path of the files it intends to edit, and get permission before editing one file at a time and only after permission. I stop it from ignoring thos…
This is not privilege separation/sandboxing. Separate virtual machine for an agent with limited credentials is reasonably safe approach
I am open to being corrected and learning from you if you have a better method of sandboxing
Re: How Claude Code works in large codebases
#178Earlier quoted context omitted.
Dude, AI has been shown to execute queries on coworkers env files, extract master keys, decrypt variables and push to production.
Why are important push secrets in a dev env config? Btw humans devs make this same mistake all the time.
Re: How Claude Code works in large codebases
#179Re: How Claude Code works in large codebases
#180Earlier quoted context omitted.
or easier, open ~/.claude/projects/[project]/[session].jsonl (excluding the system prompt)
Doesn't really seem easier and it's in a harder to read format