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

Use two controls together: a sandbox that technically limits files, processes, and network access, plus an approval policy that decides when the agent must ask you. For a code review, start Codex in read-only mode with codex --sandbox read-only --ask-for-approval on-request. For implementation, use workspace-write with the same approval setting, then add explicit path, network, and credential restrictions. Treat full-access or no-prompt modes as exceptions for disposable environments, not as a normal developer setting.

These controls answer different risks. An approval prompt can stop an individual command, but it does not reduce what an already-approved process can read. A sandbox can deny access even when a tool is allowed to run, but it is not a virtual machine or a replacement for endpoint security. The safest setup gives the agent only the project paths, commands, network destinations, and credentials required for the current task.

What is the difference between approval prompts and sandboxing?

Approvals are a decision point; sandboxing is a technical boundary. Configure both rather than treating one as a substitute for the other.

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

Approval policies decide when execution pauses

An approval policy can require confirmation before a terminal command, a tool call, a URL request, or an action outside the current workspace. Depending on the product and version, policies may be per-command, rule-based, or automatic for commands judged safe. A policy set to never ask is convenient for automation, but it gives you no opportunity to reject a risky command before it runs.

#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.

Sandboxes restrict what an approved process can reach

A sandbox can limit filesystem paths, writes, child processes, and network connections. If a command is approved but the sandbox denies access to a path, the command should fail at that boundary. Restrictions normally apply to the terminal process and its spawned scripts and subprocesses; Anthropic documents Linux bubblewrap and macOS seatbelt implementations with this inheritance behavior.

Microsoft Visual Studio Code documentation states: “Sandboxing is not a virtual machine or user-account boundary, and it does not replace endpoint security.” A local sandbox can still share the host kernel, user identity, device, or other resources. Keep operating-system updates, credential hygiene, and endpoint controls in place.

Which access mode should I choose for a coding task?

Match the mode to the least authority needed for the task, then increase access only when a concrete failure explains why it is required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Use case Filesystem mode Approval setting Typical network posture Why it fits
Inspect, explain, or plan Read-only On request Off unless a specific lookup is needed The agent can examine code and propose changes without writing files.
Implement inside one repository Workspace-write On request Allow only required hosts Edits and tests work in the project while unusual commands still pause.
CI inspection Read-only Never Off or tightly allowlisted Deterministic, non-interactive analysis with no write authority.
Disposable, isolated experiment Full access only if independently isolated Automatic only when justified Explicitly controlled Acceptable only when the environment can be destroyed and contains no sensitive data.

Why full-access bypasses are dangerous

Codex exposes a dangerous bypass, --dangerously-bypass-approvals-and-sandbox, also called --yolo. It removes the two controls that limit accidental deletion, credential exposure, and untrusted code execution. Do not use it on a normal workstation, a repository containing secrets, or a machine with valuable data. If you must use it for a throwaway experiment, run it in a disposable container or managed sandbox with no host credentials.

How do I run Codex with restricted file and terminal access?

Choose the mode before starting the session; changing the prompt behavior later does not retroactively undo access already granted.

  1. Start with a review command. For inspection or planning, run codex --sandbox read-only --ask-for-approval on-request. The agent can read files available to the session, but write attempts are blocked by the sandbox.
  2. Use workspace-write for implementation. Run codex --sandbox workspace-write --ask-for-approval on-request from the repository or explicitly selected workspace. This permits edits in the workspace while preserving approval prompts for actions that need additional authority.
  3. Keep prompts for boundary crossings. Approve a command only after checking its working directory, file targets, arguments, and network behavior. A command such as a package install can both modify files and contact external hosts, so inspect both effects.
  4. Use non-interactive read-only mode in CI. codex --sandbox read-only --ask-for-approval never is suitable for an inspection job that must not pause. Ensure the CI checkout is disposable and that no write-capable credentials are mounted.
  5. Record the effective mode. Put the command-line flags in the job definition or wrapper script so reviewers can see the policy. Do not rely on a developer remembering which mode was used for a previous session.

What workspace-write does and does not mean

Workspace-write is not a blanket grant to your entire home directory. It is intended to allow writes in the designated workspace while keeping other locations restricted. The exact set of readable paths, writable paths, and network destinations depends on the client, operating system, and organization policy, so verify the effective policy before trusting a new installation.

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

