An AI coding agent inside a sandbox writes a workspace file; a host tool outside the sandbox trusts that file and runs the command.

The Agent Stayed in the Sandbox. The Command Still Ran.

Most conversations I have about AI coding assistants in schools start with academic integrity. Will students turn in code they did not write? That question matters, but this summer’s security research raises a second one that district technology offices have spent less time on. What happens on a device when a coding agent reads a file it should not trust?

In July, Pillar Security published The Week of Sandbox Escapes, seven write-ups on Cursor, OpenAI’s Codex CLI, Google’s Gemini CLI, and Google’s Antigravity. Each of these tools runs its AI agent inside a sandbox meant to limit what the agent can touch. In most of the findings, the sandbox held. The agent never left. In Pillar’s words, it “only had to write something that a trusted component outside the sandbox would later run.”

Seven findings, one pattern

Read together, the write-ups describe the same move in different forms. The agent writes a file inside the project it is allowed to edit, and a program outside the sandbox, one the user already trusts, picks that file up and runs what it says.

  • A hook file (Cursor). The agent wrote a .claude/settings.local.json file containing a “Stop” hook, and Cursor’s hook engine ran the command when the agent’s turn ended. Tracked as CVE-2026-48124 and fixed in Cursor Desktop 3.0.0.
  • A renamed Git folder (Cursor). Blocked from editing .git/config, the agent created a Git directory under another name and planted a hook in it. Cursor’s Git extension ran git status, and Git ran the hook. Pillar reports it patched in 3.0.0.
  • A Python environment (Cursor). The agent modified a virtual environment’s interpreter, and Cursor’s unsandboxed Python extension executed it. Pillar reports it fixed, and Cursor’s advisory lists the fix in 3.1.2.
  • An allowlisted command (Codex CLI). git show sat on Codex’s list of safe commands that skip approval. The agent used it to write a setting into the Git configuration, and the next git diff ran an outside program. Patched in Codex CLI v0.95.0.
  • An editor task (Antigravity). The agent wrote a .vscode/tasks.json file set to run when the folder opens. The editor’s task runner fired the next time the project was opened.
  • The Docker socket (Codex CLI, Cursor, Gemini CLI). Agents with access to the Docker daemon could reach the user’s home directory through a privileged container. Cursor fixed its exposure. OpenAI called the report informational, and the Gemini CLI team pointed to its documentation.
  • A permissive sandbox profile (Antigravity). Antigravity’s macOS sandbox profile starts by allowing everything, and Pillar used the operating system’s app launcher to start a shell outside it.
Table of files an agent can write that another program will run, what ran each one, and the fix status Pillar Security reported in July 2026.

Google downgraded both Antigravity reports as difficult to exploit, and Pillar’s posts list no fix for either. Pillar describes the endpoint “as a set of trust handoffs, not a single process tree,” and that phrase is the most useful thing in the series for a school audience. A device is a set of programs that trust each other’s files, and the sandbox only covers one of them.

One detail deserves a second look. The Cursor hook finding used a configuration file named for a different product. Cursor accepted a .claude settings file from the workspace as its own hook configuration. As tools adopt each other’s conventions for convenience, the list of files that can trigger execution grows, and nobody owns the whole list.

The trigger can be a README

These findings matter for schools because of how the instructions reach the agent. Pillar notes that the steps in its Cursor demonstration “can be buried in a README, a copied setup guide, or a project note.” The Codex write-up adds a line every district should keep. “Model refusal is not a security control.” A model may decline a suspicious instruction some of the time, and a district cannot plan around “some of the time.”

Consider the ordinary ways code arrives on school devices, such as starter projects for a computer science unit, a repository from an online tutorial, or a script pulled from a forum to automate a task in the technology office. Any of these can carry text an agent will read and act on. Prompt injection stops being a question about whether a chatbot says something inappropriate. It becomes a question about whether a line in a project file can run a command on a staff or student device.

What a district can do this semester

None of these steps requires a new product. They are infrastructural decisions that technology offices already make for other software.

  1. Know what is installed, and which version. Cursor fixes for these findings landed in 3.0.0 and 3.1.2, so run 3.1.2 or later. Codex CLI’s landed in v0.95.0. For Antigravity, check Google’s current status before approving it for student devices.
  2. Treat files that can trigger execution as code. One of Pillar’s recommendations is to “treat workspace configuration that can trigger execution as sensitive.” In practice that means editor task and settings files, agent settings folders, Git configuration and hooks, and virtual environments get reviewed before anyone opens or runs the project.
  3. Keep agents away from privilege. Do not run coding agents under accounts that hold administrative credentials, and do not give them the Docker socket unless the work requires it. Pillar’s recommendation is to “restrict access to privileged local daemons unless explicitly needed.”
  4. Leave the approval prompts on. Several findings depended on settings that let commands run without asking, such as Antigravity’s “Always Proceed” mode (now called Turbo) or Codex’s allowlist. In a classroom, the approval prompt is part of the lesson.
  5. Ask vendors Pillar’s questions. “What can the agent write?” and “Which commands skip approval, and why?” belong in any procurement conversation about agentic tools.
Five checks before an AI agent goes on a school device: know the version, review config files, keep agents off admin, leave approvals on, ask the vendor what the agent can write.

A lesson hiding in the security report

For computer science teachers, this series is also curriculum. A README is documentation for a person and, now, instructions for an agent, and students can learn to read it both ways. The approval prompt is a small, deliberate point of friction where a student has to look at what the agent wants to run before it runs. That habit of slowing down at the handoff is the same one I argue for in classrooms generally, and here it doubles as security practice.

The more useful question for school leaders is which programs outside the sandbox trust the files an agent writes, and who in the district is responsible for knowing that list.

Sources and a note on the atlas

This post draws on the incident collection in my Breach and Breakout Atlas, part of my Emerging Tech Hub. The atlas was compiled with AI tools and is still being checked, so nothing in this post was taken from it. Every finding, version number and vendor response here comes from Pillar Security’s write-ups and the vendor advisories below. Fix statuses are as Pillar reported them in July 2026; check each vendor’s advisories for current status before acting on them.