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.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

When Copilot in VS Code cannot read a file, write a build artifact, or run a command, first determine whether the block is an approval decision, a sandbox rule, or a network restriction. These controls are independent: choosing Allow all or Autopilot changes approval behavior, but an enabled sandbox still limits the paths and processes an agent can use.

For current Copilot Agent Host sessions, open the session’s Permissions menu, check Sandboxing for terminal, run /sandbox policy, and then adjust the effective file-system paths on the machine where the agent actually runs. The procedure below covers local and remote sessions, read-only versus read/write access, overlapping rules, managed policies, and the common differences between Agent Host and Local or custom terminal harnesses.

Why Copilot cannot access your files in VS Code

VS Code separates two questions that are easy to confuse:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Approval: must you confirm a tool call, command, or edit before it runs?
  • Sandboxing: which file-system and network locations are technically available to the agent process?

An approval prompt can be accepted, declined, or automated. Sandboxing is an access boundary. If the sandbox denies a path, accepting the prompt does not grant access to that path. This is why Allow all can still be followed by a “permission denied,” “path not accessible,” or similar failure. VS Code documents approvals separately from sandbox controls in Manage approvals and permissions and Sandbox Copilot Agent Host sessions.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Before changing a setting, identify the execution harness. The Agent Host sandbox documentation applies to Copilot Agent Host’s built-in SDK tool implementation. A Local chat implementation or a custom terminal integration can have different behavior and settings. A remote Agent Host uses the connected host’s paths and policy, not necessarily the folders on your desktop.

Classify the failure before changing permissions

Use the symptom to choose the right branch. Widening file access will not fix a network block, and changing approvals will not remove a sandbox boundary.

What you see Likely control First check
Copilot asks you to approve a command or edit Approval policy Review the session approval choice and the command’s scope.
Reading or writing a specific path is denied even after approval File-system sandbox Run /sandbox policy and inspect path rules.
A command cannot reach a website or API Network sandbox Check outbound, local-network, and domain restrictions.
The path works locally but fails in a remote session Execution host mismatch Check the remote machine’s working directory and configuration.
A setting is visible but cannot be changed Organization-managed policy Look for a locked or enforced value and contact your administrator.

Check the active Agent Host sandbox

Open the session Permissions menu

  1. In the Copilot Agent Host session, open the session’s Permissions menu.
  2. Locate Sandboxing for terminal and note whether sandboxing is enabled for that session.
  3. Remember that a restored session can retain its previous choice. New sessions inherit the effective configuration on the execution host, subject to any managed restrictions.

This check tells you which session-level behavior is active; it does not by itself show every path rule.

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

Print the effective policy

Run this command in the Agent Host session:

/sandbox policy

The output exposes the effective permissions, runtime defaults, and organization-managed restrictions. Use it as the authority for what the current session can do instead of relying on a remembered user or workspace setting.

Confirm the execution host and working directory

Agent Host automatically grants read/write access to its current working directory. If Copilot is operating in your project folder, files under that directory normally do not need an extra path entry. An “outside the workspace” error usually means the requested location is elsewhere, or that the working directory is not the folder you assumed.

For a remote session, all paths are interpreted on the connected host. A path such as /home/dev/shared on a remote Linux machine is not the same location as a similarly named folder on your local computer. Verify the remote operating system, current directory, mounted drives, and spelling before adding rules.

Grant the minimum file-system access

Additional paths are configured through chat.agent.sandbox.fileSystem.userConfiguredPaths. The setting has separate lists for readwritePaths, readonlyPaths, and deniedPaths. Add only the location required for the task.

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

Read-only access for inspection

If Copilot only needs to inspect a shared source tree, place that directory in readonlyPaths. This permits reading while avoiding write access to the shared files.

Read/write access for generated output

If a build, test, or code-generation step must create files outside the working directory, put the specific output directory in readwritePaths. Prefer a project build folder over a broad parent such as an entire home directory.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Keep sensitive locations denied

Use deniedPaths for credentials, personal data, production configuration, or other locations the agent should never touch. A denial is useful even when a broader read/write rule exists, because denied access has higher precedence.

Understand overlapping-rule precedence

When one path appears in multiple lists, VS Code evaluates the rules in this order:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Denied access wins over every other rule.
  2. Read-only wins over read/write.
  3. Read/write applies only when neither of the stronger rules matches.

Thus, adding a directory to readwritePaths will not help if that same path, or a matching parent rule, remains in deniedPaths. Remove an accidental denial or narrow it only when you are authorized to change the policy.

Example configuration shape

The exact JSON placement depends on your VS Code settings editor, but the path lists use this structure:

{
  "chat.agent.sandbox.fileSystem.userConfiguredPaths": {
    "readwritePaths": ["/work/project/build"],
    "readonlyPaths": ["/work/shared-sources"],
    "deniedPaths": ["/work/project/secrets"]
  }
}

Replace the example paths with paths on the execution host. On Windows, use the path syntax expected by that host and avoid assuming that a local drive letter exists in a remote environment.

Why “Allow all” still blocks a command

