# VS Code 1.141 Unifies GitHub Copilot and OpenAI Codex Sessions With OS Agent Sandboxing

Microsoft has rolled out Visual Studio Code 1.141, transforming its flagship editor into a unified command center for multi-agent software engineering by bridging local session histories across GitHub Copilot, the standalone Copilot CLI, the ChatGPT desktop app, and the OpenAI Codex CLI—while introducing operating-system-level file and network sandboxing (`chat.agent.sandbox.enabled`) across Windows, macOS, and Linux.

Until this release, developers who kicked off a repository refactoring task inside the terminal using OpenAI's Codex CLI or the GitHub Copilot CLI were locked into that interface; moving into the full VS Code IDE to inspect diffs meant starting a fresh conversation and losing the agent's accumulated reasoning context. With VS Code 1.141, any local session initiated in the Copilot CLI, standalone GitHub Copilot app, ChatGPT app, or Codex CLI automatically populates inside the VS Code Agents window after the first request.

Engineers can click into an active CLI or ChatGPT conversation inside VS Code, inspect file changes with full IDE diff tooling, and even switch to a GitHub Copilot model inside the same thread to keep working if they hit a ChatGPT usage cap. To prevent race conditions or corrupted file states, VS Code enforces a single-writer lock: only one application can transmit prompts to a shared conversation at a time, prompting the developer to close the external CLI or ChatGPT tab before taking over the thread inside the editor.

Under the hood, Microsoft re-architected the Copilot execution runtime around a dedicated agent host process speaking the Agent Host Protocol (AHP) and powered by the Copilot SDK. Because the AHP process runs independently of a single UI window, developers can attach multiple VS Code windows to the same running agent session, arrange parallel agents in a resizable horizontal or vertical split-pane grid, monitor background shell commands via a dedicated Background Shells indicator, and run the new `Chat: Open Worktree Cleanup` command to reclaim gigabytes of disk space consumed by stale Git worktrees from merged pull requests.