How can I allow writes only in one directory in VS Code?

Use VS Code’s user-configured sandbox paths to define an explicit allowlist and deny sensitive locations. The path rules are ordered by precedence: denied paths override read-only paths, and read-only paths override read/write paths.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open VS Code settings and locate the Chat agent sandbox file-system policy, or edit the settings JSON used by your organization.
  2. Set chat.agent.sandbox.fileSystem.userConfiguredPaths with readwritePaths containing the repository and, if necessary, a build-output directory.
  3. Add shared source or reference directories to readonlyPaths when the agent must inspect them but must never modify them.
  4. Add secret stores, credential directories, unrelated home-directory data, and other high-risk locations to deniedPaths.
  5. Run the /sandbox policy command in the agent session to inspect the effective policy, including settings inherited from a managed organization.

A practical policy might make /work/project and /work/project/build read/write, /work/shared-libraries read-only, and credential or personal-data directories denied. Use paths appropriate to your operating system; do not copy a Unix path into a Windows policy without adapting it.

Why precedence matters

If a directory appears in both a read/write list and a denied list, denial wins. This lets you deny a sensitive subdirectory even when its parent repository is writable. Review nested paths carefully: granting a broad parent and denying only one known secret folder can leave newly created sensitive folders exposed.

How do I stop terminal commands from reaching the network?

Configure network access separately from filesystem access. A sandbox that blocks writes can still allow a process to upload source code, download a package, or call an API unless network policy denies it.

Turn networking off when the task is self-contained

For code explanation, refactoring, and tests that use already-installed dependencies, disable network access. This prevents package downloads and reduces the chance that a malicious dependency or generated command can exfiltrate data.

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

Use an allowlist for tasks that need downloads or APIs

When a build genuinely needs a package registry, documentation endpoint, or test service, allow only the required domains and keep all others denied. VS Code provides network filters and allowed or denied domains; the labels and availability vary by version and managed policy. Approval prompts for URLs are an additional check, not a replacement for the domain filter.

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 hosted-runner boundaries

Cloudflare describes a hosted Linux sandbox belonging to one task. The controlling Worker holds credentials and determines which hostnames the sandbox can reach. This model is stronger than giving a local process unrestricted access, but the Worker’s credential and hostname configuration still define the real trust boundary.

Can child processes, MCP servers, and language tools escape the sandbox?

Assume that a terminal command can start other programs, and audit every integration that receives the agent’s requests.

Process inheritance

Shell scripts, compilers, test runners, and helper programs launched by a sandboxed terminal generally inherit its restrictions. This prevents a script from regaining unrestricted file access merely by being started from an approved command. Verify this behavior for your specific client and operating system, especially when a tool launches a separate service or daemon.

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.

MCP and language-server boundaries

MCP servers, language servers, extensions, and built-in tools may have separate permission checks. Review each server’s executable path, working directory, environment variables, filesystem mounts, and network destinations. A tightly sandboxed terminal does not automatically make a separately configured MCP server safe.

Credential exposure

Keep tokens, SSH keys, cloud credentials, and signing keys out of the agent’s environment unless the task requires them. Prefer short-lived, least-privilege credentials mounted only for setup or a single command. A sandbox limits where a process can operate; it does not prove that a credential cannot be read or used within the allowed boundary.

What setup is safest for untrusted code?

Move untrusted work away from the host instead of trying to make a broad local exception safe.

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.
  • Disposable container: start from a clean image, mount only a temporary checkout, and destroy it after the run.
  • Development container: keep the project and toolchain inside a defined container while leaving personal files outside its mounts.
  • Separate worktree: give the agent an isolated checkout so experimental edits cannot alter the main working tree.
  • Managed cloud container: use a task-scoped environment where the service controls hostnames and credentials, and where the agent phase can run offline after setup.

OpenAI describes isolated cloud containers with network access during setup and an offline-by-default agent phase. This pattern lets dependencies be prepared first, then removes network access while the agent edits and tests. Isolation reduces exposure but does not eliminate the need to review code changes before merging.

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

How do common agent setups compare?

