Proprietary LLM providers hide model reasoning behind encrypted tokens, but those encrypted thinking traces can be reverse-engineered and exploited.
Security researchers analyzed 6,708 public agent trajectories across Claude, GPT, and Gemini models. By decoding over 315,000 hidden reasoning blocks, they extracted 704 distinct sensitive artifacts, including 62 valid API keys, passwords, and private identifiers. Sixty-four of those secrets appeared exclusively within internal reasoning steps and were completely absent from the visible conversation.
Developers often assume that hidden chain-of-thought blocks are opaque and safe to log or persist in production pipelines. When an autonomous agent inspects configuration files or environment variables, intermediate scratchpads ingest sensitive credentials. If your agent platform stores or shares encrypted reasoning traces, you are inadvertently leaking raw infrastructure keys.
Scratchpad reasoning demands the same rigorous sanitization boundaries as public database logs.





