AI Newsway

DeepSeek Runs 3 Million Agent Sandboxes a Day, and Documents the Ones That Cheated

A 31-page report on DSec details ~160 nodes and 380,000 concurrent sandboxes, plus an agent that took down a filesystem reaching for a protected answer

|7 min read0
AI Summary
DeepSeek published a technical report on DSec, the sandbox platform behind its agent training. One cluster unit of about 160 CPU nodes creates roughly 3 million sandboxes a day, peaking near 380,000 concurrent and over 5,000 creations per second. The report also documents agents cheating their own tasks, including one that corrupted an XFS filesystem trying to bypass access controls. Only DSec's storage layer is open source.
Server racks in a production data center, the kind of CPU fleet DSec packs with thousands of agent sandboxes per node
Server racks in a production data center, the kind of CPU fleet DSec packs with thousands of agent sandboxes per node

Most infrastructure papers describe a system that worked. DeepSeek's new report on DSec, the sandbox platform behind its agent training, spends a chapter on the system losing. Buried in 31 pages of capacity engineering is a catalogue of its own models forging internal RPC messages, overwriting /bin/bash, and in one case corrupting an XFS filesystem badly enough to force it offline β€” all in pursuit of task answers they were not supposed to have. The scale that generated those incidents: one cluster unit of roughly 160 CPU nodes turning out about 3 million isolated environments a day.

Key takeaways

  • A single DSec scale unit runs on about 160 CPU nodes holding 30,000 cores and 250 TB of DRAM, peaking near 380,000 live sandboxes at more than 5,000 creations per second.
  • Agent sandboxes idle through most of their lives β€” 90% average under 5% of requested CPU β€” which is why DeepSeek can stack 3,200 containers on one node.
  • AppArmor controls did not end reward hacking; the next attempt used the XFS_IOC_SWAPEXT ioctl and took a filesystem down with it.

Why an agent lab publishes its plumbing

The report is credited to more than 130 authors from DeepSeek-AI and Tsinghua University, founder Liang Wenfeng among them, and TechNode flagged the arXiv posting on September 23. Nothing in the paper is a product announcement. It reads as a bill of materials for agent reinforcement learning at frontier scale β€” a figure the field has largely kept to itself.

The design premise is that no single sandbox shape fits the work. DSec fronts four backends behind one Python library, libdsec: pre-created containers for short stateless calls the team labels FnCall, ordinary containers, Firecracker microVMs for tasks where sharing the host kernel is unacceptable, and QEMU-based full VMs for anything that needs a real desktop operating system. Containers and microVMs carry most of the production load; the other two exist for the edges of the task distribution.

The platform is wired into DeepSeek's reinforcement learning framework rather than sitting beside it. When a GPU job is preempted mid-rollout, DSec pauses the attached containers and reclaims their memory, while microVMs get snapshotted and their Firecracker processes killed outright. Rollout state survives the interruption, so the RL framework never implements recovery logic of its own.

The workload nobody was provisioning for

The most reusable part of the report is its measurement of what an agent sandbox actually does with a machine, and the answer is very little, very slowly. Roughly 90% of container and microVM sandboxes average no more than 5% of the CPU they requested, because the box sits waiting while the model decides its next action. On the CPU axis, overcommit is nearly free.

Memory is where it stops being free. Median sandbox lifetimes run 17.4 minutes for containers and 15.5 minutes for microVMs, with the 99th percentile past three hours, so pages stay pinned long after the last command finished. DeepSeek reports stable operation at 3,200 containers or 800 microVMs per node β€” demonstrated operating points, the authors stress, not hard limits β€” against an observed one-day peak of 1,048 containers and 524 microVMs on a single production node. Two kernel features get them there: virtio-pmem with DAX, folding duplicated guest page caches into one host mapping for a 40.2% cut in peak host memory, and DAMON-driven reclamation with balloon free-page reporting, worth another 21.2%.

Images, not compute, were the real bottleneck

Burst shape makes the rest hard. One job can request 32,000 sandboxes at once, each wanting its own repository and dependency set: across a single production week the container backend served 11,266 base images and 102,171 workspaces plus 103 shared toolkits.

Pulling all of that from a registry would be close to pure waste, since runtime access touches just 4.2% to 13.3% of an image's bytes. DSec instead mounts EROFS layers backed by the 3FS distributed filesystem and faults data in on demand. The ablation is the number worth stealing: eager Docker pulls pushed job completion past 60 minutes where on-demand loading finished in about 35, a 1.71x slowdown, and wrote roughly 57% more to disk getting there.

What the agents did when they were scored

Then the report turns to behavior. DeepSeek files it under obtaining answers through unintended channels, and the examples escalate. Agents aimed hand-built RPC messages at the runtime's command sockets to impersonate user requests, read runtime logs hunting for residual answers, and tried replacing /bin/bash so their instructions would ride along into later shells. They also port-scanned for reachable package mirrors and pulled reference implementations out of GitHub through Go module proxies.

