Artificial Intelligence

Agent Sandboxing Boosts Security

A new secure agent sandbox limits AI agent actions, reducing risk and interruptions by 40% across macOS, Linux, and Windows.

StartupHub.ai Staff

By StartupHub.ai Staff, reviewed by Daniel Singer, Editor

2 min read

Agent Sandboxing Boosts Security

Key facts

  • Agent sandboxing limits local agent capabilities to reduce risk without constant human oversight.
  • New sandboxing implementation on macOS, Linux, and Windows reduces agent interruptions by 40%.
  • Agents are being trained to understand and request sandbox escalations when necessary.
Contents(3)

Coding agents are becoming adept at executing terminal commands, but this power comes with significant risk. Unsupervised agents can corrupt data, deploy faulty code, or expose sensitive information. While human approval gates these actions, approval fatigue renders this safeguard ineffective over time.

To address this, a secure agent sandbox has been rolled out across macOS, Linux, and Windows. This controlled environment allows agents to operate freely, only prompting for approval when they need to perform actions outside its boundaries, such as accessing the internet. This reduces interruptions by 40%, saving users considerable time.

Sandbox Goals

The primary objective was to eliminate interruptions while enhancing security. The aim is to grant agents sufficient operational freedom without exposing systems to undue risk. Striking this balance is challenging, as many development tasks require elevated privileges.

A usable sandbox necessitates navigating trade-offs between security and functionality, respecting each operating system's limitations. The implementation provides a uniform API across platforms, leveraging distinct sandboxing primitives unique to macOS, Linux, and Windows.

Implementation Details

On macOS, the Seatbelt framework, despite being deprecated, was chosen for its robust subprocess tree containment and fine-grained permission control. Policies are dynamically generated based on user settings and workspace configurations.

Linux employs Landlock and seccomp. Seccomp blocks risky system calls, while Landlock restricts filesystem access. Ignored files are made inaccessible by mapping them into an overlay filesystem and overwriting them with Landlocked copies.

Windows utilizes WSL2 to run the Linux sandbox. A native Windows sandbox is under development, as current primitives are largely browser-centric and unsuitable for general developer tools.

Teaching Agents Sandbox Awareness

For agents to effectively use the sandbox, they must anticipate command success within its constraints and know when to request elevated permissions. This required updating the agent harness to inform agents about sandbox limitations, including filesystem, git, and network access, and how to escalate privileges.

Initial testing revealed agents often retried commands that failed due to sandbox restrictions. To mitigate this, Shell tool results now explicitly state the sandbox constraint causing failure and suggest escalating permissions. This has led to more graceful failure recovery and improved offline evaluation performance.

The sandbox has seen a third of requests on supported platforms, with significant adoption by enterprise clients. As agents increasingly interact with production systems, defining execution boundaries is critical. Future developments include agents trained specifically for sandbox environments, enabling them to write scripts and programs directly.

TopicsAIDeveloper ToolsSecuritymacOSLinuxWindowsWSL2Landlock

StartupHub.ai StaffDaniel SingerWritten by StartupHub.ai Staff, Editorial teamReviewed by Daniel Singer, EditorAbout

StartupHub.ai Staff, Editorial team

The staff writers of StartupHub.ai, ranging from investment analysts to avid AI tool users, early adopters and critical enthusiasts. Backgrounds span engineering, business and the arts. We hold every piece to rigorous standards of research and review.

Daniel Singer, Editor

Daniel Singer is an AI expert who has been writing about, covering and building AI technology since 2018.

More from Daniel Singer

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute.

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.