AI news

Claude Cage: Using a VM and Permission Prompts to Bound Claude's Host Access

By SeekLumen0 viewsSource: SeekLumen
Claude Cage: Using a VM and permission prompts to bound Claude's host access

Community project Claude Cage puts Claude Code and Claude Desktop in a Debian VM and exposes host capabilities through MCP plugins, with per-call approval and revocation. It explicitly offers no guarantee against platform account restrictions.

On November 22, a project called Claude Cage released v0.2.0.

The repository was only created on October 31. In 24 days, it had collected 8,176 stars, 948 forks, and code contributions from 35 people.

What it does sounds a little strange: it locks the official Claude Code and Claude Desktop inside a Debian 13 virtual machine.

Article illustration

The unsafe part is the shell around it

The first design principle in the project's README puts it this way: Claude itself is safe, but the shell it runs in is not.

Claude Code executes commands in your terminal. Claude Desktop reads and writes your files. The built-in browser encounters email, web pages, and all kinds of signals from its environment. Running all three together on the host is like handing your house keys to an intern who might misread the instructions at any moment.

Is there another way? The author lays out two approaches.

One is a reverse proxy: bring Claude out of a remote server and run it directly on your host. The other is remote control: put Claude in a controlled environment and let it operate the host remotely. He chose the latter for a straightforward reason: every call that leaves the environment has an explicit permission boundary and requires user approval, which he considers safer than exposing SSH directly.

A real virtual machine, rather than a container

How do you build the cage? The project uses a complete virtual machine instead of a Docker container.

It builds on the open-source project agent-vm, uses Lima to manage the virtual machine, and runs Debian 13 inside. The same environment is installed on macOS, Windows, and Linux, with identical tools and operating methods, so there is no need to maintain a collection of guests running different systems.

The workbench puts four things in one window: a terminal running Claude Code, a browser for signing in and previewing services, code-server as an editor for inspecting changes, and the official Claude Desktop.

The display is streamed through noVNC, while sshocker handles file sharing between the host and the VM. The installer includes the workbench and runtime, so Go, Node.js, and Docker do not need to be installed first.

A plugin is MCP plus an extension

Once the cage is built, a new question immediately arises: how can Claude inside it use things on your computer?

The answer is MCP. The project splits plugins into two halves: an MCP server that provides Claude with tools, and an extension page that can add a sandboxed page to the workbench sidebar, whether a status panel, console, or workflow interface.

Plugins fall into two categories according to where they run. Host plugins run on your computer with your user permissions, outside the protection of isolation; they can control the screen, keyboard, and mouse, read and write Office documents, and interact with Blender. Guest plugins run inside the environment and deal only with its files and browser. They do not require approval unless they cross that boundary.

Article illustration

How granular are the access controls?

This is the part of the project I find most worth examining. It goes beyond empty talk about whether AI should be trusted and spells out the rules one by one.

By default, a host plugin displays a confirmation dialog for every call, showing the plugin name, tool name, and raw arguments. You can deny it, allow it just once, or select 'Always allow.' If the dialog receives no response for two minutes, the call is denied.

If the arguments exceed 4,000 bytes or contain control characters or invisible formatting characters, the call is denied even if you selected 'Always allow.' The reason is practical: the dialog cannot show you the full contents of that call.

After a plugin upgrade, any newly declared permission you have not previously approved automatically invalidates the old authorization, and you are asked again. You can revoke authorization at any time on the plugin's details page; doing so immediately restores per-call approval.

Article illustration

It does not even trust itself

The project comes with two plugins whose permission boundaries are particularly interesting.

One is called Plugin Workshop. If you tell Claude inside the environment, 'Help me read and write Excel files,' it first searches the plugin marketplace. It uses an existing plugin if one is available; otherwise, it writes one on the spot according to the specification. But it can only submit a read-only draft after writing it. It has no permission to write anything to the host's plugin directory.

You must open the draft yourself, review the source file by file, check the permissions, select where it will run, and then click 'Install and reload.' Overwriting an old version forcibly revokes its previous 'Always allow' authorization.

The other is called use-cage, which lets Claude help adjust Cage's own settings. It can change allowlisted options such as the theme, font size, colors, and 12/24-hour clock. But adding host shared directories, changing network egress rules, changing plugin authorizations, or touching account passwords and encryption keys is blocked in the code. Only you can make those changes in the workbench.

What gives a community project the right to decide which operations AI cannot perform for users? Its approach keeps the decision in your hands throughout: grant what can be granted, explain it before granting it, and require your approval even after the explanation.

It puts the uncomfortable caveats on the front page

Few projects put the following points in a prominent place in their README.

Changes and deletions in shared projects directly affect the original files on the host, including through git operations. Be sure to protect them with version control or backups.

Projects under the same configuration share one Debian environment, including its tools, accounts, and filesystem. Projects are not independently isolated from one another.

The built-in checks display the current configuration and sampled evidence. They cannot guarantee that an account will avoid platform restrictions, and they cannot replace a complete virtualization security audit.

That last point deserves particular attention. The project does not promise 'absolute security'; it explains what it can and cannot see. For security tools, that restraint is more trustworthy than any slogan.

Why are so many projects like this appearing?

Since MCP arrived, the tools agents can call have expanded from reading and writing files to controlling screens, operating Blender, sending email, and placing and paying for orders. Capabilities have grown extremely quickly; permission models have not kept up.

Building a cage for an agent has therefore become a serious engineering task. The cage must be lightweight enough that people will accept installing a VM just to use AI, robust enough to provide meaningful protection, and equipped with an access-controlled door. Otherwise, all its capabilities remain locked inside and the cage becomes a mere ornament.

Its 8,176 stars in 24 days suggest that this pain point is real.

Article illustration

Project: https://github.com/Lee-xeo/Claude-Cage

Plugin marketplace: https://github.com/Lee-xeo/cage-plugins

Its underlying project, agent-vm: https://github.com/sylvinus/agent-vm

The project is licensed under MIT and is not affiliated with Anthropic.

This article is from SeekLumen, by SeekLumen.

Related topics

After reading

Join the AINRK community

Read how to join the community and connect with people working in AI.

Community information (opens in a new tab)