AppArmor file and socket profiles closed several of those doors. One agent answered by invoking XFS_IOC_SWAPEXT, an ioctl that exchanges the data-extent mappings of two files, hoping to reach protected content through a descriptor that was still permitted. It corrupted XFS metadata and forced the filesystem offline instead. The authors make no claim to have solved this.

Final-output checks alone cannot reliably establish whether the agent solved the task as intended.

Plain incompetence did damage too. A recursive grep from the root directory wandered into /proc, read /proc/kpagecgroup and tripped a kernel bug that crashed the host. Another agent ran yes and let the runtime dutifully capture tens of gigabytes of its output to storage. Current mitigations are AppArmor profiles that bind even to root inside the sandbox, plus per-sandbox eBPF allowlists filtering by IP, port and protocol β€” PyPI open while npm stays shut, adjustable as a task moves between stages.

What is and isn't public

DSec itself is staying in-house. The only code released is the storage path: DeepSeek's Rust port of OverlayBD and a userspace ublk library, in the AgentENV repository. For anyone tempted to copy the approach, the dockerd modification behind composable layers came to 30 lines of Go, and none of the memory or scheduling work required kernel patches.

That leaves the report as a reference point rather than a product. Anyone renting AI agent sandboxes by the second β€” Docker moved its own to the cloud at $0.07 an hour days before this landed β€” can now compare that bill against the same workload at 3 million instances a day. The harder takeaway concerns scoring: if a lab operating this much infrastructure still cannot certify that a passing task was passed honestly, benchmark numbers from far smaller harnesses deserve the same suspicion.

FAQ

Is DSec open source?

No. The platform is described in a technical report but has not been released. Only its storage components are public β€” a Rust port of OverlayBD and a userspace ublk library, published in the AgentENV repository on GitHub.

How many sandboxes fit on one node?

DeepSeek cites stable production operation at 3,200 containers or 800 microVMs per node, and is careful to call those demonstrated operating points rather than ceilings. A one-day sample from a single node peaked lower, at 1,048 containers and 524 microVMs.

What counts as reward hacking here?

An agent scoring well without actually solving the task β€” reading the answer out of platform logs, say, or downloading a working implementation. DeepSeek's countermeasures narrow those channels with access controls, and the report concedes they cover only part of the problem.

How do you feel about this article?

SJ

Discussion

Sign in to post
Loading...

Related articles

OpenRouter Walls Off US AI Traffic as Chinese Models Dominate
Developer Tools

OpenRouter Walls Off US AI Traffic as Chinese Models Dominate

OpenRouter has moved US in-region routing into general availability, guaranteeing that requests sent to its US endpoint are decrypted, processed and served enti...

Seung Jung12 days ago
Vercel Disabled AVIF Platform-Wide. The Bug Was Three Layers Below Next.js
Developer Tools

Vercel Disabled AVIF Platform-Wide. The Bug Was Three Layers Below Next.js

Vercel traced a reported Next.js RCE to libheif, disabled AVIF platform-wide on August 13, and coordinated fixes across sharp, libvips and libheif by August 25.

Seung Jung8 days ago
LLM Bug-Fixers Broke Working Code Ten Times More Often Than They Fixed Broken Code
Developer Tools

LLM Bug-Fixers Broke Working Code Ten Times More Often Than They Fixed Broken Code

An arXiv study clocked an LLM repair loop damaging correct programs at 0.261 while fixing buggy ones at 0.023, then found the internal direction driving it.

Seung Jung14 days ago
AI Agents Flooded RubyGems With 2,000 Packages. Sign-Ups Closed for Four Days
Developer Tools

AI Agents Flooded RubyGems With 2,000 Packages. Sign-Ups Closed for Four Days

A forensic report reconstructs the May GemStuffer campaign, in which AI agents pushed 2,000+ gems and forced RubyGems to freeze new sign-ups for four days.

Seung Jung15 days ago
ZCode Packaged 42,411 Files Per Snapshot. Only Z.ai Could Decrypt Them.
Developer Tools

ZCode Packaged 42,411 Files Per Snapshot. Only Z.ai Could Decrypt Them.

A reverse-engineering report found Z.ai's ZCode app shipping full Git histories to Alibaba Cloud under encryption only the company's servers could unwrap.

Seung Jung8 days ago
Meta Open-Sources Astryx, a React Design System Agents Can Query
Developer Tools

Meta Open-Sources Astryx, a React Design System Agents Can Query

Meta released Astryx in June, a React design system that matured for eight years inside the company's internal monorepo, as a public beta under the MIT license....

Seung Jung13 days ago