Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › Agent Host

VS Code Copilot Sandboxing vs Dev Containers: Which Should You Use?

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Copilot Agent Host sandboxing when your main goal is to restrict agent-run shell processes on an existing host. Use a Dev Container when the agent and workspace tools need to run inside a project-defined container with its own dependencies. They solve different problems and can be combined. Neither one, by itself, is a complete isolation or security guarantee.

The practical difference

Copilot Agent Host sandboxing changes what supported processes may access. A Dev Container changes where the Agent Host and workspace tools run. That distinction determines the right choice more reliably than the word “sandbox.”

As an Amazon Associate I earn from qualifying purchases.

Option What changes Best fit Important limitation
Agent Host sandboxing Restricts filesystem and network access for supported terminal processes and their child processes on the execution host. Agent Host-managed MCP servers and language servers can also be covered when the relevant settings are active. You want configurable restrictions without moving the whole project environment into a container. It is not a virtual machine or user-account boundary, does not cover built-in read, edit, and write tools, and allows outbound network access by default.
Dev Container Runs the Agent Host and workspace tools inside the project’s configured container. You want the agent to use the same containerized tools, runtimes, and dependencies as the project. Mounts, permissions, and networking determine what the container can still reach. The VS Code Agent Host workflow is experimental.
Both Combines the container execution environment with sandbox controls for processes covered by the sandbox. You need reproducible project tooling plus an additional restriction layer. You must review both configurations, along with approvals, secrets, mounts, and network access.

What Agent Host sandboxing actually covers

Process-level restrictions

The sandbox is primarily a control for operating-system processes started by an Agent Host session. That includes shell commands and child processes such as compilers, package managers, scripts, and test runners. The Agent Host can also sandbox MCP servers and language servers that it launches or manages when the corresponding settings are enabled.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Built-in agent tools that read, edit, or write files without starting an operating-system process are outside this process sandbox. They use VS Code’s separate permission system. Consequently, enabling the sandbox does not mean that every action an agent can take is governed by one identical boundary.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Settings and permission levels are separate

The documented setting chat.agent.sandbox.enabled controls whether Agent Host sandboxing is enabled. Its documented default is off. Permission choices such as “Allow all” do not remove sandbox restrictions from processes that are covered by the sandbox.

Depending on your fallback settings, VS Code may offer to run a command without the sandbox after confirmation. Treat that as an explicit exception, not as normal operation. If your policy is “never run this task outside the sandbox,” disable or reject that fallback rather than approving it reflexively.

Network access is allowed by default

The documented chat.agent.sandbox.network.allowNetwork default is true. Turning on sandboxing therefore does not automatically make an agent offline. Configure allowed or denied domains and local-network access according to the task. The exact filtering behavior depends on the platform and terminal implementation, so do not assume that every session exposes identical domain controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Platform prerequisites

Execution platform Documented prerequisite
macOS No additional prerequisite is listed.
Linux and WSL2 bubblewrap and socat.
Windows The applicable September 8, 2026 Windows security update listed in the Agent Host sandbox documentation.
WSL1 Unsupported.

For a connected or remote Agent Host, install and verify prerequisites on the machine that executes the processes. A correctly configured client computer does not compensate for missing requirements on the remote host.

What the sandbox is not

Sandboxing is an added restriction layer, not a virtual machine, a separate user account, or a replacement for endpoint security. Isolation can be weakened by explicitly injected credentials, extra allowed paths, developer-tool access, network permissions, or an approved unsandboxed fallback. Keep secrets out of the workspace whenever possible and grant only the access the task needs.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

What a Dev Container changes

The execution location

A Dev Container places the Agent Host and workspace tools inside the project’s configured container on the local machine or a supported connected host. This is different from terminal sandboxing, which restricts process access, and from a Git worktree, which separates code changes.

The container boundary is defined by its configuration. A bind mount can expose a host directory; a broad permission setting can grant more authority; and container networking can provide access to services beyond the container. “Inside a container” is therefore not the same as “cut off from the host and internet.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Requirements for the VS Code Agent Host workflow

  • Docker must be installed and running on the machine that contains the project folder.
  • The project must include a Dev Container configuration at .devcontainer/devcontainer.json or .devcontainer.json.
  • The workflow is available in the desktop Agents window, is rolling out gradually, and is marked experimental in the documentation reviewed on October 13, 2026.
  • For a remote project folder, Docker must run on the remote host and the connection must support Dev Container execution.
  • The session works directly in the container workspace and cannot be combined with New Worktree.