Allow all and Autopilot control whether VS Code asks for confirmation. They do not switch off an enabled Agent Host sandbox. A command can therefore be approved and then rejected because it tries to read a denied directory, write to a read-only directory, or access a location outside the configured path grants.

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

The safe fix is to identify the exact operation and add the smallest matching path rule, not to grant unrestricted access. If the command also contacts a service, treat that as a separate network investigation.

Check the current Agent Host defaults, carefully

The Agent Host reference checked on October 11, 2026, lists these defaults. They can change with future VS Code releases, so compare them with the documentation for your installed version:

Setting Documented default What it controls
chat.agent.sandbox.enabled Off Whether the Agent Host sandbox is enabled.
chat.agent.sandbox.network.allowNetwork True General outbound network access.
chat.agent.sandbox.network.allowLocalNetwork False Access to local-network destinations.
chat.agent.sandbox.network.allowedDomains Empty Explicitly allowed domains when domain filtering is used.
chat.agent.sandbox.network.deniedDomains Empty Explicitly denied domains.
chat.agent.sandbox.fileSystem.userConfiguredPaths Empty path lists User-specified read/write, read-only, and denied locations.
chat.agent.sandbox.fileSystem.allowDevToolAccess True Automatic access to common developer tools, configuration, and caches.

Even with empty user-configured path lists, the working directory receives automatic read/write access. The allowDevToolAccess grant can include configuration, caches, registry tokens, and write access to shared build caches. Disabling it may reduce that broad convenience, but you may then need to add narrower paths explicitly. Weigh the security benefit against the tools your project requires before changing it.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Understand setting scope and session persistence

A value shown in the Settings editor is not always the value that governs a running agent. A restored Agent Host session can preserve its previous sandbox choice, while a newly created session receives the effective configuration of the execution host. User settings, workspace settings, session choices, and managed restrictions can therefore produce different results.

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

Use /sandbox policy after reopening a session or changing a setting. This catches a common mistake: editing a local workspace setting while the agent is running remotely, or assuming that a new session inherited a change made to an older one. If the policy output shows an organization restriction, treat that as authoritative rather than repeatedly changing local JSON.

Common path scenarios and the narrow fix

Scenario Recommended rule Reason
Reviewing a sibling source repository Add only that repository to readonlyPaths. Code review needs reads, not edits.
Writing generated documentation outside the project Add the specific documentation output folder to readwritePaths. Generation needs writes but not access to the parent tree.
Building into a shared cache Use the narrow cache directory and check whether developer-tool access already grants it. Avoid granting an entire user profile for one build cache.
Protecting credentials under a broadly granted parent Place the credential directory in deniedPaths. Denied rules override broader read/write rules.
Working through Remote SSH or another remote host Configure the path as it exists on that host. Local drive letters and mounts do not automatically carry over.

After each change, test a harmless operation first: list the directory, read one representative file, or create a disposable file in the output folder. Only then rerun a full build, migration, or deployment command.

Fix a request for a folder outside the workspace

  1. Ask which exact file or directory the task needs and whether it needs read-only or write access.
  2. Check whether the path is on the local or remote execution host.
  3. Run /sandbox policy to see whether an existing denial or read-only rule matches.
  4. Add the path to readonlyPaths for inspection, or readwritePaths for edits and generated files.
  5. Check that the path is not also covered by deniedPaths.
  6. Retry the smallest operation first, such as listing a directory or reading one file, before rerunning a destructive build or migration.

Do not make the entire home directory available as a first fix. Broad grants increase the amount of personal and credential data an agent process could read or alter.

Separate file-system errors from network errors

Agent Host file-system isolation and network isolation are separate controls. A script may be allowed to read a local configuration file yet be unable to call an API, or it may reach a domain while being unable to access a local service.

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

Outbound and domain restrictions

For a network failure, inspect allowNetwork, allowLocalNetwork, allowedDomains, and deniedDomains. Change only the setting that corresponds to the destination. Allowing local-network access is broader than allowing a single external domain, so do not enable it merely because an internet request failed.

Windows loopback and proxy cases

VS Code’s documented Windows proxy and domain-filtering configuration can require local-network access for the host’s loopback proxy. Enable local-network access only when that proxy scenario applies, and understand that it expands the reachable network surface. A normal file permission error does not justify this change.

When organization policy overrides your setting

Administrators can require sandboxing, restrict network access, and prevent users from bypassing those controls. A locked setting or a policy shown by /sandbox policy cannot be overridden safely with a local preference.

  • Record the denied path or destination, the session type, and the relevant policy output.
  • Ask the administrator to approve the narrowest required path or domain.
  • Do not copy policy values into a user setting in an attempt to override them.

If the work involves protected data, explain why read-only access is sufficient whenever possible. This gives an administrator a smaller, auditable change to approve.

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.
Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Agent Host versus Local and custom terminal sessions

Use the Agent Host instructions only when the session is actually running the Agent Host tool implementation. Local chat harnesses and custom terminal overrides may interpret settings differently, and some older settings are no longer honored by Agent Host.

Legacy platform-specific settings

