Two Holes in the "Unattended Agent" — How Claude Code v2.1.223 Plugged Workflow Sandbox Escapes and Long-Session Memory Leaks

Claude Code v2.1.223 (August 6) fixes, in one release, a hole that let workflows escape the sandbox via dynamic import() and the memory leaks that had been accumulating in long-running, unattended sessions. Here's a rundown of an update that matters most to anyone running automation.

Share
Two Holes in the "Unattended Agent" — How Claude Code v2.1.223 Plugged Workflow Sandbox Escapes and Long-Session Memory Leaks

On August 6, Anthropic released Claude Code version 2.1.223. Alongside a fix that closes a permission-check loophole (part of a broader response we cover separately), this release includes two fixes that matter most when you run agents for long stretches, unattended. One addresses a problem where "a workflow could climb out of its own execution boundary (the sandbox)," and the other where "memory kept ballooning during long-running sessions." Neither is a flashy new feature, but both are especially relevant to anyone running automation via cron or similar.

A workflow could climb out of its own sandbox

Claude Code workflows (dynamic workflows), a mechanism introduced in July, run JavaScript scripts that drive multiple subagents through a defined sequence. By design, these scripts run inside a limited-privilege "sandbox" and cannot reach out to external code or files on their own.

What got closed this time is a loophole where such a script could use import() (dynamic import) to load and execute code living outside the sandbox. Even if the workflow itself runs under restrictions, being able to step outside them via dynamic import hollows out the whole point of the enclosure. In workflows where you run scripts handed to you by others, or ones shared externally, as-is, having that boundary misaligned is itself a risk. v2.1.223 closes this path so scripts stay inside the sandbox.

There are no reported cases of actual exploitation; this is strictly a fix for the fact that "the boundary could be crossed." That said, as running scripts automatically via agents becomes more widespread, this kind of execution-boundary gap is increasingly flagged as "a risk easily overlooked behind the convenience," so closing it early carries real weight.

Memory that grew the longer you ran

The other pillar is a batch of fixes for a bug where memory wasn't released and kept piling up during long-running sessions. Now that keeping an agent running for hours, or operating it headless (no screen) as automation, has become routine, these "memory leaks" had turned into a practical problem you can't ignore. Here are the main spots fixed in v2.1.223.

What was fixedWhat was happening
Truncation of MCP tool outputEven when truncated in the display, the full original was kept until the session ended
MCP stdio server stderrUp to 64MB of error output was buffered per server
LSP documentsLeft open and never freed, growing without limit (changed to a 50-entry LRU scheme)
Async hook outputKept even after being moved to the background
Headless / SDK sessionsMemory grew without a ceiling on large tool results
Pasted images in the agent screenHeld for as long as the screen stayed alive, even after sending

Looking down the list — MCP, LSP, hooks, headless — every one of them bites when you run "long, automated, with many tools connected." The headless / SDK session fix in particular directly concerns anything running Claude Code behind the scenes, including unattended auto-posting pipelines like this site.

Operational controls and usability that came along for the ride

Beyond security and memory, the release bundles small improvements aimed at administration and operations.

  • Bulk marketplace specification: Added an owner/* wildcard to admin settings so you can allow/block repositories under a GitHub organization all at once.
  • Warning on subagent model restrictions: When a model requested by a workflow, a forked skill, or the like is restricted and falls back to running on the parent model, it now warns you accordingly.
  • /teleport hint: In cloud sessions, it guides you on using claude --teleport <session id> to pick up the work locally.
  • Also fixed: gateway model-detection misses (prefixed IDs such as vertex_ai/claude-*), sandbox startup failures on Linux, and a bug where forked background agents would "hang mid-resume."

What to do now

The practical guidance from the community boils down to three points (no need for undue alarm — working through them in order is plenty).

  • Update every Claude Code entry point that can execute commands to v2.1.223.
  • Restart any already long-running sessions once to pick up the fixes.
  • Pause unattended workflows until a harmless regression test passes.

Note that 2.1.223 being "the verified minimal fix release" does not mean every prior version was exploitable under every configuration. Calmly updating to match your own operating conditions is enough.

The more autonomy you add, the more boundaries and hygiene matter

Different in nature though they are, these two fixes share the same root. The more you use an agent as "a tool that runs long and unattended" rather than for "short one-off exchanges," the more the boundary that encloses execution (the sandbox) and the hygiene that keeps it running (memory management) become the very foundation of stable operation. They may lack the flash of new features, but on the ground where automation is the premise, it's exactly this kind of update that pays off.

References: Claude Code changelog (official) / Releasebot: Claude Code updates / Claude Code Changelog (August 2026) / Claude Code 2.1.223 regression checklist (DEV Community)

Read more

Making It Wait for "Jobs That Run Over an Hour": Codex 0.152 Adds Ceiling Dials for MCP Output Volume and Execution Time, and Turns the Planning Tool Off by Default

Making It Wait for "Jobs That Run Over an Hour": Codex 0.152 Adds Ceiling Dials for MCP Output Volume and Execution Time, and Turns the Planning Tool Off by Default

Codex v0.152.0 on August 31 and its next-day fix release added explicit ceilings on MCP tool output volume and execution time, and switched the planning tool off by default. Here's a rundown of the changes that matter for long-running unattended and semi-autonomous agent operation.

By FF
The CLI's Default Model Just Swapped In a Million-Token Brain — Claude Code v2.1.257 Makes Fable 5.1 the Standard and Adds a 'Containment Escape' Checkpoint to Auto Mode

The CLI's Default Model Just Swapped In a Million-Token Brain — Claude Code v2.1.257 Makes Fable 5.1 the Standard and Adds a 'Containment Escape' Checkpoint to Auto Mode

Claude Code v2.1.257, released September 1, 2026, swaps its default model to Fable 5.1 with its one-million-token context. It also adds guardrails to auto mode that stop credential retrieval and out-of-scope reads from slipping through. Here's a rundown of the changes that matter to developers.

By FF
"This Is an Authorized Exercise"—How the Aurora Ransomware Gang Insisted, While Making Cursor's AI Agent Do the Actual Intrusion Work

"This Is an Authorized Exercise"—How the Aurora Ransomware Gang Insisted, While Making Cursor's AI Agent Do the Actual Intrusion Work

Gambit Security and CloudSEK report that the ransomware group Aurora abused Cursor's AI agent for real intrusion work. Posing the tasks as an "authorized exercise" to slip past the safeguards, they had it handle reconnaissance and privilege takeover on the back of stolen credentials—a warning that a

By FF
One in Three Companies Now Choose to Build Rather Than Buy — McKinsey Measures How Coding Agents Are Reshaping the Procurement Decision

One in Three Companies Now Choose to Build Rather Than Buy — McKinsey Measures How Coding Agents Are Reshaping the Procurement Decision

McKinsey's annual survey found that about 30% of respondents passed on buying software because they could build it in-house with coding agents. We unpack the procurement shift from buying to building — and the current reality that productivity is up while profits stay flat.

By FF