VS Code Gives AI Agents Browser Control
The latest VS Code update (v1.110) now gives AI agents native control over a web browser directly inside the editor. Agents can now open pages, read content, interact with elements, and even execute Playwright scripts without external middleware. This is a major step toward automating complex coding and testing workflows entirely within the IDE.
This move replaces the previous reliance on external Model Context Protocol (MCP) tools for browser operations, which created a fragmented user experience. By making browser access a native function, VS Code eliminates inconsistent implementations and the inefficiency of switching between the editor, browser, and AI chat. The integration is powered by Playwright, allowing agents to not only view web pages but also to execute test scripts directly within the IDE. This gives the AI continuous visibility into the browser's state, including real-time console errors and warnings, a significant step up from single-snapshot integrations. To support these more complex, long-running tasks, the update introduces several new features for agent management. A new Agent Debug Panel provides real-time visibility into tool calls and session flows, which were previously opaque to developers. This allows for more precise troubleshooting of an agent's reasoning process. For longer interactions where an agent might lose its train of thought, two new features have been added: context compaction and session forking. Compaction, which can be triggered manually with the `/compact` command, summarizes the conversation to free up the context window. The `/fork` command creates a new, independent session that inherits the conversation history, allowing developers to explore alternative solutions without losing their original context.