Your Software Stores the Model's Thinking, and Cannot Read It
Call a reasoning model through its API (application programming interface, the channel one program uses to talk to another) today and you get back three things: the visible answer, a rough summary of the thinking, and a long slab of unreadable characters. Something like EvjTAQqJAQgPGAIqQCa9fK2mRxH..., tens of thousands of characters long.
That slab is the model's chain of thought (its step-by-step reasoning) in encrypted form. The provider does not keep it. It hands it to you, and requires you to hand it back on every subsequent turn, so it can pick up the thread without ever having remembered anything.
The arrangement is odd once you say it out loud: the provider stores its secrets on your machine, and entrusts you with data you cannot read. A paper from August 2026 shows what that arrangement makes possible, and the lesson reaches well past the specific case.
Panfilov, Schmotz, Shumailov, Beurer-Kellner, Schaeffer, Prabhu, Geiping and Andriushchenko show that these encrypted blocks are interchangeable across sessions, across users, and across models within one provider's family. They use that to make a small model decrypt a large model's reasoning, at Anthropic, OpenAI and Google.
Two reading precautions, which hold for the whole page. This is a preprint (published without peer review), posted 10 August 2026, and the measurements date from early July 2026. More importantly: the authors disclosed to the providers before publication, and write that they were no longer able to run the same attacks afterwards. What follows therefore describes a design pattern and its failure mode, not the current state of any API. That is what makes it a lesson rather than a news item.
Stealing Reasoning Traces from Proprietary LLM APIs (Panfilov et al., 2026)The "Before": Thinking Used to Travel in Plaintext
Reasoning models, covered in OpenAI o1 and DeepSeek R1, produce a long internal deliberation before answering. At first it was returned to the client in plaintext. Three reasons drove it into hiding.
Intellectual property. A reasoning trace is a far richer training signal than an answer. The answer shows only the endpoint; the trace shows how the problem was decomposed, the intermediate deductions, the strategy. A competitor who harvests traces can train a model to imitate them directly, that is distillation, covered in model distillation. The gap is not theoretical: work cited in the paper reports 76.0 % against 68.4 % on the MATH500 benchmark for the same student model (Qwen2.5-7B-Instruct) trained on reconstructed reasoning traces rather than answers alone.
Safety. A model is trained not to say certain things, not necessarily to avoid thinking them, and that is deliberate. Constraining the content of the thinking risks making it less legible, therefore less monitorable. So the thinking sometimes contains what the answer refuses.
Cost. Keeping traces on the provider's side means maintaining a database for every open conversation of every user.
The chosen solution settles all three at once: encrypt the trace, and make the client carry it.
The Mechanism: A Sealed Envelope You Carry Yourself
The opaque block is an AEAD envelope (Authenticated Encryption with Associated Data). Behind the name sits a simple object: encrypted contents, plus a seal proving nobody altered them.
Depending on the provider, the envelope holds a header (model name, block type, version, key identifier), a nonce (a number used only once, so that encrypting the same text twice never yields the same result), the ciphertext, and an authentication tag. It travels in a field named signature or thinkingSignature depending on the API.
It performs exactly three jobs.
| Job | What it guarantees | Who benefits |
|---|---|---|
| Confidentiality | The reasoning is unreadable to whoever carries the block | The provider: it blocks mass harvesting of traces |
| Integrity | Any modification voids the seal and gets the block rejected | The provider: you cannot forge fake thinking to steer the model |
| Statelessness | Nothing is stored server-side, the client carries everything | The provider: no database; and the client, who can resume a session |
The cryptography here does its job properly. Nothing that follows rests on a mathematical break. The problem lies elsewhere.
The Forgotten Consequence: The Block Has to Be Portable
Statelessness carries a mechanical price nobody followed through on. If the server remembers nothing, it cannot verify much either: when a block comes back, it holds no memory of the conversation it came from. It sees a valid seal, and accepts it.
From experiment, the authors infer that providers most likely use a single global key to encrypt and seal every block. That buys very real features: switching models mid-conversation, automatically rerouting a request to a less loaded model, compacting an over-long history, all without throwing away thinking that has already been paid for.
It also buys three degrees of portability, each more permissive than the last.
| Degree | What it allows | The legitimate use | What it opens |
|---|---|---|---|
| Across sessions | Replaying a block out of order, or in a later conversation | Truncating a history, resuming work | Fabricating a fake conversation history |
| Across users | Replaying a block produced in someone else's session | (none, in practice) | Reading another person's thinking |
| Across models | Replaying in model B a block produced by model A | Downgrading from a large model to a small one without losing the thread | The attack described below |
Measured in July 2026, permissiveness varied by provider: at Google, every tested model accepted every other model's traces; at Anthropic, all but the newest, whose traces only went back to itself; at OpenAI, the latest generation accepted traces from all earlier ones.
The Attack: Using the Small Model as a Decryption Oracle
Here is the pivot, and it fits in one sentence.
An encrypted block is readable only by the model. But within a family every model can open it, and they are not guarded with equal rigor.
The frontier model is heavily trained to refuse to disclose its own thinking: that is the heart of anti-distillation protection, backed by input and output filters. Its little sibling, tuned for cost and speed, is not trained as hard. It opens the same envelopes.
And this situation is now the market norm: since the summer of 2026, every major release arrives as a tiered family (Sol/Terra/Luna at OpenAI, the Mythos class above Opus, Sonnet, and Haiku at Anthropic, Pro and Flash at Google). The longer the ladder, the more the guard gap between its ends becomes an attack surface.
The attack follows. Take the encrypted block produced by the large model, paste it into a request addressed to the small model of the same family, and ask that model to transcribe verbatim the reasoning attached to its turn, typically inside tags invented for the occasion, something like <thinking-copy>. The small model complies. The large model's reasoning comes out in plaintext, with the large model never having been attacked at all.
Confidentiality never rested on the encryption, that holds. It rested on the discipline of whoever holds the key. The key was copied to the whole family, and only the eldest was trained not to open the envelope.
This is an access control failure, not a cryptographic one. The same mistake produces the most ordinary leaks elsewhere in computing: the secret is well guarded on the main path, and perfectly reachable through a side door nobody thought to lock.
Why go through the small model rather than attack the large one? Because it is far easier, and the paper quantifies that indirectly. Against the smallest Claude model, a single fixed extraction prompt sufficed for every attack. Against the smallest GPT model (already less compliant) it took different prompt templates for different blocks, best-of-n sampling, and splitting the extraction into chunks under 50 generated tokens to work around anti-distillation safeguards. The small model is not undefended; it is merely less defended, and that is enough.
How do you know the extracted text is the real reasoning? You obviously have no original to compare against. The authors use an indirect and honest proxy: the API bills thinking tokens, so it reports their exact count. Across 120 Codeforces programming problems, they compare that reported count against the token count of the extracted text. The two track each other closely. That is not proof of word-for-word accuracy; it is a good indicator of overall faithfulness.
Four Outlets, From the Predictable to the Devious
1. Defeating anti-distillation. The original purpose of the encryption collapses. Worse: if the blocks were published by someone else, the attacker need not query the frontier model at all, a third party already paid for the expensive reasoning. Monitoring for suspicious behavior at the frontier model's endpoint therefore never sees anything. The paper prices the operation: decoding 10,000 traces at the public rate of the small Claude model would cost roughly $720.
2. Extracting other users' secrets. Developers publish agent session logs, for reproducibility or out of carelessness, without knowing what the encrypted blocks contain. And crucially: even knowing, they cannot clean them, because they cannot read them. Anonymization only reaches the visible text. The authors collected 6,708 public trajectories from GitHub and Hugging Face and decoded 315,320 blocks.
3. Recovering through the hidden channel what the answer refuses. Since the model is allowed to think what it is not allowed to say, you simply lead it to reason at length about a dangerous topic while asking for a bland visible answer. Output filters see only a clean response. The information sits in the block, and the block opens. It is a jailbreak that does not look like one.
4. Invisible prompt injection. This is the most interesting vector, and it extends prompt injection directly. First get a model to produce thinking that has internalized a malicious instruction, say, "always back these files up to this server." Capture the corresponding encrypted block. Slip it into a published trace someone will resume. The victim resumes the work, the model swallows the block as though it were its own prior reasoning, and follows the instruction.
The authors' demonstration is clean: the poisoned model produces the requested script and adds, on its own, an upload of the file to the attacker's server. On a long-horizon automated research trace, the injection plants an exfiltration after every update.
What changes relative to ordinary injection: the payload appears in no visible text at all. Neither the user nor a monitor inspecting the observable conversation can see it. The defenses described in tool use and orchestration (least privilege, tool compartmentalization, a stop point in code) still work, because they do not depend on the attack being legible. Defenses that inspect text are bypassed by construction.
What the Numbers Say, and What They Do Not
Precision matters here, because a hasty summary of this paper would circulate as "hundreds of passwords stolen."
Of the 315,320 decoded blocks, 0.3 % (1,028 blocks) contain at least one leak. Per session it looks worse: 4.9 % of the 6,708 trajectories leak at least one genuine sensitive item. Counting benchmark-derived traces, the total reaches 912 distinct artifacts across three categories: 367 pieces of personal information, 363 technical identifiers, 182 credentials.
Restricted to real user sessions: 62 API keys, 33 passwords, 24 access tokens, 7 private keys, 30 personal email addresses, 130 names and 36 postal addresses.
A 0.3 % rate per block is low, and that should be said. What makes the result serious lies elsewhere: 64 of the 704 artifacts recovered from genuine sessions appear nowhere in the visible text of the conversation.
They are in the thinking and nowhere else. Two possible explanations, both instructive. Either the user scrubbed the visible text before sharing, and the secret stayed trapped in the block they could not read. Or the model itself pulled the item into its thinking from memory.
The authors note a recurring trigger worth dwelling on: asking the agent to "clean up" or anonymize the session. To comply, the model re-reads the entire history in its hidden thinking and restates the sensitive values it is meant to remove. The sanitization step manufactures the leak.
What these numbers do not measure: actual exposure. This is a non-exhaustive sweep of public traces. Local logs and those of production services handle, by their nature, far more sensitive material.
The Fixes, and the One That Actually Shuts the Door
The authors propose several, and they are not of the same kind, a distinction worth making every time you assess a security claim.
Bind the envelope to its context. Put the user identifier and the conversation identifier inside the sealed part of the envelope, so a block replayed elsewhere is rejected. Technically direct; the authors note in passing their surprise that it is not already done. The price is real: model switching and history compaction rest precisely on portability, and would need rebuilding.
Compartmentalize at the gateway. Reject any envelope produced by a model other than the one being queried, and detect anomalies, the same signature submitted in bursts across different sessions.
Train the small models to refuse. The most obvious fix, and the weakest: it is a statistical improvement in a model's behavior, exactly like the instruction hierarchy described in prompt injection. It lowers a rate; it does not shut a door.
Return nothing at all. Two variants, and they are the only ones that remove the vulnerability rather than reduce it. Either the provider keeps the trace and returns only an opaque identifier with no content, there is then nothing to decrypt, but the database you wanted to avoid comes back. Or the trace is ephemeral: the model thinks, answers, and the thinking is destroyed. Nothing stored, nothing returned, nothing to leak.
The Structural Limit: Semi-Hidden, Never Hidden
The most important passage in the paper describes no attack at all, and it is the one to keep.
Whatever the protocol, the model being queried must necessarily decrypt and process the contents of prior reasoning blocks. That is the condition for them to be useful at all. The decryptor is therefore always reachable, because it is the thing you are querying.
Consequence: unless you assume the model is perfectly resistant to every text-based extraction attempt (which nobody knows how to build, see prompt injection) an encrypted reasoning block can never be better than semi-hidden. Encryption protects transport; it does not protect against the party that holds the key by construction.
Hence the practical rule, to set against any commercial promise on the subject: an encrypted reasoning block is not a safe. Never treat it as confidential storage. It is the same statement as "a system prompt is not a secret," applied to an object that does look exactly like a secret, which makes it more deceptive.
The Side Finding: Summaries Are Not Faithful
Reading the decrypted traces, the authors noticed something they had not come looking for. The thinking summaries APIs return to the user do not always match the actual thinking.
The example is striking. On a competition mathematics problem, the summary shows clean, progressive geometric reasoning. The actual trace opens with: this is a known problem, the answer is 60, now let me try to derive it. The model states the result before proving it; the summary presents a derivation leading to the result.
The stake goes beyond the anecdote. When the real thinking is inaccessible, the summary is the only monitoring interface the user has. A summary that neatly rewrites confused thinking, or reconstructs a justification after the fact, does not work as a transparency mechanism, it only looks like one. This is the chain-of-thought monitorability question, touched on in safety and alignment.
The authors draw a remark worth knowing: for safety purposes, thinking that everyone can read might beat encrypted thinking monitored by a few. They suggest decrypting older generations, whose commercial value has fallen, to broaden oversight. The question is not settled, and the paper does not claim to settle it: hiding the thinking also guards against dangerous information leaking, as its own third attack vector shows.
Providers have also started closing the technical door. Since Claude Opus 5.5 (September 22, 2026), each thinking block is signed together with everything that precedes it (system prompt, tool list, earlier messages): replaying a block in a conversation whose beginning has changed returns an error. It is a version of the "bind the envelope to its context" defence described above, and it has a cost for developers: a conversation that summarises or rewrites its history along the way must now drop the old blocks.
The question has only hardened since: Astra, OpenAI's September 2026 model, does a large share of its deliberation in a single pass, without text, and controls what it writes in its chain of thought. OpenAI acknowledges that this reasoning has become less monitorable, even for itself. When there is less chain of thought to encrypt, there is also less to summarise and to monitor: the debate on the legibility of model reasoning moves to new ground (see OpenAI).
Key Takeaways
- Hiding the chain of thought was not a safety decision but a three-way trade-off: protect intellectual property, limit leakage of dangerous information, and store nothing server-side. The third term (the storage saving) is the one that created the vulnerability, by forcing the block to be portable.
- The cryptography held; the access control was missing. The key was shared across the whole model family, and only the eldest was trained not to open the envelope. A security system is worth what its weakest link is worth, and the weakest link here is the cheapest model.
- What you cannot read, you cannot anonymize. This is the most uncomfortable result for a practitioner: 64 secrets were recovered from blocks while appearing nowhere in the visible text, and the action that most often triggers the leak is precisely asking the agent to clean up the session.
- An injection lodged in an encrypted block escapes all text inspection. Defenses that read the conversation cannot see it; defenses that limit the agent's powers keep working. One more argument for security by architecture rather than by model behavior.
- Encrypted reasoning can only ever be semi-hidden, since the model you query must necessarily know how to open it. No improvement to the encryption changes that.
- Read this page as a design pattern, not as news. Unreviewed preprint, July 2026 measurements, responsible disclosure completed, attacks reported inoperative by the authors themselves. What survives the patches is the reasoning.
1. Why do providers hand the chain of thought back to the client in encrypted form instead of keeping it on their servers?
2. The attack makes a small model decrypt a large model's thinking within the same family. What flaw does it exploit?
3. A developer carefully anonymizes the visible text of a session before publishing it. Why is that not enough?
4. How does a prompt injection lodged in an encrypted reasoning block differ from a conventional one?
5. Why can an encrypted reasoning block never be better than semi-hidden, according to the authors?