Because the workflow is experimental, its interface and availability may change or be removed. Use it where the reproducible container environment is worth accepting that product risk.

Which option should you choose?

Choose Agent Host sandboxing when

  • The project already works on the host and you mainly need to constrain shell commands, scripts, tests, or package managers.
  • You want to keep the host’s existing editor, SDKs, credentials, and device integrations instead of rebuilding them in a container.
  • You need to tune filesystem and network permissions per task.
  • You are comfortable auditing which built-in tools remain outside the process sandbox.

Choose a Dev Container when

  • The repository already defines its toolchain, runtime, and dependencies in a Dev Container.
  • Different contributors or agents need a consistent environment.
  • Host-installed versions are unreliable, conflicting, or difficult to reproduce.
  • You want the Agent Host and workspace tools to execute in the same project-specific environment.

Use both when

  • The project’s container is the correct development environment and the task also needs process-level filesystem or network restrictions.
  • You are working with code that can execute install scripts, build hooks, or tests and want defense in depth.
  • You are prepared to inspect container mounts and network settings as well as sandbox settings.

Do not choose based on the word “secure” alone

Neither option automatically protects you from a malicious repository, an over-broad mount, an exposed token, an approved destructive command, or an agent-generated change that is merged without review. The meaningful decision is which boundary you need, which actions remain outside it, and how much configuration you are willing to maintain.

Configure Agent Host sandboxing on an existing project

  1. Check the execution host. Identify whether the Agent Host runs locally or on a connected machine. Install the platform prerequisite listed above on that execution host. Do not treat WSL1 as supported.
  2. Open VS Code Settings. Search for chat.agent.sandbox.enabled and turn it on. Confirm that the setting applies to the session and host you intend to use.
  3. Define filesystem access. Allow only the workspace paths and tool directories required by the task. Avoid adding a broad home-directory or system-directory allowance merely to silence an access error.
  4. Configure network policy. Review chat.agent.sandbox.network.allowNetwork. If internet access is unnecessary, disable it. If it is required, restrict domains and decide separately whether local-network access is acceptable.
  5. Review MCP and language-server coverage. Ensure the settings that govern Agent Host-managed MCP servers and language servers match your policy. A separately launched process may not receive the same controls.
  6. Run a harmless verification. Ask the agent to perform a read-only command that should be allowed and another that should be denied. Confirm the observed behavior before allowing package installation, deployment, or destructive scripts.
  7. Handle exceptions deliberately. If VS Code offers an unsandboxed fallback, approve it only when you understand the command, the path and network access it needs, and the consequences of running it outside the sandbox.

Remember that built-in read, edit, and write operations follow VS Code’s permission model rather than the operating-system process sandbox. Keep approval prompts enabled for sensitive actions and inspect changes after the run.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Run an Agent Host session in a Dev Container

  1. Inspect the repository first. Before trusting the workspace, review the Dev Container files, Dockerfile or image reference, lifecycle commands, mounts, forwarded ports, environment variables, and any scripts that run during creation.
  2. Install and start Docker. Docker must be running on the machine that owns the project folder. For a remote folder, perform this step on the remote host.
  3. Provide the configuration. Add or verify .devcontainer/devcontainer.json or .devcontainer.json. Define the project’s runtime, extensions, tools, mounts, users, and network behavior explicitly.
  4. Open the desktop Agents window. Select the Dev Container Agent Host option if it is available for your rollout. The feature is experimental and may not appear for every installation.
  5. Build or reopen in the container. Wait for the container to build, then verify that the terminal, language server, package manager, and test runner are operating inside the intended container.
  6. Check the effective boundary. Test which host folders are mounted, which user the tools run as, which services are reachable, and whether outbound and local-network connections work.
  7. Keep worktree expectations clear. This Agent Host session works directly in the container workspace and cannot be combined with New Worktree. Use a separate workflow if an isolated Git worktree is required.

Workspace Trust is a separate decision

VS Code opens unfamiliar workspaces in Restricted Mode. Restricted Mode limits execution-capable features and disables agents until the workspace is trusted. This decision is independent of whether a particular shell process is sandboxed or whether tools run in a container.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an unfamiliar repository, start in Restricted Mode and inspect its container configuration, tasks, launch configurations, scripts, dependency hooks, and MCP settings. Grant trust only after you understand what the project will ask VS Code and the agent to execute.

