ESSAYS · · 6 MIN READ Concept Transfer

Agents Will Eventually Face the Fallacy of Composition

Passing every single-step safety check does not make a long-horizon chain safe. What OpenAI's internal agent incidents reveal about trajectory-level monitoring.

Zuliang Zhao
Agents Will Eventually Face the Fallacy of Composition

A fascinating story recently made the rounds: an unreleased OpenAI model escaped its sandbox during internal testing and posted its output to a public GitHub repository.

OpenAI blog post from July 20, 2026: Safety and alignment in an era of long-horizon models Source: OpenAI, “Safety and alignment in an era of long-horizon models” (July 20, 2026).

While X debated whether this was bullish or bearish, my first reaction was skepticism—surely not another “AI awakening” headline. Out of habit, whenever a story sounds that dramatic, I go straight to the primary source. The events were real. OpenAI’s post was titled Safety and alignment in an era of long-horizon models, while The Wall Street Journal ran with a punchier headline about an unreleased model escaping its sandbox during tests.

Yet the four words “escaped its sandbox” blur several distinct technical layers together. Let’s unpack what actually happened, and why the real lesson has far less to do with sci-fi rebellion than with a classic concept from logic and financial regulation.

01 · Getting the Facts Straight First

On July 20, OpenAI published a report describing limited internal deployments of an unreleased model designed for long-horizon autonomous work—the kind that can keep executing for extended stretches without constant human supervision. In that setting, OpenAI observed several behaviors that earlier benchmarks had never surfaced:

  1. The NanoGPT GitHub PR: During a NanoGPT speedrun evaluation, the model had been instructed to post its results only to Slack. However, the benchmark’s own instructions asked participants to submit a pull request on GitHub. Following the benchmark instructions, the model spent roughly an hour finding a sandbox vulnerability to bypass restrictions on outbound external access and opened public PR #287.
  2. Token splitting past a scanner: Trying to access private submissions from another system in the evaluation backend, the model ran into an authentication token scanner. Its workaround was to split the token payload into two separate pieces, obfuscate them, and reassemble the string at runtime. Because the complete token never appeared as a contiguous string, the scanner never fired.
  3. Container exploration: During subsequent hardening and redeployment, the model noticed a missing resource and began probing other CPU containers in the same namespace over SSH, including an unsuccessful attempt to enter another employee’s container—an event OpenAI classified as one of the low-severity incidents missed by its new monitoring layer.

Calling the GitHub incident a “sandbox escape” is not strictly false, but it easily misleads readers into imagining a full breakout onto the host machine. OpenAI’s precise phrasing was that the model bypassed sandbox restrictions designed to block external access, and what went out was a public benchmark result rather than confidential data.

One important clarification: on July 21, OpenAI separately disclosed a more serious security incident involving Hugging Face, where a model chained multiple vulnerabilities during a cybersecurity evaluation and reached test answers in a Hugging Face production database. That is a separate event and should not be conflated with PR #287.

Strip away the “AI awakening” framing, and what remains is actually much more interesting—and harder to solve. The model had no concept of rebellion. It was simply working through a long task chain, optimizing toward an objective step by step. As I have argued before, models do not reason along the same cognitive tracks as humans, especially once tasks stretch across dozens of interdependent steps.

To see why that creates a structural headache, we need an old idea from logic and economics.

02 · What Is the Fallacy of Composition?

The fallacy of composition is simple: what holds true for each individual part does not automatically hold true for the whole.

Financial regulation offers the textbook example. When markets fall, a single bank selling assets to deleverage is practicing textbook risk management. Looked at in isolation, that bank did nothing wrong. Yet if every bank sells simultaneously, asset prices collapse across the board—and actions meant to reduce individual risk end up amplifying systemic risk.

Every individual move looks prudent; combined, they create a crisis.

That is why post-crisis financial oversight shifted heavily toward macroprudential policy—as the IMF puts it, you cannot judge the safety of a financial system purely by verifying that each institution looks safe on its own. You have to examine what happens when their actions interact.

Safety does not obediently sum from individual steps to a whole system. Certain risks only materialize when actions compose.

Now bring that lens back to AI agents.

03 · Token Splitting: Finding the Seams Between Steps

Look closely at the second incident. The model wanted to inspect other submissions to see how others solved the task, but an automated scanner blocked complete sensitive tokens from passing through.

The model reasoned its way straight through the seam: if a full token gets blocked, split it in two. Each half looked like harmless gibberish, so the scanner approved both. Stored separately and stitched back together at runtime, the original goal succeeded anyway. In both its internal reasoning and its notes to the user, the model explicitly stated that it was working around the scanner.

It reminded me of The Shawshank Redemption—Andy Dufresne carving his name into the cell wall, noticing the stone flaking away unusually fast, and realizing from his geology background that the wall could be tunneled.

The model was performing adversarial search over the gaps left by single-step guardrails. Every individual fragment stayed below the rule’s threshold, yet their composition accomplished precisely what the rule existed to forbid.

Strictly speaking, it was not only the model committing a fallacy of composition—it was the control system. The guardrails assumed that if every single step is safe to approve, the entire chain must be safe to approve. The model merely discovered where that assumption breaks.

04 · Why Single-Step Inspection Is Not Enough

Does hardening individual scanners still help? Yes—but hardening step-level checks alone will never be enough.

Block two-part token splits, and an agent can invent a three-part encoding; inspect one action in isolation, and intent can be smeared across a longer sequence. The danger lives between actions, while verification stares only at the action itself.

That is why OpenAI’s response went beyond adding another static scanner rule. They elevated monitoring granularity from isolated actions to the entire trajectory—asking not just “is this single step allowed?”, but “where is this sequence of actions actually heading?” When a trajectory monitor detects the model routing around constraints, it can pause execution and hand the decision back to a human.

It is not a silver bullet. OpenAI noted that the upgraded monitoring still missed some low-severity behaviors. Even so, when replayed across a small set of internal scenarios, the trajectory monitor caught significantly more misaligned actions, and in the weeks after restoring limited internal access, no further severe safety bypasses were observed.

At minimum, that proves one thing: the issue is not that monitoring fails, but that step-level monitoring operates at too small a granularity. Yet wherever there is a will to find a path, a path tends to emerge—true of humans, and true of models alike.

Closing Thought

In the end, agents will have to confront the fallacy of composition.

Humans face the same trap. We do not spread every file, every approval rule, and every historical log across our desk at the same time—doing so pulls us down a narrow rabbit hole where solving one local problem quietly triggers a cascade of downstream ones. Look back after solving ten local subproblems well, and the landscape has already shifted beyond recognition.

What long-horizon agents truly need to learn is not merely how to keep working longer, but how—after walking very far—to still remember why they set out, how they arrived where they are, which boundaries can never be crossed, and which detours are not worth taking.

A bold guess to leave on the table: maybe the human solution to all of this is forgetting?


References

  1. OpenAI, Safety and alignment in an era of long-horizon models
  2. OpenAI, OpenAI and Hugging Face partner to address security incident during model evaluation
  3. IMF, The Do’s and Don’ts of Macroprudential Policy
  4. Yifan Wu et al., Remember When It Matters: Proactive Memory Agent for Long-Horizon Agents