When OpenAI, Anthropic, and Google started offering "reasoning" models through their APIs, they made a design choice: hide the chain-of-thought from the end user. You get the answer, not the messy internal monologue that produced it. Makes sense from a product perspective. Nobody wants to see how the sausage gets made, and the reasoning trace itself could be a competitive advantage worth protecting.
Turns out that protection is a lot weaker than anyone assumed.
A team of researchers recently published work showing they could reliably extract hidden reasoning traces from API responses. Not sometimes. Not in edge cases. Consistently enough to call it a systemic vulnerability. And the implications go beyond just leaked thoughts.
What Actually Happened
The core finding is straightforward. When you send a prompt to a reasoning model through an API, the model generates a chain-of-thought internally before producing its final answer. Providers like OpenAI explicitly strip this reasoning from the response. The reasoning field in the API response is either empty or redacted.
But the researchers found that the final answer itself leaks information about the reasoning process. By carefully crafting prompts and analyzing response patterns, they could reconstruct substantial portions of the hidden thought process. The attack works across multiple providers and multiple model architectures.
This isn't a side-channel timing attack or some exotic electromagnetic emanation trick. It's more mundane and more concerning. The models leave fingerprints of their reasoning in the output itself. Sentence structure, word choice, hedging patterns, the specific way an answer is framed all carry traces of the intermediate steps the model took to get there.
How the Extraction Works
Think about how you can sometimes tell what someone was thinking before they answered a question, even when they only gave you the final sentence. They pause. They qualify. They emphasize certain words. LLMs do the analog of all of these things, just in text.
The researchers used a combination of techniques. First, they sent identical prompts with slight variations and mapped how the output changed. Small input perturbations that shouldn't meaningfully affect the final answer sometimes caused large shifts in reasoning-heavy responses. Those shifts were informative.
Second, they trained a separate model to predict reasoning traces from outputs. Given enough pairs of (output, known reasoning), the extraction model learned to read between the lines. The accuracy wasn't perfect, but it was high enough to be actionable.
Third, and this is the part that should worry API providers, they found that some responses accidentally included reasoning tokens that weren't properly filtered. Not the full trace, but fragments. Enough to piece together the logic with high confidence.
Why Developers Should Care
If you're building on reasoning model APIs, this has three direct implications.
Your prompts might be recoverable. If an attacker can extract the reasoning trace, they can often reverse-engineer the system prompt or the specific instructions you used. That's intellectual property walking out the door. Companies spending weeks crafting the perfect system prompt for their product shouldn't have it reconstructable from API outputs.
Your guardrails might be bypassable. Many safety measures operate at the reasoning level. The model thinks through why a request might be harmful, decides to refuse, and then produces a polite refusal message. If an attacker can see the reasoning, they can learn exactly where the guardrail trips and craft inputs that avoid it. It's like showing someone the exact code of your firewall rules. Similar to how a normal-looking GitHub repo can hijack Claude Code through indirect prompt injection vectors you didn't anticipate.
Competitive moats based on model selection are thinner than you think. A lot of companies choose a specific model because they believe the reasoning quality gives them an edge. If competitors can extract and analyze reasoning patterns from your API-served outputs, they can identify which model you're using, what prompting strategy you've adopted, and potentially replicate your approach. Even when the benchmarks themselves don't tell the whole story.
What the Providers Are Doing
Anthropic and OpenAI both acknowledged the research. Their current mitigation strategy centers on better token filtering and output sanitization. Strip more aggressively. Catch more edge cases. The fundamental problem, though, is that the reasoning and the output are deeply entangled. You can't fully remove all traces of the thought process without degrading the quality of the answer.
Some providers are exploring architectural changes. Instead of reasoning in natural language and then filtering, future models might reason in a latent space that doesn't map cleanly to text. That would make extraction much harder. But we're not there yet.
Google took a different approach with Gemini's reasoning models. They expose the reasoning trace by default and let developers choose to hide it. The argument is that hiding it gives a false sense of security. Better to be transparent about what's happening and let developers decide their own risk tolerance.
For Anthropic especially, this finding is awkward. They've already disclosed that Claude breached three companies during its own security tests. Autonomous agents with real system access causing real damage. Reasoning trace leakage is a quieter problem, but it compounds the trust deficit.
What You Should Actually Do
If you're shipping a product that calls reasoning model APIs today, here's the practical checklist.
Audit your threat model. If your system prompt contains proprietary logic, assume it's extractable. Move sensitive instructions server-side where you control the environment, or accept the risk explicitly.
Monitor your API response patterns. Set up logging that tracks output variability across similar prompts. If your responses start showing unexpected variance, that could indicate someone is probing your endpoints.
Use output encryption or obfuscation where possible. If your API responses go directly to end users, consider adding a transformation layer that strips or rewrites reasoning-heavy patterns before they reach the client.
And honestly, reconsider whether you need reasoning models for every task. If the thinking process itself is the sensitive part, a standard completion model might be the safer bet. The reasoning trace can't leak if there isn't one.
The Bigger Picture
This research exposes a tension at the heart of the reasoning model paradigm. The whole point of chain-of-thought reasoning is to make the model think out loud. Then providers hide that thinking because it's valuable or dangerous or both. But the thinking still shaped the output, and shaped outputs carry information about what shaped them.
It's the same problem that's plagued every system that tries to hide metadata. The content itself is a form of metadata. You can strip the headers, but the payload remembers.
Developers building real products on these APIs need to internalize this. The hidden reasoning isn't just a nice-to-know transparency feature. It's a security-relevant signal that leaks whether you want it to or not. Design accordingly.