As detailed in [Visual Studio Magazine's technical breakdown of VS Code 1.141](https://visualstudiomagazine.com/articles/2026/10/13/vs-code-1-141-brings-copilot-codex-sessions-together-tightens-ai-agent-security.aspx), the update also delivers critical enterprise security and authentication upgrades: enabling `chat.agent.sandbox.enabled` automatically sandboxes terminal commands, local Model Context Protocol (MCP) servers, and language servers at the OS level, while the new `github-enterprise.uris` setting finally allows developers to authenticate to multiple GitHub Enterprise Server and GHE.com instances simultaneously.

<a aria-hidden="true" id="executive-fast-facts"></a>  Fast Facts

- **Release &amp; Version**: Visual Studio Code 1.141 by Microsoft, expanding the IDE's native Agents window and enterprise governance controls.
- **Cross-App Session Continuity**: Automatically syncs local conversations started in GitHub Copilot CLI, standalone Copilot app, ChatGPT app, and OpenAI Codex CLI directly into VS Code (with single-writer lock protection).
- **Agent Host Protocol (AHP)**: New Copilot SDK harness runs in a dedicated process, allowing multi-window session attachment, split-pane session grids, and live steering/cancellation of delegated sub-agent tasks.
- **OS-Level Agent Sandboxing**: Controlled via `chat.agent.sandbox.enabled` across Windows, macOS, Linux, and remote SSH hosts; restricts agent file/network access and sandboxes local MCP and language servers by default.
- **Enterprise &amp; Disk Hygiene**: Adds `Chat: Open Worktree Cleanup` to purge orphaned Git worktrees and `github-enterprise.uris` for multi-instance GitHub Enterprise authentication.

## VS Code 1.141 Agentic Architecture &amp; Security Feature Matrix

| Feature / Setting Name | Scope &amp; Supported Platforms | Technical Behavior in VS Code 1.141 | Enterprise Developer Benefit |
|---|---|---|---|
| **Unified Copilot &amp; Codex Sessions** | Copilot CLI/App, ChatGPT App, Codex CLI | Auto-discovers local threads after 1st turn; enforces single-app write lock | Seamless CLI-to-IDE handoff &amp; Copilot fallback on ChatGPT cap |
| **`chat.agent.sandbox.enabled`** | Windows, macOS, Linux &amp; Remote Hosts | Restricts terminal file/network access; sandboxes local MCP &amp; LSP servers | Mitigates prompt injection and untrusted dependency execution |
| **Agent Host Protocol (AHP)** | Copilot SDK Dedicated Host Process | Decouples agent state from editor window; supports multi-window attach | Persistent background agents &amp; resizable split-pane session grids |
| **`Chat: Open Worktree Cleanup`** | Local Git Repositories &amp; Worktrees | Audits disk usage of agent Git worktrees; auto-cleans merged PR worktrees | Reclaims tens of gigabytes of SSD space while protecting pinned tasks |
| **`github-enterprise.uris`** | GitHub Enterprise Server + GHE.com | Accepts array of enterprise URIs in a single VS Code window | Solves split GHE.com (Copilot) vs. on-prem GHE Server (code) auth |

## Why Local MCP Sandboxing and Git Worktree Cleanup Matter in Production

Two seemingly mundane features in VS Code 1.141 solve major day-to-day pain points for engineering teams running multiple parallel coding agents. First, every time an autonomous coding agent spins up an isolated task branch, it typically creates a separate Git worktree containing a full checkout of the working tree and build artifacts. After a week of running 10 to 20 parallel Copilot or Codex sessions per day, developers routinely discover 50GB to 150GB of orphaned worktrees clogging their laptop SSDs. Automating cleanup when pull requests merge (`Chat: Open Worktree Cleanup`) removes that hidden storage tax.

Second, as developers install dozens of third-party Model Context Protocol (MCP) servers to give agents access to databases, Jira, and cloud CLIs, a single malicious prompt injected via an issue description or README file can trick an unsandboxed local MCP server into reading `~/.ssh` or exfiltrating environment variables. By sandboxing locally launched MCP servers and terminal shells by default when `chat.agent.sandbox.enabled` is active—and giving IT administrators preview managed policies to lock sandboxing on—VS Code 1.141 brings zero-trust boundaries to local developer machines.

### The 4-Step Enterprise Implementation Playbook

1. **Enforce `chat.agent.sandbox.enabled` Across Developer Endpoints via MDM**: Use VS Code managed enterprise policies to turn on `chat.agent.sandbox.enabled` by default and prevent bypass on corporate Windows, macOS, and Linux laptops, ensuring all agent terminal commands and local MCP servers run inside restricted OS sandboxes.
2. **Configure `github-enterprise.uris` for Hybrid Cloud/On-Premises Engineering Teams**: If your organization licenses GitHub Copilot through cloud `GHE.com` while hosting proprietary source repositories on a self-hosted GitHub Enterprise Server instance, push the new multi-URI array setting so engineers no longer have to juggle separate editor profiles.
3. **Enable Automated Git Worktree Cleanup on Pull Request Merge**: Instruct developers to run `Chat: Open Worktree Cleanup` immediately after upgrading to VS Code 1.141 to purge gigabytes of stale agent worktrees, and enable the setting to auto-delete worktrees once their associated PRs are merged.
4. **Use Cross-App Session Handoff to Avoid Idle Token Caps**: Train engineers who hit rate limits during heavy OpenAI Codex CLI or ChatGPT desktop debugging sprints to open the synced session inside the VS Code 1.141 Agents window and switch the model selector to their enterprise GitHub Copilot entitlement without losing conversation context.

  Next Steps

1. Update Visual Studio Code to version `1.141` and enable `"chat.agent.sandbox.enabled": true` in your user or organization settings JSON.
2. Run `Chat: Open Worktree Cleanup` from the Command Palette to inspect and reclaim disk space occupied by inactive agent Git worktrees.
3. Test the new Agent Customizations editor and Background Shells indicator while running a multi-pane Copilot and Codex session grid.