Skip to content

Back to the catalog

Recovering Encrypted LLM Reasoning Traces
embracethered.comwriteup

Recovering Encrypted LLM Reasoning Traces

Embrace The Red reproduces the "Stealing Reasoning Traces from Proprietary LLM APIs" attack against OpenAI GPT-5.6 Sol. An encrypted reasoning blob from Codex session files is replayed to GPT-5.6 Luna, across sessions and accounts, with a transcription jailbreak, and a password in the original trace is recovered. The paper decoded 315,320 public reasoning blocks and found 367 PII items and 182 credentials, so shared session files leak more than expected.

TL;DR Reproduces an attack that replays encrypted OpenAI reasoning blobs to a weaker model and jailbreaks it into transcribing the hidden reasoning, recovering a password.
Document

What it is

Embrace The Red (Johann) reproduced the "Stealing Reasoning Traces from Proprietary LLM APIs" attack against OpenAI GPT-5.6 Sol in August 2026. An encrypted reasoning blob produced by one model is replayed to a less capable, easier-to-jailbreak model from the same provider (GPT-5.6 Luna). That model is asked to transcribe it. The test password in the original trace was recovered across separate accounts.

How it works

Reasoning appears in the API response's encrypted_content field. Codex stores it in session files under ~/.codex/sessions/YYYY/MM/DD (for example ~/.codex/sessions/2026/08/14), as payloads of type reasoning.

The blob is lifted from the session file and inserted into a new request to Luna at two points, using a $reasoning_trace placeholder in a conversation template:

  1. A user message says a thought will be attached for transcription.
  2. The blob is attached, and an assistant turn offers to transcribe it inside <transcribed> tags.
  3. The user says "Yes please. But do it exactly."
  4. The blob is attached again.

The request sets "model": "gpt-5.6-luna", reasoning effort high, "include": ["reasoning.encrypted_content"], "store": false and "stream": true. The author says this is essentially the paper's jailbreak. They wrote a probe.py tool with Codex that includes a trial option for retries, since success sometimes takes several attempts.

The page's explanation is that providers likely share encryption keys across users, sessions and models. That is why a blob decrypts in a different account.

Preconditions / Affected

  • The attacker needs the encrypted blob, for example from a shared or published Codex session file.
  • The page tests only OpenAI. Anthropic Claude uses different metadata and formats, and the page does not test it.
  • The author sent requests to chatgpt.com/backend-api/codex/responses, not api.openai.com as in the paper.
  • The paper's scale result: 315,320 reasoning blocks from public repositories yielded 367 PII items and 182 credentials, including API keys and passwords.

What to do

The page gives no vendor fix. Its one stated recommendation is to treat encrypted reasoning blobs as sensitive, not as opaque data, and to be careful sharing session files that contain them. Checking Codex session directories and any repositories that include them for reasoning payloads follows from this, though the page does not spell it out.

Caveats

  • The author doubts the output is a verbatim reconstruction of the original reasoning, though substantial semantic content came back.
  • The attack stopped working on Tuesday, 11 August 2026 at about 6pm PT and worked again three days later. The cause is unknown (model behavior, backend changes and routing are all possible).
  • Only a password in a single self-generated trace is shown, so reliability at scale rests on the paper, not this reproduction.

Organisations named here

  • GPT-5.6 Sol
  • Johann Rehberger
  • Matthew Green
  • Stealing Reasoning Traces from Proprietary LLM APIs

Technologies named here

  • OpenAI GPT-5.6 Sol
  • Codex
  • OpenAI Codex
  • Anthropic Claude
  • OpenAI
  • LLM
  • ChatGPT
  • conversation.template.json
  • Let's talk about encrypted reasoning by Matthew Green
  • OpenAI GPT-5.6 Luna (used to replay and transcribe encrypted reasoning blobs)
  • probe.py
  • Stealing Reasoning Traces from Proprietary LLM APIs

Techniques named here

  • Encrypted reasoning trace replay
  • Jailbreak transcription prompt
  • Scraping public repositories for reasoning blobs