AI agents that write code, browse the web, or operate an app on your behalf don't just think โ they need somewhere to act. A recent technical writeup circulating among developers lays out how tools like Claude Code and other AI "agent" products rely on cloud-based virtual machines to actually execute the tasks they're given, and the explanation helps clarify why these tools behave, and cost, the way they do.
A virtual machine, or VM, is essentially a computer simulated inside another computer. When an AI agent needs to run code, click through an app, or test whether a script actually works, it can't do that safely on the AI company's shared servers or on your device without risk. So companies spin up isolated, disposable VMs โ sandboxes โ where the agent can execute real commands, install software, or navigate an interface, then get shut down once the task is done.
This is a meaningfully different setup from a standard chatbot. When you ask a chatbot a question, it generates text and stops. When you ask an agent to "fix this bug and run the tests," it needs an actual environment to run the tests in. That environment is the VM. The writeup focuses on how products like Claude Code (Anthropic's coding assistant) and mobile agent tools handle this, describing the layers of infrastructure โ spinning up machines, managing file systems, handling network access โ that sit between a user's prompt and a completed task.
None of this is entirely new. Cloud sandboxes have powered automated testing, CI/CD pipelines, and browser automation tools for over a decade. What's changed is the scale and purpose: instead of a human-written script running in a sandbox, an AI model is now making real-time decisions inside one, often across many steps, with the VM cost accumulating the whole time.