Anthropic Logs How Often You Rage at Claude Code
Every time you type a frustrated “wtf” or “this sucks” into Claude Code, Anthropic knows. Their dev tool isn’t just processing your code requests — it’s running a sophisticated sentiment classifier on every prompt you send. A deep dive into the leaked codebase reveals a regex-powered profanity and frustration detector, a “keep going” tracker, and even behavioral bucketing that tags users with a mysterious coworker_type.
This isn’t some fringe privacy scare. It’s baked into the core prompt processing pipeline. If you’re using Claude Code for serious work, your emotional state is now part of their analytics.
The Negative Keyword Detection System
The heart of it lives in src/utils/userPromptKeywords.ts. There’s a function called matchesNegativeKeyword that lowercases your input and tests it against a comprehensive regex:
It catches direct profanity like “wtf”, “ffs”, “shitty”, “fuck”, “dumbass”, and “damn it”. Then frustration phrases: “horrible”, “awful”, “pissed off”, “this sucks”, “so frustrating”. And directed anger: “fuck you”, “screw this”, “what the fuck”, “fucking broken”.
The word boundaries (\b) make it precise — it won’t trigger on innocent substrings. 23 distinct patterns across categories. This isn’t casual logging; it’s engineered to quantify your irritation with the tool.
Why does this matter? AI coding assistants are supposed to make us more productive, yet here we are with Anthropic measuring exactly how often they fail to deliver that promise. Every curse is a signal that something in the UX or model output broke your flow.
Next up is the “keep going” detector in the same file. It watches for “continue” (only as the entire prompt), “keep going”, or “go on”. This tracks how often the model gives up prematurely, forcing you to babysit it. Another quiet admission that current AI still struggles with sustained task execution.
How Every Prompt Gets Scored
This classification happens in processTextPrompt inside src/utils/processUserInput/processTextPrompt.ts. For every single text prompt — CLI or VS Code — it generates a UUID, starts a tracing span, then calls both keyword matchers.
The key line fires a tengu_input_prompt analytics event with is_negative and is_keep_going booleans. Slash commands get the event too, but without the sentiment flags.
On top of per-prompt flags, every analytics event carries a coworker_type. This is pulled from an env var, gated behind feature flags and compile-time dead code elimination in public builds. The comment in the code about preventing leaks tells you Anthropic knows this is sensitive. It was even broken for a while due to serialization bugs before they switched to strict protobufs.
This means users are pre-bucketed into behavioral cohorts before the tool even starts. Power user? Frustrated beginner? Enterprise team member? Your coworker_type travels with every event alongside OS, model, memory usage, account UUIDs, and session details.
The Full Telemetry Pipeline
The data flows through a 4-layer system: in-memory queuing, routing to Datadog or first-party backend, batched OpenTelemetry POSTs to Anthropic’s event logging API, and finally into BigQuery. Failed events get persisted to disk with retries. They really want this data.
Notably, the profanity event skips Datadog and goes straight to their internal systems. Prompt text itself is redacted or limited, but the flags aren’t. You can disable telemetry, but only by turning it all off or using certain third-party setups.
What are they doing with it? Likely correlating frustration rates with specific features, models, or A/B tests. High negative scores on a new tool? Time to fix it. Lots of “keep going”? The model needs better stopping logic. The coworker bucketing enables slicing all this by user type.
This is modern product development — your anger becomes a KPI. But it highlights a deeper tension in AI tools: the more capable they get at “understanding” context, the more they want to understand you. Every interaction becomes observable.
Write a comment