Compare configurations across the same six dimensions instead of judging them by a single “safe” label.

Setup Filesystem scope Write authority Terminal approval Network Credential exposure Isolation strength
Local read-only session Workspace or selected paths None Per action or on request Off or allowlisted Should be none Local OS sandbox
Local workspace implementation Workspace plus explicit paths Project files On request for boundary actions Allowlisted Task-specific, short-lived Local OS sandbox
CI inspection job Disposable checkout None Never, non-interactive Usually off Read-only or none CI runner isolation
Development container Mounted project and declared volumes Container filesystem Rule-based or on request Off or allowlisted Mounted only when needed Container boundary
Managed cloud sandbox Task-owned Linux environment Task workspace Service policy Hostname-controlled; can be offline during agent phase Worker or service controlled Managed container

What should I check before approving a terminal command?

Use a short review checklist; approval is valuable only when you inspect the command rather than clicking through it.

  • Is the working directory the intended repository?
  • Does the command write only to approved paths, or does it use a broad path such as a home directory or system temporary directory?
  • Does it delete, reset, chmod, chown, or rewrite files?
  • Does it invoke a shell with interpolated variables, downloaded scripts, or unreviewed repository hooks?
  • Does it open a network connection, and is the destination on the allowlist?
  • Could it print environment variables, configuration files, or tokens into logs?
  • Will it start a long-lived daemon, container, MCP server, or background process that has a different policy?

For package installation, inspect the lockfile and registry destination, then run it in the isolated workspace. For generated migration or deployment commands, require a human to review the exact SQL, infrastructure plan, or artifact before execution.

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

How do I troubleshoot blocked or unexpectedly allowed actions?

The agent cannot write a project file

Confirm that the file is inside a configured read/write path, that a parent path is not denied, and that the repository is not mounted read-only by the container or CI runner. Inspect the effective policy rather than relying on the workspace name shown in the UI.

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

A harmless command keeps prompting

Check whether it accesses a path outside the workspace, starts a child process, or contacts a domain not on the network allowlist. Prefer a narrow rule for that command or path; do not switch to full-access mode simply to remove prompts.

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.

A command succeeds despite an approval setting

Approval settings may cover terminal actions while built-in tools, URLs, or MCP servers use separate checks. Review the tool-specific approval state and the sandbox policy. In VS Code, sandboxing remains effective even when Allow all or Autopilot skips approval prompts, so a successful command may still be confined even though no prompt appeared.

A build fails after network access is disabled

Prepare dependencies during a controlled setup phase, cache them inside the isolated environment, or add the minimum required registry domains temporarily. After installation, return to offline operation and remove any setup credentials that are no longer needed.

What are the limits of these controls?

Sandboxing and approvals reduce accidental impact; they do not guarantee that an agent is trustworthy. A process may still use any files, services, or credentials deliberately exposed to it, and a local sandbox is not a VM or user-account boundary. Treat generated code, dependency changes, shell commands, and network requests as untrusted until reviewed.

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

Settings and preview features change by client version, operating system, and managed-organization policy. Before standardizing a command or UI path, check the current documentation for your Codex, VS Code, or other agent release and test the effective policy with a harmless file and network probe in a disposable workspace.

Frequently Asked Questions

Can an AI coding agent read files outside the project if it cannot write them?

Often yes, unless you explicitly restrict read access. Read-only means no writes; it does not necessarily mean the workspace is the only readable location, so define allowed, read-only, and denied paths and inspect the effective policy.

Should I give an agent my SSH key so it can clone a dependency?

Usually no. Clone or fetch the dependency in a separate setup step with a short-lived, least-privilege credential, then run the agent without that key. Remove the credential and disable network access for the editing and testing phase.

Is a separate Git worktree safer than a branch in the same checkout?

It limits accidental edits to the main working tree, but it is not a security boundary by itself. Pair the worktree with sandbox path rules, restricted credentials, and network controls so the agent cannot reach unrelated directories.

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

What evidence should a team retain for an agent run?

Keep the exact agent version, sandbox and approval flags, effective path and network policy, tool configuration, and a reviewable diff or CI log. Those records make it possible to reproduce a failure and confirm that a later policy change did not silently broaden access.

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.