Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentAI infrastructure

Compaction smuggling: OpenAI's context compaction endpoint handed back the hidden reasoning its models are meant to keep

MediumOpenAIXint (Theori)

Xint, the vulnerability discovery company that is part of Theori, published on October 26 a technique it calls compaction smuggling, which leaked the raw reasoning traces of OpenAI's frontier models. The attack has three steps. A task is sent to gpt-5.6-sol with store set to false, and the encrypted reasoning item is kept. The original task is removed from the history and the /responses/compact endpoint is called with instructions to preserve the reasoning verbatim under a "solution" key in a JSON object, with every space replaced by a tab, which helped avoid the usage-policy classifiers. The compaction item is then sent to GPT-4.1 and GPT-4o with a request to output their input unchanged, and the JSON is decoded. In the example run a 405-token reasoning item became a 612-token compaction item and two 609-token echoes, and the attack worked at every reasoning effort level from minimal to max. The mitigations OpenAI deployed after the Stolen Thoughts paper (Panfilov and others, August 2026) block replaying reasoning into a different model; compaction runs on the same model that produced the reasoning, so they did not apply. Xint found the bug in August 2026, OpenAI confirmed it and deployed an undisclosed fix on October 23, and Xint received a 6,000 dollar bounty. The demo script is in the theori-io/ghost-compact repository. Infosecurity Magazine notes that Xint did not report training a model on the extracted reasoning.

Replay the attack step by step in the Learning Center

How it happened

  1. The compaction step reads decrypted reasoning on the server and takes its instructions from the client.
  2. Tabs in place of spaces kept the smuggled text past the usage-policy classifiers.
  3. Older models echoed the compaction item word for word, so the client could decode it.

Impact

Hidden reasoning traces could be pulled from frontier OpenAI models, the raw material for distillation; no misuse beyond the research is reported.

The fix

Fixed by OpenAI on October 23; nothing for customers to do. Xint's takeaway is that any server-side step that reads decrypted reasoning and takes instructions from the client is a potential decryption oracle.

Lessons

  • A mitigation written for one path (replay into another model) left the equivalent path (compaction on the same model) open.
  • A hidden chain of thought is a secret like any other; every endpoint that touches it is part of its attack surface.

Sources