r/ClaudeCode • u/mutedkooky • 17h ago
Help/Question New features and sub agent
So my code i apparently 40k lines.
How do i make the features not take 4 hours each? They are a bit complex (PO System) but not that complex. What am I doing wrong? CC will always ask me do you want me to deploy agents all at once, one at a time (sub gets reviewed by current session) or should i do it myself? I usually go for one at a time but it takes so much time. Can someone help?
2
Upvotes
•
u/AutoModerator 17h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/hieuphung97 17h ago
The bottleneck is full-repo discovery scans. On a 40k LOC codebase, Claude Code burns hours if you let it scout unguided. Pass the exact target files and module boundaries in your prompt instead of letting subagents grep everything.
1
u/calunicornia 17h ago
I let the agents approve everything.
1
u/EducatorOne7130 15h ago
tbh for a 40k loc repo, spinning up sequential subagents one by one is usually slower than just doing it in the main session. each subagent starts cold and re-reads half the repo, so I just use plan mode first and only split into subagents when two tasks don't overlap at all.
1
u/2bluenucleus 15h ago
Two things that usually cut that time a lot on a repo that size, on top of the plan-first advice above:
For a PO feature specifically, ask it to write the spec first: data model changes, endpoints, the screens, and the tests that prove it works. Review that for five minutes, then let it build in the main session. Splitting into parallel agents only pays off when the pieces touch different files.
1
u/Responsible-Box-7053 15h ago
On a ~40k LoC repo, my rule of thumb is: parallelize reads, keep writes in one session.
Having multiple subagents write tightly coupled code usually loses time to cold-start exploration and interface mismatches. What actually sped things up for me is using parallel subagents upfront only for read-only codebase mapping (keeping grep noise out of the main window), writing the feature in one main thread, and spawning a fresh session at the end just to review the diff with clean eyes.
1
u/suspiciousyogi 14h ago
Are you using Claude mem or graphify? Do you have an agents MD?
1
u/orbital_trace 13h ago
Are you 100% vibe coding it? If you want I can look at what you are doing and offer some advice. Just dm me. I'm interested in learning where people are getting stuck.
1
u/Future_AGI 13h ago
open one of the 4-hour runs in the transcript viewer (Ctrl+O) and see where the time actually went. Long thinking, subagents re-reading the same files, and a full test suite after every edit each need a different fix.
1
u/Competitive_Boot6914 11h ago
Before changing the agent count, I'd check whether they're spending time rediscovering the same parts of the project. For one PO feature, give every session the same scope, business rules and architecture context, with links to the relevant code.
That's one of the reasons we built Reqode. Requirements, data, API and UI specs are linked to the implementation. You can give Claude Code a Change Request ID, and it can retrieve that feature's specs, mapped files and architecture rules through MCP. I'd try it on one feature and compare where the time goes.
1
u/xqianliu 9h ago
On a 40k-line repo I'd try parallelizing only the parts that can land independently. If two subagents need the same interface changed, you still have to reconcile their work afterward, and that can eat the time parallelism saves.
I give each coding task its own issue and worktree, then review the finished diff against that issue before merging. For your PO feature, I'd keep the tightly coupled steps in one task and split off only the pieces you can verify on their own.
1
u/ParsaKhaz 21m ago
id spend more of the 4 hours up front, let it interview you and write the plan before any code. one at a time is fine once the plan is solid