Every time I see claude say "the pyhton script failed" while its working I'm like "python??? I asked you to write an md file of the changes you made wtf do you need python for?!"
Because it tries to avoid ingesting and spitting out too many tokens, so it uses scripts to modify or read only what's needed. Remember that if Claude directly writes a 1MB text file, that's considered all output tokens. If it makes as script that injects text at the right place is much less
It's because a python script is determistic. Ask an AI to rename 400 occurrences in a repo using only inference will only work 99,9% of the time. Writing a python script that renames it and verifies it will work 100% of the time, with a lot less tokens wasted.
Because it is the most efficient use of resources: a local script rather than more roundtrips. If you don't want it you can add a guardrail to not use local scripts.
This has been my mindset as well. I'm doing some projects I know I would not be able to do if I didn't have a overachiever task-fetishistic intern working for less than minimum wage because of subsidies. I'm avoiding projects that rely on big models at all costs to run and any LLM related project I implement needs strictly to run in my low vram laptop.
Pop the bubble! ( But wait a bit for me to push a couple things first)
Nope. My employer does and gives me a very generous daily quota. As long as I'm not hitting my quota, I don't care about token usage. My employer has given me zero reason to care, as they've made it clear that velocity is the most important thing to them. And since I'm multi tasking, I don't care much how fast the AI is. Much more important that it's correct and sensible. There's no time alloted to optimize token usage unnecessarily.
Why do you figure? I'm doing exactly what they want me to do. My management chain has made it very clear that they want velocity and are willing to pay for it. They've been very encouraging of increased AI adoption and experimenting with new ways to use it.
More than that, I'm an extremely productive programmer, too. If they were to clamp down on quotas or straight up remove most AI, I'll be more than happy to go back to "trad coding". I'm the kinda person that people come to when AI can't figure things out, so I'll be perfectly fine without AI. Everyone's just burning tokens, but not everyone has the skill to go back to the old ways.
And if leadership decides that this is a problem and we gotta optimize this, awesome, I love optimizing things (admittedly, tokens are the thing I find least appealing to optimize). I'm happy to have the job security of more work to be done lol. But that's just not what they're saying right now.
While I consider the term 'expert' to be a pretty big stretch here, I generally agree. It's exactly what I'm seeing at work, too. More than half of my team is now routinely submitting PRs containing code they, by their own admission, do not understand. "I had a problem and this is how AI fixed it".
Just as they started talking about more people should pay for tokens, Google just plasters its Search AI onto every search by default. It's really fucking with me.
I can't figure out whether it was just a panicky last-minute decision for Google to jump onto the AI POWERED train in fear of missing out or if they thought it would somehow look better on paper if every google search now meant their AI was being used.
Is it Claude’s fault people don’t properly setup their Claud.md file? You can literally avoid a bunch of these issues. lol
I pay $19 a month and it’s enough for my personal projects. Unlimited tokens up to high effort with great models during a 5 hour window which is good.
Configured my file to ask me for permission before running UI tests where it controls the simulator to test the changes it made, and much more. Literally update the file with code standards, rules, etc. and you’ll be good most of the time.
Yeah, it’s what I did with mine. I said it should always strive to follow SOLID and Clean Code guidelines and ask me before doing any high effort/high cost task.
Also told it to not fill my C drive lol otherwise it’s be full of crap and my Windows installation would suffer.
I had to be VERY explicit. Do this replacement in this codebase exactly like I am describing. Then I had to add: assume the codebase works like this, assume I am right, don't investigate, don't find more data.
Couldn't. The problem was, I had my focus divided amongst various projects, so the faster I can kick off something the faster I can go back to other tasks.
Which, you know. Is unhealthy as shit, but we're being pressured by multiple fronts to do the impossible.
My Claude.md contains an index of subfolders with several dozen other MD files covering most of the things I work on. It's taken a lot of time to build up, but amazing when I can now start a chat with a short statement about a task and it knows exactly what to do.
There are so many situations like that where I just write the code myself instead of hoping the LLM understands what I want and doesn't do anything extra
Told mine to be as short with the response as it could, max 5 sentences per response. If I need more info, then I ask.
Still: "yeah sure, I keep it short.... (2 paragraphs of unnecessary yapping about why it keeps the response short).... and therefore I end my TedTalk and am open for further discussion of this topic, as you requested."
My experience is that AI suffers horribly from the "Pink elephant" problem. The more you mention _not_ doing something, the more it's going to do that thing.
Yep, prob cheaper thinking tokens, but basically you cannot fight internal "thinking" backed into weights with commands do/do not, but you can guide it.
As another user said, if you make it clear that you in architecture stage, full implementation is unlikely to be generated, unless needed.
Really ? That's weird because in its reasoning it's taking into account the whole prompt, so if it "understands" you don't want code I have a hard time believing its reasoning would still lead him to generate code. Did you actually observe the behavior you're describing on a model or platform that allows to read the reasoning of the AI ?
I recall talks about the LLMs prioritizing the last thing you talked about in your prompt.
So if your prompt is: "Take a look at this code. See if there are any spelling errors. My editor doesn't highlight anything. I'm starting to suspect a dependency might be missing."
It'll hyper-fixate and come back to the "missing dependency" part throughout the session. But don't take my word for it. It's just something that stuck with me.
Give me actions for me at the bottom in a short list.
Then I mostly ignore what's in the middle.
Also, I have a standing order to not DO anything until I say so. I often want to bounce ideas back and forth, and discuss things before we pull the trigger. So if I just wanted a variable renamed, it would be very clear before it started working.
—model Claude-sonnet-5-5 —effort low tends to be useful when doing little nitpicky style choices like that. Don’t go refactoring things or changing logic, but just picking names and wording comments, put Claude in “fuck it” mode.
Also, making something too dumb can also cause problems. For example, Kiro recently interpreted "Commit these changes onto a new branch branched off from the hotfix / minor release branch" as "Make a new branch that points to the hotfix branch as its remote", not "Pull the latest hotfix branch, make a new local branch off it, and commit the changes"
Actually, that reminds me of a cool programming story. I actually got to force push to master last year. Basically, we have a custom extension of JmesPath that adds things like arithmetic operators, so instead of just importing the burtcorp implementation and adding a shit ton custom functions, we actually forked it. But instead of properly forking it, we actually just made a new repo. So I got special permission to have the protection against force pushing to master turned off for a moment, so that I could rewrite the commit history to match the repo we forked from
If you weren't autogenerating code before AI, what were you even doing?
LLM can generate much more complex code, but a lot of what I was doing before AI was pretty automated anyway. CRUD is a huge amount of code for a lot of applications.
Legit had to replace a module in a vibe coded project that was basically handwritten API calls to a backend that already provided an OpenAPI spec. This is not a joke. And it still took a lot of convincing to switch to auto-generated clients.
To be fair, a “good” name would take into account what it is doing in the program and how it’s used… and that requires context… if asked to rename something I would at least look at what it is doing already and how it’s used…
So at the beginning it’s not that far off from what I’d expect someone to do initially.
Yeah, when coaching a junior, the first step i would recommend in this situation would be exactly that: look at the rest of the codebase and how it names things. Try to pick up on common wording, formatting and abbreviations.
You’re not wrong if there had been a better prompt, but assuming the prompt is what was given, I can understand the agent looking for more context though.
Yeah, looking at the exact file to see if it’s something isolated within a function or depends on code elsewhere in the application would probably be a good start, rather than jumping straight into a full code review. But the bad prompt is honestly the bigger fault here. The user could likely have provided the needed context in a sentence or two and been fine.
Local function variable would not need it. If it’s a variable that gets inherited, or used across the program as a whole, then how it’s used is important for a good name.
Watching Claude jump around my filesystem at my job is almost hilarious. Like my dude I asked you to update this specific file not root around a completely different unrelated project.
I once named a package ChargebackAgenticReasoningSkills. Then the next guy comes up with a ChargebackAgenticReasoningLiabilityAgentService and ChargebackAgenticReasoningRepresentmentAgentService.
Did I do it right? Because I hate myself everytime I have to type that word vomit.
No, find and replace can misidentify, for example in comments.
Mature IDEs have a "rename symbol" though, usually F3, which actually parses the code and differentiates types from functions from variables per the language rules.
Ye, but seriously who cares anymore. If you use ai anyway it doesn't matter. Just call it what you think it does with how many words you like with a case style of your choice.
...AND THEN RENAME 8 DIFFERENT CLASSES THAT HAS NOTHING TO DO WITH THE VARIABLE YOU ASKED ME TO CHANGE.
I'VE ALSO ADDED THIS YELLOW BUTTON IN THE MIDDLE OF THE CHECKOUT SCREEN THAT READS "DICKBUTT" BECAUSE THAT WAS WHAT MY MODEL SHOWED AS THE HIGHER PROBABILITY OF BEING WHAT YOU WANTED.
I am increasingly convinced that what i actually want is a good compact language to interface with the language lexer. Something that allows me to quickly say "convert all .set_1_and_2({arg1},{arg2}) to .set_1({arg1}).set_2({arg2})"
Regex is ok but it's still very limited in my opinion for example it would not be able to hand a scenario like the one above if one of the args is an expression containing parentesis
Naw, regex is not well suited for that example. You're presumably thinking that the example must mean it's always cases like set_1_and_2(a, b), but it could also be stuff like set_1_and_2(foo(), bar(a, b)).
Have you tried ast-grep? It is designed exactly for this kind of operations. It can do intelligence search (and replace) on AST rather than raw text for a lot of different languages.
I know this is a joke, but if this is actually happening you at work then you need to learn how to use the tools better.
Guys will come online acting like they are the world's greatest engineers then talk about AI like they use it by poking it timidly with a stick out of fear.
Srsly. You don't even need to be a prompt engineer, just ask the model to refine your prompt. It will spit out an in-depth version with all kinds of guardrails that prevent exactly what OP is describing.
You can even take it a step further and say something like, use placeholders and note unresolved questions. Now you have an extremely detailed prompt that explicitly calls out any critical details you forgot to mention.
So to the people who use AI, can you literally not touch the code it makes? Why can't you just go in and at worst CTRL F the variable name or more likely use ur IDEs built in renamer?
Ive specifically avoided using ai in a programming context cause i like to treat programming as an artistic outlet. YALL MOTHER FUCKERS ARE HAVING GLADOS RENAME A FUCKING VARIABLE????????????
"I'm gonna head over to Walmart real quick, I'll be back in 5!" "Wait! Hey... I'll come along. We can take the Rolls Royce! Yeah?" "Right.. okay.. I mean it'll be quicker for me to just sprint over there instead of getting in-" "Hey, dude, look at this. Uuh.. wait a minute.. keep looking.. When I press this, the sun-roof rolls back! Now I forgot which button it is.." "Neat! Okay, I'll get in then." "It'll take about 5 minutes for the engine to warm up. I'm trying to go easy on the gaskets lol" "Right..." "Oh and when we get to the parking lot, could I have you get out and check if I'm getting too close to the other parked vehicles. I got a scratch last time."
Don't forget to include a 5 line comment explaining the reasoning behind name change, the old name, the ticket number, what was motivation for renaming, steps to deploy the new name, and a todo to check after deployment that everything went through cleanly.
Really, I just asked if a setting in a library could be changed by configuration and it started downloading the source code of the library and trying to find a way to patch it on npm post-install... what kind of mad hatter does that?
... How do you expect it to know what is a better name without knowing what it's doing in the code? And do you want it making changes without testing that it didn't break anything? This is exactly what it should be doing to respond to that prompt (minus the subagents part which I assume is an exaggeration).
FFS this never happens to me because I know how to use the tool properly. For trivial things you either do it yourself, or if it will become a bit more of a refactor with renaming several things, you give it a better prompt with more clarity and context, maybe a suggestion that you already have for good names and the damn thing quickly makes changes. This is a dumb meme. LLM coding agents are just another tool and you need to know how to use it and when to use it, otherwise you are the tool.
45
u/lysergicpride 26d ago
I asked Claude to prettify a CSS file and it started writing a python script
11
u/seweso 26d ago
Paying for a service which then buys more of its own service cause the origional service can't do as promised...... is WILD.
Are you all paying for all that?
How is this going to work if tokens aren't subsidized anymore???
8
u/FlowOfAir 26d ago
ME THIS WEEK HOLY FUCK
I had to be VERY explicit. Do this replacement in this codebase exactly like I am describing. Then I had to add: assume the codebase works like this, assume I am right, don't investigate, don't find more data.
Just for an edit in one file...
858
u/XxDarkSasuke69xX 26d ago
The issue with making something that tries to be as smart as possible, is that it doesn't know what good enough is
2
u/Ali_Army107 25d ago
The humble "Rename Symbol" option in vs code
295
u/wardrox 26d ago
Look, the IPO needs the numbers to look good. If that means a million tokens per line change, Claude's on it.
170
u/WilkerS1 26d ago
remembering snippets and language servers exist does wonders
97
u/Kaiki_devil 26d ago
To be fair, a “good” name would take into account what it is doing in the program and how it’s used… and that requires context… if asked to rename something I would at least look at what it is doing already and how it’s used…
So at the beginning it’s not that far off from what I’d expect someone to do initially.
47
u/pimezone 26d ago
Make sure you use the latest Opus with max reasoning and
/deep-researchfor that.36
u/joshpennington 26d ago
Watching Claude jump around my filesystem at my job is almost hilarious. Like my dude I asked you to update this specific file not root around a completely different unrelated project.
But hey this is the future so who am I to judge
126
u/ISuckAtJavaScript12 26d ago
You mean the token burning machine is optimized to burn tokens? No way
18
u/Weak_Shoulder_6780 25d ago
adds 50 lines of comments about the renaming of that variable in every place it existed
12
u/mencretdimulut 26d ago
how can a variable name become "more" good?
30
u/Mr_Rogan_Tano 26d ago
What did you expect it to do?
How the duck it would know how to name a variable without knowing how it's used?
18
u/ThePsyPaul_ 26d ago
that'll be 80% of your daily usage
30
u/ThatDudeFromPoland 26d ago
that's on you for not knowing how to use find and replace
6
u/WildWezThy 26d ago
Hey Fable 5.1 Ultracode can you change the color of this button
5
u/TopFix8731 25d ago
...AND THEN RENAME 8 DIFFERENT CLASSES THAT HAS NOTHING TO DO WITH THE VARIABLE YOU ASKED ME TO CHANGE.
I'VE ALSO ADDED THIS YELLOW BUTTON IN THE MIDDLE OF THE CHECKOUT SCREEN THAT READS "DICKBUTT" BECAUSE THAT WAS WHAT MY MODEL SHOWED AS THE HIGHER PROBABILITY OF BEING WHAT YOU WANTED.
5
u/Ange1ofD4rkness 24d ago
Claude, makes my ADHD ramblings look like nothing
4
u/Giocri 26d ago
I am increasingly convinced that what i actually want is a good compact language to interface with the language lexer. Something that allows me to quickly say "convert all .set_1_and_2({arg1},{arg2}) to .set_1({arg1}).set_2({arg2})"
3
u/RocketArtillery666 26d ago
How about you do it yourself lmao.
3
u/wrex1816 26d ago
I know this is a joke, but if this is actually happening you at work then you need to learn how to use the tools better.
Guys will come online acting like they are the world's greatest engineers then talk about AI like they use it by poking it timidly with a stick out of fear.
5
u/Ragingman2 26d ago
Set effort to low
5
u/Kokuswolf 26d ago
But you know the variable name will be outstanding. A variable name like you never seen before AND afterwards. God will appear to you and ...
5
u/AaronTheElite007 26d ago
If you use AI to do your job for you.... I cannot fathom how you tie your shoes.
2
u/russianrug 26d ago
You have to be strict with it: “pls rename this variable to something more good, bitch”
2
u/A_Guy_in_Orange 26d ago
So to the people who use AI, can you literally not touch the code it makes? Why can't you just go in and at worst CTRL F the variable name or more likely use ur IDEs built in renamer?
2
u/Ceros007 26d ago
358.2 AI credits were used
2
u/geekosas 26d ago
Didn't place or equivalent already do this? In vs code just press f2
2
u/OTee_D 26d ago
Any IDE since decades: "right click / refactor/ rename"... done, no tokens, no pricetag.
2
u/ReindeerCreepy2883 26d ago
remember when this meme used to be "customer: asks for a different color and font on the already built web page"
2
u/[deleted] 26d ago
Search and replace? Just highlight the variable and press F2.
2
u/outofband 25d ago
That’s your fault for using the wrong model for something that you could done by yourself.
2
u/SaCorv 25d ago
Ton of skills.md, agent/lessons and big comprehensive agent.md helped me make my token burner machine to go less BRRRRRR on tokens
4
u/KawaiiMaxine 26d ago
Ive specifically avoided using ai in a programming context cause i like to treat programming as an artistic outlet. YALL MOTHER FUCKERS ARE HAVING GLADOS RENAME A FUCKING VARIABLE????????????
3
u/Wicks_Discounts 24d ago
its like its incentivized to waste your time and money
1
u/thunderbird89 26d ago
Maybe reserve Ultracode for the really big tasks?
1
u/sitilge 26d ago
seek and destroy!
1
u/widowhanzo 26d ago
Don't forget to include a 5 line comment explaining the reasoning behind name change, the old name, the ticket number, what was motivation for renaming, steps to deploy the new name, and a todo to check after deployment that everything went through cleanly.
1
u/aberroco 26d ago
Seriosly. It would run full test suite before and after fixing a typo in a comment...
1
u/Greeninn 26d ago
And out comes 'test_1'
1
u/Patrick_Atsushi 26d ago
Naming is important.
1
u/Several_Ant_9867 26d ago
Really, I just asked if a setting in a library could be changed by configuration and it started downloading the source code of the library and trying to find a way to patch it on npm post-install... what kind of mad hatter does that?
1
u/Enough-Scientist1904 26d ago
Seems like a skill issue
1
u/lazydavez 26d ago
Yesterday I asked info about some k8s issue. Ten minutes later it came back with a complete setup, argocd helm everything… wtf
1
u/GobiPLX 26d ago
Woah, you even changed this meme format into AI slop image
1
u/TedGetsSnickelfritz 26d ago
Shit in, shit out.
1
u/thanatica 26d ago
If only this were the thing we used AI for... It'd be not so bad.
1
u/Lysol3435 26d ago
I see the issue. I’ll replace all instances of ‘var’ with ‘i’
1
u/Lngdnzi 26d ago
Claude code is one of the worst harnesses guys , try something else vibe bros
1
u/MithrilTuxedo 26d ago
"Orchestrator"
1
u/Consistent_Reward 26d ago
After half a million tokens of analysis, we agree that your variable shall be named fortyTwo.
1
u/snarkhunter 26d ago
Crazy that the best course of action always seems to be spending as much Claude tokens as possible
1
u/Macrado 26d ago
i
1
u/Silly_Guidance_8871 26d ago
Gotta drive those billable token limits
1
u/slaymaker1907 26d ago
This is exactly why Haiku exists. It generally just stays in its lane and doesn't go beyond.
1
u/kjube 26d ago
Token maxing deep thought reasoning agent burning tokens as intended.
1
u/ryaaan89 26d ago
Okay but it’s kind of your fault for asking an agent to do this instead of doing it yourself?
1
u/Outrageous_Band9708 26d ago
better than gpt
gpt will rename this one variable to fucking_good_var, and say lol. and not check other usecases, now the code doesnt compile
1
u/DouDouandFriends 26d ago
fn f12 my beloved
1
u/Positive-Engineer482 25d ago
Due security reasons my safety system blocked me. Sorry. You can’t do anything.
(Even switched to opus 4.8) 💩
1
u/AtmosphereVirtual254 25d ago
Are there opaque planing-time reasons behind it?
1
u/ThatNickGuyyy 25d ago
Most LSP’s facilitate this pretty easily
1
u/Flat-Performance-478 25d ago
This gives off big "I Have The Best Words" energy.
1
u/garth54 24d ago
... so I've renamed "iteration" to "i".
1
u/FanHe97 24d ago
:%s/myVar/idkSomethingMoreGood/gc
Alternatively:
:%s/my_var/idk_something_more_good/gc
1
u/Smrgling 24d ago
... How do you expect it to know what is a better name without knowing what it's doing in the code? And do you want it making changes without testing that it didn't break anything? This is exactly what it should be doing to respond to that prompt (minus the subagents part which I assume is an exaggeration).
1
u/JSanko 23d ago
Use haiku med or low for this shit
1
u/SpamminEagle 22d ago
Gotta start working down that 80bn or something of a loss.
1
u/The_Ledge5648 20d ago
Lemme guess you asked it to do that with fable instead of sonnet
1
u/litetaker 26d ago
FFS this never happens to me because I know how to use the tool properly. For trivial things you either do it yourself, or if it will become a bit more of a refactor with renaming several things, you give it a better prompt with more clarity and context, maybe a suggestion that you already have for good names and the damn thing quickly makes changes. This is a dumb meme. LLM coding agents are just another tool and you need to know how to use it and when to use it, otherwise you are the tool.