This writeup legit coincidentally matches the asking-agents-to-make-code-faster-but-with-constraints-to-stop-agents-from-breaking-things writeup I posted on Monday: https://news.ycombinator.com/item?id=49803085
Front-end UI optimization is slightly trickier than optimizing strict algorithms, but I found that prompts to the agents to build tooling to track visual regressions are more than sufficient. The main issue (at least with GPT models) is that you have to be very explicit about the use of padding/margins/negative space.
I was building web apps like this until 2017 when I entered the React world. For B2B you can get pretty far, rendering HTML on the server is fast! I was using Rails on the backend, so templates, partials, shared chunks, made it easy to manage and have a consistent UI without repeating too much.
The hard part is when you then need to build an infinite scrollable table, that has bulk select, and in-placs updating of columns. Ok maybe that's a bit too extreme the other way, but when you get to that point you basically have to use a frontend JavaScript framework for your entire UI. And they are basically all or nothing.
Last time I checked (a few years ago; I gave up and accepted un-optimized frontends as the rule) there wasn't really a good way to do progressive ehancement like the above: most of the page rendered on the server as HTML, and some components fully frontend rendered. And no, frameworks like Stimulus and HTMX don't really solve it for me, I want something declarative.
I'm a bit pissed off with DHH, that he went so far in the anti-Javascript direction, as IMO that was one of the big factors in Rails loosing it's limelight status.
tl;dr if you make absolute dogshit software that takes 4.38 seconds to stabilize its first paint you can make really nice headline claims by "optimizing" it later
Unironically true, can someone question, what is Claude desktop app doing that needs 500k+ lines of code?
Agents complicate something that should be much smaller and simpler and then agents speed it up adding more complexity. I suppose functionally you may say this is fine but aesthetically it is hideous!
TempleOS had kernel, compiler, 2D and 3D graphics drivers + libs, and tons of games and applications and the entire thing weighed in at less than 100kloc.
AI coding agents of today bloat things up [egregiously] for sure.
Most line-of-business software has a lot of optimization opportunities. Making software optimized takes up time that can be spent building features. The fact that you can just make things go fast without having to take time away from feature building is actually pretty awesome.
I had it try to prepare a code review for me and not only did it refuse, it refused to even tell me what the prompt (written by another Claude!) was! Why? Because the prompt had the word "reasoning" in it, and Claude decided I was trying to hack it to figure out how it reasons!
(All of the "stupider" models have no such issue.)
A model like that should never have gotten out of QA, let alone been released.
I understand the frustration but shows a lack of critical thinking. Esp when you start with 'How about ..'.
This blogpost is about frontend performance. It'll be akin to you commenting on a swift blogpost saying 'How about Airpods noise cancellation'. Sure both are Apple, but they are wildly different teams.
In such a forum, it seems to me like it's fair game to point out that the company patting itself on the back about how great they are at programming (as evidenced in the article above about their 3x speed improvement) ...
... can't even make their latest model handle basic English without refusing to work.
Not that I’m defending Anthropic but OP is right, you’re complaining about the taste of a pear on a blog post about roses with the excuse that you’re in a biology forum. Sure, they both come from the same family, and sure, they both fall under the purview of biology, but they’re not the same.
I struggle to understand this argument. It is very likely that the user who is complaining about Opus 5.5 would be unable to do the very tasks anthropic is mentioning in their blog post, because of the refusals.
In a blog post about Claude, i find it strange you get upset when people talk about Claude
I’ve had the same thing occur five or six times over the past week; they seem to be attempting to prevent anything resembling chain of thought extraction.
Every single time it triggered, it was due to a prompt written by their own model in a dynamic workflow. The self-serving nanny oversight has to go.
The fact that they label model distillation as an “attack” is genuinely hilarious after they “distilled“ their models from all of our work, and continue to do so.
I believe AI is here to stay and an incredibly powerful tool, but these companies, and especially Dario and Altman, are the very last people I want to see in charge of it.
They distilled all digitized human knowledge and artifacts and they're now complaining about someone copying their outputs saying it's a "national security concern."
I'm not sure about how to classify that. Hilarious? Pathetic? Sad? Hypocritical? Hyperdramatic? All of the above?
Probably it thinks you're doing some sort of system prompt exfiltration/distillation attack. Also what even is the workflow you're trying to have it do? It's doing code review but you're having it read some other AI models prompt/session history? Are you doing code review or like session history retrospectives?
This happened at the classifier level, there was no "Claude thought X about it (hallucinating or otherwise)": this was a glorified regex deciding Claude couldn't work on a prompt (a code review prep) because it contained a string ("reasoning") it didn't like.
It's more or less the same mistake we've seen Anthropic make repeatedly with it's brain-dead regex-based Fable/Mythos gates.
This issue is mentioned on the Opus 5.5 post [1] from Anthropic (no idea if it has been added after your rant):
> Don’t ask it to show its reasoning in the reply
>
> What to do. Remove requests to reproduce its internal reasoning in the reply from your prompts and instructions.
>
> Why it matters on Opus 5.5. A request to reproduce its internal reasoning in the reply can be declined. It’s one of the flag categories.
>
> How. Ask Claude for what you need instead, for example, “Explain why you chose this approach in three sentences.”
AI companies are seeing the endgame, more and more tasks can be done just fine by cheaper model, and there will be not enough money to be made to support model that is only needed for top 1% of the tasks.
And the goal is to slow competition down enough before IPO
If only we had some sort of artificial intelligence-like system that could decide not only based on the word but also surrounding context, and maybe even in cases when that word is not specifically used.
Nope. There's some truth in the contents of this article that anyone can read for themselves that any verifiable task that can be measured, Claude can optimize. Unironically, rewrites become more approachable and cheaper with a rewarding speed up if you know what you're doing; but not done all at once.
So there's no need to get upset about that simple joke like the last time, and also complaining about comments being "Reddit-esque" which that breaks the HN guidelines [0].
Lastly, you forgot to tell off another user who made the same joke today. [1]
My user experience was significantly worsened just by their referring to "user journeys". I mean, I definitely don't want to go on a journey with Claude or ChatGPT (admittedly my go-to). I want result quickly and be done.
60+ yo Brazilian here and I have never, in my entire life, heard this saying before. Sounds something a Brazuca would come up with after the 17th round of Kaiser though. Pretty on brand.
Also described as a traditional Yiddish folktale (a rabbi suggests responding to stress by moving a series of animals into the home, and then at the end they're removed and everything seems great by comparison!).
It doesn't seem like a big deal at all on the surface, but I do start wondering why someone who presumably knows how these models work would engage like that
I'm pretty nonchalant with coworkers to begin with, when it comes to LLMs i sometimes am curious how well it can handle slang, and other times, since it's a program, am extremely rude. Their whole purpose is to handle natural language after all.
Okay, now fix the WYSIWYG markdown parsing in the chat input!
Paste in a stack trace, then try to put it in a code block. Add a newline above, then add the opening triple backticks, then arrow down and add closing triple backticks at the bottom. Opposite congrats -- you have ended up with raw triple backticks at the top, plain text stack trace, and your cursor in a brand new code block at the bottom starting where you tried to close.
Realize you want to go put code span backticks around some identifiers you wrote out earlier? Best make sure to insert them in the blessed left-to-right order, or else opposite congrats again -- you'll end up with a mix of raw backticks and code span treatment for the text between your identifiers.
If Claude can discover novel CRISPR enzymes, surely it can make a rich text markdown editor, no?
Claude Cowork still can't persistently reference a local dir, broken ever since they moved to their cloud project system, breaking many non-technical people's workflows.
Less a post about performance and more about their Claude tag product. I guess it makes sense that there's not actually a ton of technical detail being moved into given probably opus is the only one that knows what all the dragons were lol - but cool workflow I guess
The way Claude did it is fight entropy with entropy.
"Add a static composer into the HTML" <- This seems like something can be done with SSR?
"For faster navigations, we kept the composer mounted between conversations" <- Your SPA should cache this between pages, why fetching it every time?
"cheap first-character check before the regex" <- Should we cache compiled Regex instead?
I think even 1.3 sec to load the front page is unacceptable. Something need to be reworked from basics (SSR, chunk-based rendering) to solve the problem. Focusing on invidual benchmarks may miss the opportunity.
The amount of complexity added for the gains is depressing. I am confident a human and about 5 minutes with chrome debugger would yield better results with a fraction of the complexity at a fraction if the cost and in a fraction of the claude baby sitting time.
Reading this shows the authors have a profound lack of fundamental understanding on how to effectively optimize in the web domain.
This isnt claude being bad but how wild it is watch people from the cutting edge of ai brag about pretty mediocre gains.
When people talk about AI being able to handle everything I keep wondering, have these people built anything complex, novel or serious? Just because people can see a website or a simple app improved, does that mean that all code can be handled by LLMs? It's like people are totally forgetting a whole category of careful, well-thought out programming for the critical parts.
Yes, what you are seeing are amateur developers that barely understand the tools they are using either giving LLMs poor instructions, or totally taking whatever it says at face value, then not bothering to put in further effort.
If they just kept prompting it, or maybe used a different thinking level, it could have identified and solved this problem. Sometimes an engineer would look at a system and say "the current approach isn't delivering the desired engineering requirements. Maybe we need to rethink".
Either engineer or LLM could take that sentence and run with it. OP of the article clearly can't do either.
You're missing the point where: in complex systems, sometimes optimizing code is both a high effort undertaking, and can totally not pay off. Having done hundreds of such exercises on our software over the years, it's liberating to have an idea of how to make something faster, being able to validate it without the fear of having to throw it all in the trash if it fails after days of work. What is still important is being able to provide proper guidance - we even built new tools to allow an AI agent to analyze memory usage in more depth, and instructions on how to benchmark in cloud environments where shared CPU usage and VM reallocation happen all the time and confuses the AI all the time with measurements
> the current approach isn't delivering the desired engineering requirements. Maybe we need to rethink
I'm reminded of the times I've tried to let Claude fix some well-documented bug in the background, and it ends up burning 4 million tokens and 20 self-review cycles re-writing the same set of code a dozen times with ever more complex unit test mocks / overcomplicated regexes / giant comments restating the same thing the code does, when the actual fix turned out to be "change three to ten lines to do something in a slightly different way that avoids the problem entirely".
> I am confident a human and about 5 minutes with chrome debugger would yield better results
It really depends which human. I've worked with very few engineers who were good at this sort of optimisation work. A depressingly large percentage of people who make websites for a living don't really understand how http requests are really processed, or how to read and use the chrome profiler and benchmarking tools.
Claude isn't as good at optimisation work as someone who really knows what they're doing and goes deep on a problem. But I'm optimistic that it will help plug a capability gap in teams which don't have this sort of expertise on hand.
(That said, the chance that people actually learn this stuff is going to also go down if people get used to outsourcing this work to claude.)
>The amount of complexity added for the gains is depressing.
This has kinda been my experience too. I find sometimes it works and gets OK optimizations, and sometimes it "optimizes" things but in a really wrong way. It doesn't apply 'taste' to the optimization process to know what's appropriate and what's not.
The way this will play out is people without the expertise will wind up using it to 'optimize' things and the next poor bastard is left to deal with the fallout.
I’ve found the best workflow has been to ask Claude to profile everything and identify the problem spots, then I have to be the one to propose the correct architecture, then Claude implements it.
If I let Claude run wild it will invent all kinds of weird, weird hacks that compound the complexity.
Even Next.js, for all that people are unhappy about its quirks, complexity, and random undocumented behavior and bugs, can do all of this SPA stuff out of the box. Use `<Suspense>` appropriately on data loading, and everything static (including e.g. purely input-output components like editors) will load once and be re-used forever, and your Suspense-wrapped items will show a loading placeholder and only re-load when you intentionally re-trigger the data loading.
It's impressive to see performance optimizations of this scale shipped so quickly. Often, single-page app bloat and re-fetching states on navigation become major bottlenecks as products scale. Reducing these overheads makes a massive difference in perceived user experience.
The most important question is how much more unreadable the code became after all this "ratcheting the benchmark down". If you unroll a loop it will perform faster, but making changes to such unrolled code will be a mess. Will this make them ship slower overall? I'm sure at least half of it was just poorly written React code, but the other half?
It's the same problem as overfitting in model training. If you're not measuring something it will get sacrificed.
Or, perhaps the code quality literally doesn't matter anymore and we've reached "code quality escape velocity" where you can code as much slop as you want, the next generation of models will clean it up faster than the slop generates?
Came here to post this. AI rationalists love thinking about paperclip maximizers, but don't seem to care when it turns their own codebase into paperclips. Or to rephrase, turns their whole engineering org into meat proxies, slowing down engineering productivity in the long term because understanding is drained out of the staff and flushed down the drain every time they close a Claude Code tab.
Since I didn’t love the technical approach here (once one takes the humans out of the loop, there’s more ambitious things that can be done), I do appreciate the process. It’s not until the last sentence when process inspiration is revealed:
“Special thanks to Boris Cherny for encouraging us to be more ambitious.”
142 comments
[ 0.20 ms ] story [ 31.7 ms ] threadFront-end UI optimization is slightly trickier than optimizing strict algorithms, but I found that prompts to the agents to build tooling to track visual regressions are more than sufficient. The main issue (at least with GPT models) is that you have to be very explicit about the use of padding/margins/negative space.
I was building web apps like this until 2017 when I entered the React world. For B2B you can get pretty far, rendering HTML on the server is fast! I was using Rails on the backend, so templates, partials, shared chunks, made it easy to manage and have a consistent UI without repeating too much.
The hard part is when you then need to build an infinite scrollable table, that has bulk select, and in-placs updating of columns. Ok maybe that's a bit too extreme the other way, but when you get to that point you basically have to use a frontend JavaScript framework for your entire UI. And they are basically all or nothing.
Last time I checked (a few years ago; I gave up and accepted un-optimized frontends as the rule) there wasn't really a good way to do progressive ehancement like the above: most of the page rendered on the server as HTML, and some components fully frontend rendered. And no, frameworks like Stimulus and HTMX don't really solve it for me, I want something declarative.
I'm a bit pissed off with DHH, that he went so far in the anti-Javascript direction, as IMO that was one of the big factors in Rails loosing it's limelight status.
Agents complicate something that should be much smaller and simpler and then agents speed it up adding more complexity. I suppose functionally you may say this is fine but aesthetically it is hideous!
AI coding agents of today bloat things up [egregiously] for sure.
I had it try to prepare a code review for me and not only did it refuse, it refused to even tell me what the prompt (written by another Claude!) was! Why? Because the prompt had the word "reasoning" in it, and Claude decided I was trying to hack it to figure out how it reasons!
(All of the "stupider" models have no such issue.)
A model like that should never have gotten out of QA, let alone been released.
This blogpost is about frontend performance. It'll be akin to you commenting on a swift blogpost saying 'How about Airpods noise cancellation'. Sure both are Apple, but they are wildly different teams.
In such a forum, it seems to me like it's fair game to point out that the company patting itself on the back about how great they are at programming (as evidenced in the article above about their 3x speed improvement) ...
... can't even make their latest model handle basic English without refusing to work.
In a blog post about Claude, i find it strange you get upset when people talk about Claude
Every single time it triggered, it was due to a prompt written by their own model in a dynamic workflow. The self-serving nanny oversight has to go.
The fact that they label model distillation as an “attack” is genuinely hilarious after they “distilled“ their models from all of our work, and continue to do so.
I believe AI is here to stay and an incredibly powerful tool, but these companies, and especially Dario and Altman, are the very last people I want to see in charge of it.
They distilled all digitized human knowledge and artifacts and they're now complaining about someone copying their outputs saying it's a "national security concern."
I'm not sure about how to classify that. Hilarious? Pathetic? Sad? Hypocritical? Hyperdramatic? All of the above?
Did it explain it did it hallucinate?
It's more or less the same mistake we've seen Anthropic make repeatedly with it's brain-dead regex-based Fable/Mythos gates.
How do you know? How would the stupider model know?
And the goal is to slow competition down enough before IPO
Claude rewrite Claude Code from TypeScript into Rust. Make absolutely no mistakes.
So there's no need to get upset about that simple joke like the last time, and also complaining about comments being "Reddit-esque" which that breaks the HN guidelines [0].
Lastly, you forgot to tell off another user who made the same joke today. [1]
[0] https://news.ycombinator.com/newsguidelines.html
[1] https://news.ycombinator.com/item?id=49820670
I also am not "complaining that a comment is Reddit-esque", just giving an explanation to the user why your comment may have been downvoted.
If you said "at this point it would make more sense to rewrite Claude Code in Rust" that would be perfectly reasonable.
Step 2 - bring it down to 1 second and pat yourself on the back.
Why can't they fix that
It doesn't seem like a big deal at all on the surface, but I do start wondering why someone who presumably knows how these models work would engage like that
If anything I'm glad to see them having fun with it instead of further convincing themselves that it's God.
Paste in a stack trace, then try to put it in a code block. Add a newline above, then add the opening triple backticks, then arrow down and add closing triple backticks at the bottom. Opposite congrats -- you have ended up with raw triple backticks at the top, plain text stack trace, and your cursor in a brand new code block at the bottom starting where you tried to close.
Realize you want to go put code span backticks around some identifiers you wrote out earlier? Best make sure to insert them in the blessed left-to-right order, or else opposite congrats again -- you'll end up with a mix of raw backticks and code span treatment for the text between your identifiers.
If Claude can discover novel CRISPR enzymes, surely it can make a rich text markdown editor, no?
Claude Cowork still can't persistently reference a local dir, broken ever since they moved to their cloud project system, breaking many non-technical people's workflows.
> Claude: On it... Done.
> $500k: Can you make it faster still?
> Claude: On it...
https://www.youtube.com/watch?v=r8miwsWtzRw
"Add a static composer into the HTML" <- This seems like something can be done with SSR?
"For faster navigations, we kept the composer mounted between conversations" <- Your SPA should cache this between pages, why fetching it every time?
"cheap first-character check before the regex" <- Should we cache compiled Regex instead?
I think even 1.3 sec to load the front page is unacceptable. Something need to be reworked from basics (SSR, chunk-based rendering) to solve the problem. Focusing on invidual benchmarks may miss the opportunity.
Reading this shows the authors have a profound lack of fundamental understanding on how to effectively optimize in the web domain.
This isnt claude being bad but how wild it is watch people from the cutting edge of ai brag about pretty mediocre gains.
If they just kept prompting it, or maybe used a different thinking level, it could have identified and solved this problem. Sometimes an engineer would look at a system and say "the current approach isn't delivering the desired engineering requirements. Maybe we need to rethink".
Either engineer or LLM could take that sentence and run with it. OP of the article clearly can't do either.
I'm reminded of the times I've tried to let Claude fix some well-documented bug in the background, and it ends up burning 4 million tokens and 20 self-review cycles re-writing the same set of code a dozen times with ever more complex unit test mocks / overcomplicated regexes / giant comments restating the same thing the code does, when the actual fix turned out to be "change three to ten lines to do something in a slightly different way that avoids the problem entirely".
It really depends which human. I've worked with very few engineers who were good at this sort of optimisation work. A depressingly large percentage of people who make websites for a living don't really understand how http requests are really processed, or how to read and use the chrome profiler and benchmarking tools.
Claude isn't as good at optimisation work as someone who really knows what they're doing and goes deep on a problem. But I'm optimistic that it will help plug a capability gap in teams which don't have this sort of expertise on hand.
(That said, the chance that people actually learn this stuff is going to also go down if people get used to outsourcing this work to claude.)
This has kinda been my experience too. I find sometimes it works and gets OK optimizations, and sometimes it "optimizes" things but in a really wrong way. It doesn't apply 'taste' to the optimization process to know what's appropriate and what's not.
The way this will play out is people without the expertise will wind up using it to 'optimize' things and the next poor bastard is left to deal with the fallout.
It's the same problem as overfitting in model training. If you're not measuring something it will get sacrificed.
Or, perhaps the code quality literally doesn't matter anymore and we've reached "code quality escape velocity" where you can code as much slop as you want, the next generation of models will clean it up faster than the slop generates?