Ask HN: Is anybody producing good code with coding agents?
This is a genuine problem that I hear from senior engineers. I'm looking for a solution.
--
The quality of ai-generated code is <censored> (claude, agy, copilot, codex a little better).
It's exhausting to read.
I used to love learning from my experienced colleagues and taking pride in what we made. We spent time on elegance and craftsmanship.
Now I spend nearly the whole workday slogging through convoluted code riddled with footguns. I ride on hopes and dreams I might understand a changeset.
It takes 5x longer to review Claude merge requests and I barely understand what I approve.
Each day I drift further from understanding as I shovel the same <censored> into the codebase.
The solution seems to be, reach "level 4 autonomy" and don't read or write code anymore.
--
WHO HAS SOLVED THIS PROBLEM? PLEASE HELP!
67 comments
[ 0.72 ms ] story [ 11.6 ms ] threadIt's heavily customized, replaced most internal systems via plugins, a set of custom agent instead of builtin ones, different model families for different sub tasks. (don't have claude review its own code)
I'm working on polishing them up and porting a few more from my own harness, then will be open sourcing. Keep your eye out for a "better-opencode" plugin suite, I'll be sure to share it with HN :]
In the near-term, I really like GLM 5.3 prose for code explore / review, give it a shot, it's cheaper (flash model) and catches all sorts of mistakes from the Big Ai models. We fully rolled out our custom pr-review on glm-5.3-flash last week. Most devs are still on claude, moving them towards fireworks and opencode.
OpenCode Go is a great way to try out open weight models for $10/month
For code I care about, I audit every single hunk as its produced. I give it extensive style guidelines, and crack down on things like a 20-line essay in a comment.
For mission critical code, I write the code myself and have an agent review it.
I'm still on the fence for tests: I don't really like to write them, but the LLM-generated tests are pretty bad, even the frontier models on xhigh thinking. I usually generate them, but I don't really have the confidence they test anything except 1==1. Unfortunately it's hard to justify the time spent on writing them manually.
The trick is to give it enough guidance about the style you prefer.
Slop the tools, not your main code. Make slop tools ad hoc as you need them. Or: don't ask Claude to look for a bug or fix a bug ask it to write a script to fuzz inputs.
There's no way around reading and understanding the core logic. If you can't hold it in your head it will fall apart when you try to manipulate it like you've noticed. So it helps if you designed it, rather than letting it fall out of the AI. Otherwise you're reverse-engineering a design that was mindless. It's a slog!
I'm convinced that switching from Python to Haskell with its strong typing was a good hack. Auto-generated Haskell seems to be more coherent than generated Python. But Python has type declarations too, these days.
When all else fails, rewrite it, preferably in a different language. That used to be a tall order! But this is one thing LLMs are really good at. Rewriting and re-implementing. When you have two or three implementations in parallel, and a spec, you can start to bounce them off each other and contrary to intuition it gets more solid, not less.
The problem we are trying to solve was never to write code, was to solve business problems
"I will never need to understand the code again" is a much different statement.
If you don't understand the code, and the code wasn't written by any human, when you're eventually painted into a corner, how hard is it going to be to get out? Will it be easier or harder than maintaining an understanding through however long it takes to get to that point?
You may be betting your company on the answer. How sure are you?
People come and go, documentation isn't great.
It's no different.
If I need to understand complex codebase with thousands of humans touching nowadays I am asking AI anyways
You can look at people who are building on the public like this, for example, DHH with https://omarchy.org/ https://www.youtube.com/watch?v=NYFGCESmikA
I work in private software that I cannot share, but it's for a company you have heard of
- Write good specs into files, usually Markdown.
- Go through the spec files with the agents, have it point out holes and problems, and then update the specs. Go through a few iterations of this and then start your agents on development.
Garbage in, garbage out.
When I'm building something new there's a good chance I don't know about a lot of problems (unknown unknowns). How do you overcome this with just spec files?
I keep coming back to this and the only way to develop properly without tons of hacks patching bugs afterwards is by working at a low level. I don't really write code but I work at the code level still and have Claude write each function and whatnot.
For business settings, yeah I dunno, a ton of rewriting all the time is not seen as a good look.
It's always good to have another agent (sans existing context) review the project for slop and hacks, best practices, security flaws, etc. I usually have Codex do one, and Claude do the other. Hope this makes sense.
Specs that gets systematically ignored way too often XD
I have found the right harness helps, if you have a setup that gives you memory, specs and a graph-based understanding (that part is key) you can be very productive. For me, that's because being able to understand the big picture helps, the challenge of reading the code is always there but starting with 'this method/class/etc does X, so that means this is doing Y..." makes it easier and lets you come in warmer.
the problem solving hasn’t changed, but the hands, or “hands”, are.
suspect some of what’s causing churn for some folks is they are getting to do the job they wanted without the title change and recognition, as well as with different approaches for doing the work.
it’s almost a return to the systems analyst era.
Optimize the PR flow first.
We do not have this problem; we heavily use the models from OpenAI and Anthropic, but we have a custom harness built for ultimate cache efficiency and a purpose tuned workflow.
Codex is GREAT but it keeps updating and its UI changes often (remember mini git sidebar ui?)
Our Custom Harness does multiple things, like having a "Skill Selector," which uses our Gambler v1 (26B decision model responds in <100ms locally) and overlays tools on top of existing ones (as the models are RLVL over the specific tool in their harness, we overlay those tools with a familiar interface or format and inject custom features we want the model to interpret). Other than this, it leverages local models to accelerate development. Also, instead of providing custom tools, we actually use the same tools that their original model-provided harness uses. We've a list of 100s of such optimizations; these are just a few from the top of my head.
I have been working on harnesses for a very long time; I read research papers and implement them.
The apps use Flutter and Rust for all of our apps; no ads, no subscriptions.
So, macrocodex is basically a neural network product which "predicts" maintenance calories at a very high accuracy, https://macrocodex.app/
MacroCodex beats everything in its category and it does it for free, no ads, no subscriptions.
Symbiote and CalorieCodex will soon follow the suite.
If it fails, people get fat instead of losing weight, or get skinny instead of gaining weight.
Recently, we launched CalorieCodex (a calorie tracking app with an optional Full Agent Harness, where an agent tracks calories for you) and Symbiote (a programmable workout app; think BoostCamp, but user-programmable so it can run any bodybuilding program).
You can find some screenshots here: https://macrocodex.app/guides/peak-week/
Short claude.md file, skills for various things like db schema, etc
For larger or complex features do a design session with claude, review design and make suggestions and collaborate, once design is dialed in ask to break in to tasks then do similar session collaboarating on plan.md files for each task/phase then have claude build it.
Claude is really really good at adding tests, leverage this for near 100% test coverage and it can also test that it's meeting the PRD/spec.
It's also creative and seems to like collaborating on the design and plan parts join in with that. Claude feels really similar to my favorite engineer I worked with as far as collaboration and even banter. It's nice.
Using claude code in the terminal btw, md files go in repo so all team, devs, consoles can see context across front and backend.
Use PRs run claude code review, I created a Minority Report style review skill as well, code quality, security, performance with anderton as the judge/orch
Then we have a human review PR as well
This process we are getting good code and faster velocity for sure, vs traditional SDLC for solo and with team
As far as reading the code, I think that will become less and less as long as it passes automated code review, it's performant, meets the spec and tests pass . . . SHIP IT
Watch DHH's recent RailsConf keynote, this is where we're heading, buckle up