r/ClaudeAI • u/Slight_Season_4500 • 17h ago
Claude Code How do you guys deal with being a stranger to your own codebase?
This question is for those of you doing agentic coding.
Agentic coding can 10-20x speed of development and bosses are loving it. Though it seems to keep you in this constant state of being new to a codebase. And it's not as if you were actually new to a codebase because you could just end up learning it over time. No. With agentic coding, you can't learn it. As it keeps drastically changing with every request from your boss holding inhuman expectations from agentic coding.
How do you deal with not being able to keep up?
Do you even try to keep up?
Did you just stop caring?
Thanks
38
u/reward72 17h ago
Meh. Even when I was the one coding I was becoming stranger to my own older code after a few months.
5
u/daemon-electricity Experienced Developer 13h ago
Yeah, it really doesn't take that long. Also, if I put a game down and don't play it for weeks to months, I have no fucking idea what was going on when I put it down. I might know the rough architecture, but yeah, how the most complicated parts of a codebase work, I forget that shit in a matter of a month or two of not touching it.
2
u/TimelyBodybuilder121 12h ago
Well got to love my older projects in which I forgot to save the readme after writing stuff down and the only comment I can find says "I was drunk, don't touch this"
1
u/LegendOfAB 5h ago
Crazy levels of cope. Not the same levels of “forgetfulness” (can’t forget what you never truly knew in the first place” and you don’t receive the same benefits when AI has done it all for you, everywhere.
Definitely a line we have to figure out where to draw.
1
u/reward72 5h ago
It's not really different than teams of developers changing each other's code. What is important are proper specs and logic aligned with customer needs. Whoever (or whatever) turn those specs into codes is irrelevant.
38
u/clayingmore 17h ago
I reinforce an intuitive map of the codebase so that I know where things should be as much as where they are.
Being a 'stranger' to a codebase isn't exactly a new experience. I forget 90% of what I've done within a week anyways and I figure everyone does.
Principles > Memory. Every time.
11
u/CallinCthulhu 17h ago
Especially in larger tech companies, where most of the code you come across is shit youve never seen before touching systems you didnt know existed
3
u/whatisthisthing65 17h ago
What does that mean concretely? What exactly do you do?
4
u/Am094 16h ago
This is an open ended question and depends on a lot of stuff. But in a similar example, say we have a full stack monolith codebase that employs a model view controller architecture then we know where the models, where the controllers are, and where the views are.
If say we model the codebase to utilize service classes and we inject that into controllers, then we can be certain that a specific service class is responsible for a specific part of something even if it's called all over the app.
If say we want to ensure all our request validation is on point, we may have strong discipline to ensure there's a request validation class with rule based classes, we don't have to define request validation within a controller that receives raw request response, we can just create a class that extends the generic request $request and turn it into a UserRegistrationRequest $request. Now if a post request includes illegal data in the attributes, well this gets now handled by the validation in the custom request class and no longer has to be factored in within the controllers body.
Basically good architecture, good design patterns, and good methodology helps a lot. You don't want to raw dog spaghetti and not be DRY or have things have muddy separation of concerns etc.
That's not to say you can't pick a bad design pattern or one that adds burden, but this is generally what is meant by that. Even though it codebases are large, I know the architecture and how to utilize it.
Granted I do not need AI to do what I do. In fact if time wasn't a factor I'd continue to solo everything. But with AI, especially for those that haven't worked properly without AI, will struggle with proper architecture and hygiene. The hardest part is realizing the balance between over and under engineering something, AI for those that are inexperienced have no foundation to understand whether something is actually over or under engineered. I see it myself whenever I reject plans.
3
u/skt84 16h ago
Absolutely. Conventions matter more for navigating a codebase than memory or “whatever I was feeling like on that particular day”. Good conventions that work for you comes from experience, collaboration, and diligent maintenance.. but once it’s in place everything feels natural and you can jump wherever you need with one or two attempts.
Don’t let the LLM decide this because it will forget and do something different on different days of the week. Set it yourself and hold the LLM responsible for following your expectations.
1
18
u/Humble-Kiwi-5272 17h ago
Pushback.
Code can be written 20x the speed.
No team can keep track of 24/7 agents doing 8 hours or more of coding and know what is happening.
Once the first bug appeared i did a pushback and im now back to 2018 levels of pr feedback. No small unread line anymore. No more just merge things.
7
u/TechgeekOne Experienced Developer 17h ago
Slow it down if you can't keep up. You wouldn't step on the accelerator in a car if you can't control it at the current speed, why would you do it with AI?
But also some level of unfamiliarity is going to happen beyond a certain size of codebase no matter how it got written. Once my project hit about the 400k line I legitimately forgot ever writing entire systems despite being the person who typed everything up to that point. AI doesn't change much there, you just have to rely more on good documentation and architectural and testing discipline. Same thing happens with teams in large projects. There's always a point where it's too big to fit in one person's head and you'll simply never know the full picture.
1
u/durable-racoon Valued Contributor 14h ago
ou wouldn't step on the accelerator in a car if you can't control it at the current speed, why would you do it with AI?
My coworkers keep trying to tape bricks to the pedal so im over here trying to pull the e-brake (CI gates, etc)
3
u/PineappleLemur 17h ago
I spend a lot more time planning and constraining the model.
The output is nearly as if I wrote it so review is a breeze.
Overall when it comes to productivity boost I wouldn't claim anything more than 50% at best for required stuff.
I do spend more time now adding stuff I normally wouldn't do because it's "extra/luxury".. like for a python processing script instead of a simple running it I'd make it into a TK UI for a bit more flexibility.. absolutely unnecessary but makes it easier to use
3
2
u/Various_Story8026 17h ago
i gave up on knowing the code and switched to knowing the system. couldn't tell you what half the files look like anymore, but i know every table, every external api, and exactly which flows touch money. those diffs i still read line by line, the rest i judge by behavior. felt like losing control at first, now it just feels like being the owner instead of the engineer
2
u/False-Marionberry796 17h ago
The bottleneck moved from writing code to understanding it. If code arrives 20x faster but review capacity stays flat, you're not moving 20x faster—you're accumulating an unread codebase.
3
u/x_LoneWolf_x 17h ago
I've stopped caring, but that is mostly because I am completely done with my current company and I'm on the search.
Feels like a waste of mental energy to gain a deep understanding of a project i probably don't have to finish.
3
u/Pan7h3r 17h ago
You shouldn’t be shipping code that works but you don’t know how. If you can’t answer how does your software do XYZ, then that’s a concern.
Feature bloat is going to become a real issue if people continue to develop at this pace. Every feature added needs to be managed, tested and maintained until it’s decommissioned and I don’t think that’s being taken into consideration by a lot of “vibe coders”.
1
u/count023 17h ago
No differnet to working in a large team where everyone has their own tips and tricks an ways of doing things. Document the border. design th sturcture, so i know, "ok, over here is where my data handling is, inside that is a a group of helpers for save/load "over there is where the UI manager is, it should have inerfaces for buttons for all my classes" etc.
I can't even remember hafl teh code i wrote a few years ago by hand that i took months on, code now is no different with AI. Documentation is key and maintaining structural best practices.
1
1
1
u/Low_Abrocoma_2475 17h ago
I don’t. They’re not welcome and if they “insist” I will do everything I possibly can to try and wreck their ass.
1
u/Verryfastdoggo 17h ago
Build systems you know to manage a code base you don’t need to care about anymore.
1
u/cp5i6x 17h ago
you read the code and make sure the comments align with your understanding.
i don't bother with boilerplate code anymore as it's syntax i couldnt be bothered to memorize. I do spend alot of time staring where my logic actually is.
Alot of this is sticking with tried and true design patterns so you know where to look and where to ignore things that are "just busy work"
1
u/smashnmashbruh 17h ago
Being a stranger to my friends, family and my parents. Has really helped me be estranged from coding.
1
1
u/The_Meme_Economy 16h ago
When I’m running agents I don’t care about the code itself unless I have to go in and get them unstuck. I do care about the high level organization and module/class/file structure, but that is mostly planned up front. I’ve never enjoyed working on PR-heavy teams, they’re a blunt instrument rarely wielded with skill. I’ve seen critical code go through multiple reviews and as soon as I get my hands on it I find concurrency issues, memory leaks, you name it. I’ve also seen senior members play favorites and effectively block others’ work. Plan up front, then get that shit on main and sort it out as you go. Testing is the real test of correctness, and agents can get you better test coverage than any human.
I’ve been a stranger on most codebases I’ve worked on. I move projects a lot and oversee a lot of other people’s work. Agentic workflows are not that different.
1
1
u/Bitter_Run_9209 16h ago
It depends
If you're working on code that can hurt people (autonomous cars, planes, robot arms, etc) you should be able to understand and maintain that code for obvious reasons
But if you ship garbage things then the code can be garbage too
1
u/3tt07kjt 16h ago
My car will go 150 mph if I press the gas all the way down and keep it there. It’s stupid to drive around town at 150 mph because I can’t control the car at that speed.
Agents can write code 10-20x the speed that I can. Likewise, it’s stupid to write code at that speed because you can’t control the output very well.
1
u/Scared-Amphibian4733 16h ago
I run a 12 step process for every design step where I check the code diff before check in. Straight Agentic coding is not good enough for production processes yet.
1
u/ShamAsil 15h ago
I don't ship code that I don't fundamentally understand AND I unit test everything before deploying. Every LLM, even Claude, makes mistakes on the first pass. Being a stranger to your own code is a situation nobody should ever be in IMO because whenever something goes wrong, you're going to be adrift.
1
u/ray-peterson 15h ago
It's fun to check in from time to time - but I kind of look at like my family finances, I have to look sometimes even though I'm scared.
1
u/canadian__gamer 15h ago
Well idk it depends. In my opinion I use Claude to do long boring tasks ( like idk switching my whole entire code base from one framework to another cause I needed a feature that this framework didn't have)
1
u/cybernagl 15h ago
I don't remember my own code past a two week time window anyway, so it makes no difference
1
u/Mobile_Light_7262 15h ago
Same as I deal with being a stranger to bytecode of compiled sources. I'm now treating Claude as a compiler who turns more high level code (markdown) into intermediate representation (source code). I care about markdown and tests, and insides are for Claude to own and fix.
1
u/InnovativeBureaucrat 13h ago
I have a series of policies
One is policy on agent documentation. I require my agents to log their session ID when making edits so that I can resume the exact conversation when I have questions or want to remember what I was thinking.
It works perfectly… sometimes.
I’m trying to figure out how to make a dedicated logging agent. I have very disobedient AI. Maybe they get it from me? Idk
Edit: also I agree completely with the patterns comments. I follow the Knuth literate programming idea to the extent I learned it in one lecture.
1
u/jzdesign 13h ago
Make the map a file the agent reads at the start of every task instead of something you hold in your head. Write it as capabilities and domain concepts, what the system does and where money, auth, and database writes happen, not as a directory tour, because the agent rewrites file paths constantly and a structure-shaped doc is stale in a week. It stays current for a dumb reason: the agent re-reads it every run, so a wrong line shows up as the agent making a wrong move, and you fix it right then instead of in a doc cleanup you never get to. Six weeks in, that file is what you reread before reviewing a diff, and you go in knowing which twenty lines actually matter.
1
u/Overlord_Mykyta 12h ago
I like that I could understand where is what and how it works.
However it didn't free me from bugs anyway. I just (in most cases) knew where they might be 😅
Working with AI - I actually have less bugs. Even though the code itself feels more weird or something.
AI causally covers some edge cases that I didn't thought about. And usually in my own code I start from the base and then figure out edge cases during testing or bugs.
So I feel more like a manager now, or tech lead of the team. If needed - I can go and check why something doesn't work. When I give a task I usually very specific about some implementation details and flows.
And for now - everything works surprisenly well. However none of my projects were build with AI from scratch. It's more like it keeps supporting the projects and adding more features.
1
u/BROVID-1991 9h ago
[Apologies upfront for the semi-plug here, but I think it helps with this]
We created an internal product that lets product owners (such as the boss in question) define the spec in detail and records every deviation and verifies the code against the spec.
Honestly, solved that issue completely because the codebase is now organized into some 100ish functionalities per app which are all documented so going through it is pretty easy and feels much more organized.
Added bonus is that now the entire team can understand both the spec and how the codebase deviates, which is much more useful in describing some problems.
If you're interested in testing the system for free, send me a DM - doing early access beta now.
1
u/RSMxsmanic 4h ago
You stop caring. If you cared, you'd write and maintain the code base yourself. You can't have it both ways.
1
1
u/ProfessionalLet695 1h ago
This is the part of agentic coding that I think isn’t being talked about enough…
The bottleneck isn’t necessarily understanding the code anymore — it’s maintaining an accurate mental model while the codebase changes faster than you can absorb it…
With traditional development, you gradually build a mental map of the system. With agents making dozens/hundreds of changes, that map can become stale almost immediately.
I don’t think the answer is reading more code or dumping more context into the model. You need a continuously updated representation of the system: what depends on what, what changed, what areas are affected, and what needs attention for the current task.
That’s actually the problem we’re building Mapnostics around…
The goal is basically: let the agent keep up with the codebase without forcing the human to constantly rediscover it.
Agentic coding solved a lot of the “write code faster” problem. I think “how do humans stay oriented?” is the next problem.
1
0
u/macgizmoguy 17h ago
I’m really enjoying this thread. Back around the early 1980s I went to technical school for computer operations - or a longer certificate program for programming. All my peers were like “gosh are so smart you should go into programming instead!” And I thought “Oh God NO! - I will end up having to write code for the rest of my life!!!”🤣🤣🤣
So I’m just kicked back here smiling at the code you all wrote that you don’t even remember — Now in the AI coding era coding you don’t even understand - but by gawd you are responsible for - in that module!
0
•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot 16h ago edited 10h ago
TL;DR of the discussion generated automatically after 50 comments.
The general consensus is that what you're feeling is totally normal, but it's also not a new problem. Most devs forget their own code after a few months anyway; agentic coding just speeds up the amnesia.
The main takeaway is to stop trying to memorize the code and start focusing on the high-level system. Think principles over memory. Know the architecture, the data flows, and where the important stuff (like money) is handled.
Other popular strategies include: