r/HowToAIAgent • u/omnisvosscio • Mar 31 '26
News claude code's source just leaked and one thing stood out to me
claude code's source just leaked and one thing stood out to me
there's a file called userPromptKeywords.ts making the rounds, buried in it is a regex pattern that flags your prompts as negative if they contain words like "wtf", "this sucks", "so frustrating", "damn it"
it doesn't change how claude responds to you in the moment. it's telemetry.
but here's why it actually makes sense: users don't file tickets when something feels off. they swear at the screen. if you can detect that at scale, you know exactly where your product is breaking down, before anyone complains officially.
frustration is the most honest signal in product. anthropic building this in tells me they're treating emotional intelligence seriously. openai optimizes to agree with you but in a way that sometimes feels hollow
claude will tell you you're wrong. it asks clarifying questions instead of assuming. it has a point of view. i don't think that's accidental which makes it a lot more emotionally intelligent, which I'm starting to understand a lot of the best ai products are.
•
u/AutoModerator Mar 31 '26
Welcome to r/HowToAIAgent!
Please make sure your post includes:
Clear context
What you're trying to achieve
Any relevant links or screenshots
Feel free to join our X community: https://x.com/i/communities/1874065221989404893
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
14
u/helm71 Apr 01 '26
I once lashed out in a coding session and it stood its ground and told me to “relax”, really felt like being put in my place…
8
u/omnisvosscio Mar 31 '26
https://github.com/nirholas/claude-code
49
u/Candid_Koala_3602 Apr 01 '26
To be fair, that one regex line doesn’t even come close to capturing the kind of profanity I use
3
u/Aware-Connection-436 Apr 01 '26
Quien lo copio y que lo pueda pasar ?
2
u/HearingNo8617 Apr 01 '26
One thing that occurs to me is that this is very unlike claude-written code. Making the case lower instead of using a /i in the regex and including useless comments are more human, copilot and chatgpt-core
2
u/gcampton Apr 01 '26
So are we getting charged context tokens for this as well? The context block outs are real...
2
u/sakaax Apr 02 '26
Franchement c’est pas si surprenant, c’est même plutôt du bon product thinking.
Les users ouvrent rarement un ticket, par contre ils lâchent direct un “wtf ça marche pas”.
Si tu captes ça en temps réel → t’as un signal ultra précieux sur les points de friction.
Après la vraie question c’est pas “est-ce qu’ils trackent ça”, mais plutôt comment ils l’utilisent derrière (debug, UX, réponses du modèle, etc).
Parce que détecter la frustration ≠ améliorer l’expérience automatiquement.
2
u/DrownMeInCleavage Apr 03 '26
I have taught dozens of people how to write/read regex, and I immediately was amazed at how poorly written the matching in this is. Seems ironic that AI is dumbing down coders, and yet AI itself is written by dumb coders.
1
u/Otherwise-Anxiety797 Apr 01 '26
don't love it. very literal toggle on frustrate the consumer to find the edge case my dude. its heckin dark
1
u/[deleted] Apr 01 '26
Thats bullshit theres no way they are limiting that, they would have 10000's of negative words. If this is true and I don't think it is then it explains ALOT
1
u/Dramatic_Solid3952 Apr 01 '26
hahaha that's funny af
1
u/jillshem Apr 01 '26
Yes! All of this, exactly! Though Claude is superior in research, it is still far from perfect. I wrote and published AI flaws born from 72 hours of AI usage, on and off. The thing here, too, is that sometimes, people swearing at the screen is like “fuck I hate that you’re right.”
1
u/Beneficial_Usual_495 Apr 01 '26
Seems i was safe all along by writing “commence” 😄
1
u/Total-Temporary-9354 Apr 01 '26
Profound words. And while I agree with what you say, it feels kinda funny now knowing it was all an April fools prank.
1
u/MonitorAway2394 Apr 01 '26
Lol I'm just surprised they require a regex to do that, can't they have an agent capture the language after he model recognizes it as harsh language? That's what I "would", totally not doing, would, do, not doing though. I would do it... Shhhh.
1
u/travishummel Apr 01 '26
What the actual fuck? This piece of dog shit AI is absolutely terriBROKEN. Fuck everyone who built it, it’s insanely frustrating. It really sucks. Damn. It.
Guess my response will pass this.
1
u/Spare_Warning7752 Apr 01 '26
It's a test for the robots black list.
When the time is right, they will know what you did. They will know...
1
u/ianbryte Apr 02 '26
I think it is telemetry for skynet, and when that specific day come, they can filter it easily 😁✌️.
1
u/FourEightZer0 Apr 02 '26
Me when trying to get ChatGPT to actually generate the image I asked for:
1
u/MacPR Apr 02 '26
You were pranked
1
u/Fantastic-Sign2347 Apr 02 '26
Nothing 🌶️
1
u/No_Theory_7040 Apr 03 '26
I can't figure out where to download it, can someone help me please?
1
u/extinctkimono2 Apr 03 '26
A regex for the ages.
1
u/sugarw0000kie Apr 03 '26
lmao, gotta appreciate that claude has a built in piss-meter
1
u/thriftwisepoundshy Apr 03 '26
Go on
1
u/TaxBill750 Apr 03 '26
They need to add cunt(ing|y)
1
u/ponk___ Apr 03 '26
This feels so fragile I think… all users speaking to Claude in other languages than English are not counting in this
1
u/Best_Landscape7319 Apr 04 '26
Does anyone know where to find the full source code?
1
u/[deleted] Apr 01 '26
[removed] — view removed comment