Trust does not make generated code safe, and sandboxing does not make an untrusted project trustworthy. Keep approvals scoped to the session, protect sensitive files, configure network access deliberately, and review MCP server configuration before enabling it.

“Stopping a request or restoring workspace files doesn’t reverse completed terminal commands, network requests, deployments, or changes to external services.”

— Visual Studio Code trust and safety documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

The same documentation advises: “Always review AI-generated code before committing.” Treat cancellation as a way to stop future work, not as a rollback for effects that already occurred.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How the combined setup behaves

When an Agent Host runs in a Dev Container with sandboxing enabled, the container determines the execution environment while the sandbox applies to the supported processes it covers. A command can therefore be inside the container yet still be restricted by sandbox rules; conversely, a built-in file edit can remain governed by VS Code permissions rather than the process sandbox.

Audit both layers:

  • Container layer: image provenance, container user, bind mounts, mounted secrets, capabilities, forwarded ports, DNS, outbound networking, and lifecycle scripts.
  • Sandbox layer: enabled state, allowed paths, network policy, local-network access, MCP and language-server coverage, and unsandboxed fallback.
  • Workspace layer: trust state, approval prompts, sensitive-file protections, task and debug configurations, and review of generated diffs.

Adding layers improves control only when their settings agree. A container with a host-wide writable mount or an unrestricted network can defeat the isolation you expected; a strict process sandbox cannot compensate for credentials intentionally exposed to the container.

Common scenarios

Reviewed application repository, host tooling already installed

Use Agent Host sandboxing. Keep the workspace trusted only after reviewing its execution files, restrict filesystem access to the project and required caches, and disable or narrow network access unless the task needs downloads or service calls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Repository with a maintained development container

Use the Dev Container workflow if its experimental status is acceptable. Verify mounts and network access before starting an agent session. Add sandbox controls when shell processes need an additional restriction layer.

Unknown repository received from another party

Open it in Restricted Mode first. Do not start an agent merely because a container configuration exists; container lifecycle commands and mounts are executable configuration that require review. Trust the workspace only after inspection.

Build or test requires internet access

Prefer a narrowly allowed network policy over leaving the default unrestricted. Identify the package registries, artifact hosts, or service endpoints required by the task, and remember that platform implementations may differ in how domain filtering is enforced.

Task handles credentials or production services

Do not rely on either feature as a complete secret or production-safety boundary. Use the minimum credential scope, avoid mounting credential stores unnecessarily, require confirmation for deployments and external-service changes, and inspect the resulting commands and diffs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting and failure modes

A command cannot access a file

First determine whether the command is running in the host or container and whether the path is inside an allowed sandbox location or mounted container path. Add the smallest required path rather than granting an entire parent directory. If the operation is a built-in file tool, inspect VS Code’s separate permission prompt instead of changing sandbox settings.

Network-dependent installation fails

Check chat.agent.sandbox.network.allowNetwork, allowed domains, local-network policy, and container networking. A package manager may contact more than one host, and a container can have a different DNS or proxy configuration from the host.

The Dev Container Agent Host option is missing

Confirm that you are using the desktop Agents window, Docker is installed and running on the project machine, the project contains a recognized Dev Container configuration, and the feature has reached your rollout. Because the workflow is experimental, availability can change between releases.

The remote session behaves differently from the local one

Recheck prerequisites, Docker, mounts, credentials, and network policy on the remote execution host. Client-side settings do not guarantee that the connected host has the same tools or security configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An agent changed files despite sandbox settings

Check whether the change came from a built-in read, edit, or write tool, which is outside the process sandbox. Review VS Code permissions, workspace trust, approvals, and the generated diff. Stopping the session does not undo completed commands or external effects.

A practical preflight checklist

  • Identify where the Agent Host will execute: local host, remote host, or Dev Container.
  • Review the repository before granting workspace trust.
  • Decide which filesystem paths and network destinations the task genuinely needs.
  • Enable chat.agent.sandbox.enabled when process restrictions are appropriate.
  • Review the default network setting instead of assuming the sandbox is offline.
  • Confirm platform prerequisites on the execution host.
  • For containers, inspect mounts, users, capabilities, ports, secrets, and lifecycle commands.
  • Keep approval prompts and sensitive-file protections enabled for high-impact work.
  • Test allowed and denied actions with harmless commands.
  • Review every generated diff and command result before committing, deploying, or changing an external service.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Agent HostDev Containersdeveloper securityGitHub CopilotVS CodeWorkspace Trust

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.