The current Agent Host documentation says these legacy settings are ignored by Agent Host:

  • chat.agent.sandbox.fileSystem.linux
  • chat.agent.sandbox.fileSystem.mac
  • chat.agent.sandbox.fileSystem.windows

Do not add them to a new Agent Host configuration expecting them to grant access. If a Local or custom implementation documents its own controls, follow that harness’s documentation and verify the effective behavior in that session.

What to do when the error message is ambiguous

Some failures use the same words for different controls. “Permission denied” can mean a sandbox rule, an operating-system file permission, or an organization policy. Start with the effective Agent Host policy, then verify that the operating-system account running the host can access the path at all. If the policy grants access but the host account lacks native permissions, changing sandbox lists will not repair the operating-system problem.

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

Likewise, “outside workspace” does not necessarily mean the file is unsafe. It may simply be a legitimate shared source or generated-output directory that needs an explicit, narrowly scoped grant. Ask whether the task requires reading, writing, or network access before selecting a rule.

Is there a cost or product requirement?

There is no hardware accessory, repair utility, or unrelated commercial product required to fix these errors. The supported remedies are configuration, policy inspection, and—when controls are managed—an administrator’s approval. Keep the change focused on VS Code and Copilot settings rather than installing a third-party cleaner, antivirus exception, or permission tool.

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

A repeatable troubleshooting checklist

  1. Name the failed resource: capture the exact path, command, URL, or service that failed.
  2. Identify the harness: Agent Host, Local, or a custom terminal implementation.
  3. Identify the host: local machine or remote execution host.
  4. Classify the control: approval, file-system sandbox, network sandbox, operating-system permission, or managed policy.
  5. Inspect the session: open Permissions, review Sandboxing for terminal, and run /sandbox policy.
  6. Check automatic access: confirm the current working directory and whether developer-tool access is enabled.
  7. Apply the minimum rule: choose read-only or read/write and use the narrowest directory.
  8. Resolve precedence: remove an unintended denial before adding a weaker grant.
  9. Test safely: retry a non-destructive read or directory listing first.
  10. Escalate correctly: contact the administrator when the policy is locked or managed.

Security practices while troubleshooting

  • Grant a folder, not an entire disk or home directory.
  • Prefer readonlyPaths for source review and documentation lookup.
  • Keep secrets, token stores, production files, and personal records denied.
  • Review the implications of allowDevToolAccess, which can expose configuration, caches, registry tokens, and shared build-cache write access.
  • Use a remote host’s policy for a remote session; changing local paths will not protect or authorize files on that host.
  • After a temporary exception, remove it or narrow it when the task is complete.

For broader context on agent trust boundaries and secure configuration, see VS Code’s Understand trust and safety for AI agents and Secure AI-assisted development in VS Code.

Bottom line

Fix Copilot file-access errors by matching the remedy to the control that failed. Approval choices govern confirmation; the Agent Host sandbox governs which paths and networks are reachable. Inspect the effective policy, verify the execution host, use the working-directory grant when it is sufficient, and add only the required external path with the correct read-only or read/write level. If a denial is managed by your organization, the administrator—not another local setting—is the correct way to resolve it.

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

Frequently Asked Questions

Why does Copilot still fail after I choose Allow all?

Allow all changes confirmation behavior only. An enabled Agent Host sandbox can still deny a path, prevent writes to a read-only location, or block a network destination. Check Permissions, Sandboxing for terminal, and /sandbox policy.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

How do I let Copilot access a folder outside my workspace?

Confirm the folder exists on the execution host, then add it to readonlyPaths for inspection or readwritePaths for edits and generated files. Check that no matching deniedPaths rule overrides it, and test with a harmless read first.

Where does a remote Agent Host look for configured paths?

It applies path rules on the connected execution host. Configure the remote machine’s actual paths, mounts, and operating-system syntax; changing a path on your desktop does not grant access to the remote host.

What happens when a path is in more than one list?

Denied access has highest precedence, followed by read-only, then read/write. A read/write entry cannot override a matching denial, and it cannot make a read-only match writable.

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

Should I disable allowDevToolAccess?

Only after weighing the tradeoff. It can provide access to developer tools, configuration, caches, registry tokens, and shared build-cache writes. Disabling it narrows automatic access but may require explicit path entries for tools your project needs.

Why can I see a sandbox setting but not change it?

An organization may enforce sandboxing, network restrictions, or no-bypass rules. If the value is locked or appears as managed in /sandbox policy, ask the administrator for the narrowest path or domain exception.

Do I need to install another program or buy hardware to fix this?

No. These failures are resolved through VS Code/Copilot configuration, policy inspection, and administrator action when controls are managed. Avoid unrelated permission utilities or broad security exceptions.

Are the old Linux, macOS, and Windows sandbox settings still valid for Agent Host?

Current Agent Host documentation says chat.agent.sandbox.fileSystem.linux, .mac, and .windows are ignored by Agent Host. Local and custom terminal implementations can differ, so follow the harness-specific documentation.

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.

The Bottom Line

Separate approval prompts from sandbox boundaries, verify the execution host, inspect /sandbox policy, and grant only the smallest required path. Use read-only access whenever possible, remember that denied rules win, and involve an administrator when policy is managed.

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.