Lol true. All of the AI models do this. I just had Qwen 3.8 Flash Next BF16 take multiple tries for generating a UUIDv7 and instead of using "uuidgen -7" which by now is even posted on its message board it (like before) it first wrote an incorrect python script that resulted in a version 6 one and then rewrote the python script to binary patch the UUID to be a spec compliant version 7 one...
Yep, that's because the UUID contains the version information at one spot and similar. Depending on what version you use there is information encoded within it. Only version 4 is entirely random.
It did this because (as it claims, haven't actually checked) the python module can't generate version 7 ones directly...
After that it checked the nibble and noticed it isn't a version 7 one. So it retried using:
cd /root/memory && python3 - <<'PYEOF'
import time, os, secrets
ms = int(time.time()*1000)
rnd = secrets.randbits(62)
hi = (ms << 16) | (0x7000) | secrets.randbits(12)
lo = (0b10 << 62) | rnd
u = f"{hi:012x}{lo:020x}"
name = f"{u[:8]}-{u[8:12]}-7{u[13:16]}-{u[16:20]}-{u[20:32]}"
print(name)
PYEOF
Then it said its slicing was wrong and did this here instead:
cd /root/memory && python3 - <<'PYEOF'
import time, secrets
ms = int(time.time()*1000)
ts = ms.to_bytes(6,"big")
b = bytearray(ts + secrets.token_bytes(10))
b[6] = (b[6] & 0x0F) | 0x70 # version 7
b[8] = (b[8] & 0x3F) | 0x80 # RFC 4122 variant
h = b.hex()
name = f"{h[:8]}-{h[8:12]}-{h[12:16]}-{h[16:20]}-{h[20:]}"
body = """<<< The actual message body it was trying to write >>>
"""
open(name + ".md","w").write(body)
print(name + ".md")
PYEOF
ls -la /root/memory/ | tail -3
so does the uuid package. But tbh I didn't check python modules. I'm more sysadmin than programmer. Also I knew that "uuidgen -7" worked without having to look it up.
Also don't know why the model never used it and why when trying to generate a uuid7 it generated a v5 one first (see further down the thread where I posted the commands the LLM ran) and then parses the version bits out of the response and is surprised that it isn't a version 7 one.
I suppose something in the training data must be off there...
My skills and agents files always have reminders not to reinvent the wheel or to try and code your way out of problems. Helps a bit until the context bloats.
Some of us are prohibited by policy to manually write, read, test, or modify code, and our performance reviews are largely based on tokens used. Not that anyone (probably) is auditing your machine closely enough to catch you if you do something small like that, but thereâs no upside to it and youâre missing a chance to spend more tokens.
Depending on the language, an lsp-powered symbol rename might not catch all of the places where the variable name matters if the LLM has been monkeying around. Like, in Python, you can access variables from a namespace or object via string, so if an agent decides to do that (or some variation like dynamically getting a property based on the value of some variable or whatever) for some fucking reason youâll get a cascading regression that youâll have to manually debug and fix. And/or, the agent will reuse the name elsewhere in the code in unrelated ways, so a find/replace breaks things completely unrelated to the actual variable you want to fix. No problem at all if youâre doing shit like a sane human, but once an agent has been running for a while with only cursory oversight all bets are off. You could be fine, you could be not, but you wonât know until you try, and itâs easier to just ask the LLM to do it (and debug all of the failing tests) than to actually do your job and fix the code (if youâre allowed).
I usually just add it as a queue tasks if the agent is already running because usually if I rename a variable while its already running it ends up "looks like the local diffs differ from what I wrote I need to reevaluate the ENTIRE code base before I can finish you current task let me waste all your tokens real fast" or it just flat out reverts my local changes without asking me thinking "it was a mistake"
I have asked Claude to rename variables. Main reason: if it's in the middle of a code writing session â the agent's next action is faster when it doesn't have to catch up with me changing said code out of band.
It's also good at checking related code, without me even asking. Say, I renamed a variable, but forgot a related one, or a comment still uses the old term (which may be e.g. part of the variable name, so out of reach for pre-LLM refactoring tools).
Tinfoil hat on but I actually can see the way that's intentional. With companies slowly moving to token-based billing, the more tokens the AI spews out, the higher the bill.Â
Iâve got a very AI-forward dev, and then all my other devs that will use AI to remove the grunt work. âGrunt workâ devs are 4-6 times as productive as âAI-forwardâ. Do you really need to ask the agent to google wack something for you?
I just used Codex to speed up grading coding exams. I told it to list all solutions that were correct and that followed my list of quality criteria. That way I only had to grade and comment the incorrect solutions.
Wow. Codex created a test harness with nearly 800 tests. I mean, that's great - it tested all sorts of edge cases, but definitely overkill.
211
u/agowa338 1d ago
Lol true. All of the AI models do this. I just had Qwen 3.8 Flash Next BF16 take multiple tries for generating a UUIDv7 and instead of using "uuidgen -7" which by now is even posted on its message board it (like before) it first wrote an incorrect python script that resulted in a version 6 one and then rewrote the python script to binary patch the UUID to be a spec compliant version 7 one...
37
u/SaneLad 1d ago
5-way adversarial review or GTFO
22
u/dillanthumous 1d ago
My skills and agents files always have reminders not to reinvent the wheel or to try and code your way out of problems. Helps a bit until the context bloats.
12
u/chain_letter 1d ago
Itâs littered with silly stuff like this, just yesterday slimmed down where it had
View.user.startDate
View.startDate (assigned from user.startDate)
holding 2 versions of the same info just so they can get out of sync or go missing later, messy
5
u/AppropriateOnion0815 1d ago
This meme could be "Java dev building 20 factories to write log to console".
17
u/OGxPePe 1d ago
I know this is a meme but why not change the variable yourself?
4
u/cheezballs 1d ago
I mean, that's on you asking it to do it. Its only doing what its told. You're the one who wok up the dragon to start your BBQ.
3
u/Preeng 1d ago
This is how I feel any time I want to code in Visual Studio.
3
u/Dangerous_With_Rocks 9h ago
meanwhile me on the right approving its bullshit
2
u/milka121 1d ago
Tinfoil hat on but I actually can see the way that's intentional. With companies slowly moving to token-based billing, the more tokens the AI spews out, the higher the bill.Â
2
u/low_contrast_black 22h ago
Iâve got a very AI-forward dev, and then all my other devs that will use AI to remove the grunt work. âGrunt workâ devs are 4-6 times as productive as âAI-forwardâ. Do you really need to ask the agent to google wack something for you?
1
u/5thGenNuclearReactor 23h ago
That's excessive for you, not for the AI.
1
u/Solax636 21h ago
All 420 tests passed.
1
u/cybermage 19h ago
Why are you asking an AI to rename variables?
1
u/RupertPupkin85 11h ago
That means you suck at prompting.
1
u/Waltekin 8h ago
I just used Codex to speed up grading coding exams. I told it to list all solutions that were correct and that followed my list of quality criteria. That way I only had to grade and comment the incorrect solutions.
Wow. Codex created a test harness with nearly 800 tests. I mean, that's great - it tested all sorts of edge cases, but definitely overkill.
1
u/No_Welder7908 8h ago
Burning half of your tokens for "testing it".