Live data from Hacker News

How Claude Code works in large codebases

claude.com

101–110 of 191 posts

Re: How Claude Code works in large codebases

#101

Earlier quoted context omitted.

Yeah I'm working on one of those now that a 3rd-party vendor cranked out for us. I spent all day ripping out an endpoint that did 98% of what another endpoint did and should never have existed. I also ripped out 80 lines of code that looked like this: const sqlStatement = (!params.mostRecentOnly) ? {giant SQL statement} : {identical giant SQL statement + 'LIMIT 1' at the end} AI never met a problem that can't be solv…

That is a skill issue though. I have rules for my agents to write compositional, reusable, modular, small files and to avoid any sort of boilerplate etc. Being config driven, single source of truth, having other agents review that rules are followed, etc. Any API or UI or any sort of entry points very light, just proxying to the modular logic basically, so this logic could be reused by any entrypoint easily. UI compo…

Ah, the make_no_mistakes.md

Re: How Claude Code works in large codebases

#102
post #80

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 you realise that something in the file you're thinking about is relevant to what I'm working on or might change the direction of what I'm doing.

Re: How Claude Code works in large codebases

#103

Earlier quoted context omitted.

Yeah I'm working on one of those now that a 3rd-party vendor cranked out for us. I spent all day ripping out an endpoint that did 98% of what another endpoint did and should never have existed. I also ripped out 80 lines of code that looked like this: const sqlStatement = (!params.mostRecentOnly) ? {giant SQL statement} : {identical giant SQL statement + 'LIMIT 1' at the end} AI never met a problem that can't be solv…

That is a skill issue though. I have rules for my agents to write compositional, reusable, modular, small files and to avoid any sort of boilerplate etc. Being config driven, single source of truth, having other agents review that rules are followed, etc. Any API or UI or any sort of entry points very light, just proxying to the modular logic basically, so this logic could be reused by any entrypoint easily. UI compo…

Can you share your rules and some of the example PRs that it auto generates and reviews?

The number of times I’ve seen Claude say “this test was failing already so is ignored” when it _wasnt_ despite me telling it to never do that makes me doubt.

Re: How Claude Code works in large codebases

#105
post #82
post #79

Why can't Claude Code generate effective harness for us by inspecting the code base? I tried defining CLAUDE.md (or AGENTS.md), skills, plugins, but I'm not getting the effectiveness others claim to be. LSP plugin for example, CC doesn't to use LSP's symbol renaming and edits file one by one slowly, or it does not invoke the skill when I explicitly ask to remember to invoke when prompt contains a specific clue. Am I…

This is the pain point that existed for years now and its still not solved at all. "If A, do X. Do B,C,D. Do A" - and it just never uses X because "it forgot". You just cant trust that the time you spend building rules will actually pay off, in fact you can trust that it will fail you sooner or later. RAG, Harness, Skills... all was supposed to fix this, but in reality it never had.

Harnesses do fix it IMO - it’s why Claude code and Codex had a massive jump in alleged productivity on release and then seems to have flatlined. But a custom harness _would_ allow you to do things like “on every message, run lint validation and tests”. That in and of itself would be wildly useful.

Re: How Claude Code works in large codebases

#108

Earlier quoted context omitted.

If your codebase can’t fit on a single developer dev machine it’s too big.

You mean like Teslas multi terabyte repo is not normal?

It couldn’t be broken in to domain specific components?

Listen, I am a rails developer, so a monolith doesn’t scare me, and yet, there are limits. Why does it need to be a multi terabyte monolith?

Re: How Claude Code works in large codebases

#109
post #54

Earlier quoted context omitted.

I have only worked in startups and I have been an early engineer in both of them. I would always get high privileges within a short time where I would have the access to create and delete resources. I don't think it's that uncommon.

I would never have these privileges granted directly to my account. Indeed it’s a good practice to use roles where supported (AWS has them) and explicitly switch when needed

The problem with agents is they regularly sidestep the guardrails and do what they want with a script anyway. The number of times I’ve seen Claude try to escape the folder it’s working in, and then for it to write a python script that does exactly what I told it it’s not allowed do supports that.

If you use SSO and have an AWS config that Claude is allowed to see to get the correct role in the first place, it will just pick the role and plough on anyway.

Re: How Claude Code works in large codebases

#110
post #45

Earlier quoted context omitted.

I have personally seen AI bypass this multiple times.

We kinda need to architect things with the assumption that all token-output from an LLM can be unpredictably sneaky and malicious. Alas, humans suck at constant vigilance, we're built to avoid it whenever possible, so a "reverse centaur" future of "do what the AI says but only if you see it's good" is going to suck.

I built my own IDE to replace vscode / cursor so I could design the harness and ensure that the model tool access was secure and limited. But the rest of the industry is YOLO
Post reply on HN