>_cca

Coding agent permissions and sandboxes, agent by agent

In Claude Code's Manual mode, only reads run without a prompt, though recent versions start interactive sessions in auto mode. Codex runs with network access turned off inside an OS-enforced local sandbox. Cursor agents edit workspace files without approval except configuration files, but terminal commands need your approval. By default, Copilot's cloud agent has internet access limited by a firewall.

Reviewed November 2026

What can Claude Code do without asking me first?

The permission mode decides. A permission mode sets which actions Claude can take in a session without asking you first, and the docs list these modes:

Check which mode you start in. With Claude Code v2.1.283 or later, auto mode is the built-in starting mode for interactive terminal and VS Code sessions, and on earlier versions that applies only on Pro, Max, Ultra and Team plans. To change it for new sessions, set defaultMode in your settings files.

How do I tighten Claude Code for a team?

Put the rules in a shared or managed settings file. The shared project file is .claude/settings.json, which you commit so teammates get it, and managed settings reach everyone your organization deploys them to.

These keys carry most of the policy:

Check the sandbox's reach before relying on it. It covers shell commands only, and file tools, MCP servers and hooks run outside it. On native Windows, Claude Code runs commands unsandboxed, and the docs say to use a WSL2 distribution for the sandbox.

What does Codex do without asking me first?

In the Auto preset, Codex can read files, make edits, and run commands in the working directory automatically. It asks for approval to edit files outside the workspace or to run commands that need network access. OpenAI's docs give --sandbox workspace-write --ask-for-approval on-request as an example of that preset.

Two layers produce that behavior. Sandbox mode sets what Codex can do technically, and the approval policy sets when Codex must ask. For the CLI and IDE extension, defaults include no network access and writes limited to the active workspace.

With on-request, commands the sandbox allows can run without approval and use network access if enabled. To chat or plan without changes, switch to read-only mode with /permissions. In Codex Cloud (Legacy), the agent phase runs offline by default unless you enable internet access for that environment.

How do I lock Codex down for a team?

Use requirements.toml, an admin-enforced configuration file that constrains security-sensitive settings users can't override. The reference says to use allowed_sandbox_modes with sandbox_mode.

Personal defaults live in ~/.codex/config.toml, with project overrides in .codex/config.toml, and Codex loads project .codex/ layers only when you trust the project. For a stricter project, omit an explicit approval_policy and add a project entry with trust_level = "untrusted" to your user-level ~/.codex/config.toml. Commands then require approval unless an execution-policy rule allows them, and project-local configuration is disabled.

Flags still win for a single run, since CLI flags and --config overrides sit at the top of the precedence order.

What does Cursor auto-run, and what does it ask about?

Reading files and searching code need no approval, and agents modify workspace files without approval except configuration files, with changes saved to disk immediately. By default, terminal commands need your approval, according to Cursor's security page. All MCP connections need your approval, and each tool call still needs its own approval after that. You can pre-approve specific tools with an MCP allowlist.

Run Modes let trusted calls run without prompting. They range from a simple allowlist to the Auto-review classifier, and Cursor calls them best-effort guardrails rather than a hard security boundary. In the CLI, approvalMode takes allowlist, auto-review or unrestricted. The terminal sandbox blocks unauthorized file access and network activity, and agents cannot make arbitrary network requests with default settings.

For a team, the CLI reads a project file at .cursor/cli.json alongside the global ~/.cursor/cli-config.json, but only permissions can be set per project. Rules go in permissions.allow and permissions.deny. In the editor, workspace trust is disabled by default. You turn it on with security.workspace.trust.enabled set to true, and organizations can enforce this setting through MDM.

What limits does Copilot's cloud agent run under?

Copilot's cloud agent can push to only a single branch, and a human must review and merge its draft pull requests. Mentioned with @copilot on an existing pull request, it can push to that pull request's branch, and otherwise it can push only to a new copilot/ branch created for it. It cannot directly run git push or other Git commands. It cannot approve or merge a pull request, and by default workflows are not triggered until a user with write access approves them. Only users with write access can trigger it.

Sessions can run in a cloud sandbox, on GitHub Actions, or in a custom environment. On Actions, each session has a maximum execution time of 59 minutes that cannot be extended or bypassed. In both Actions and cloud sandbox sessions, Copilot works on one branch at a time and opens one pull request per task, and a ruleset or branch protection rule can prevent it from creating or updating pull requests.

The firewall always allows access to hosts Copilot uses to interact with GitHub, plus a recommended allowlist, on by default, for downloading dependencies. You change it on the Internet access settings tab, which covers the cloud agent and Copilot code review.

How should I set this up when several agents share one repository?

Give the agent with the widest defaults the narrowest job, and commit each tool's project settings so every teammate's agents start from the same rules. Agents running side by side also need separate working copies, which parallel agents with git worktrees covers.

If Claude Code and Codex share a repo, review .claude/settings.json and .codex/config.toml together, as in running Claude Code and Codex together. Unattended runs change which modes are safe, so read headless coding agents before you switch any agent to a no-prompt mode.

What else do readers ask?

Does the Claude Code sandbox cover file edits?

No. The sandbox covers shell commands only. File edits fall under permission rules, which apply to every tool, including Read and Edit.

Can I still set approval_policy to untrusted in Codex?

No. Codex and ChatGPT Work no longer support that value, and the retired setting can prevent either client from starting. For interactive read-only use, OpenAI's docs show codex --sandbox read-only --ask-for-approval on-request.

What happens when Copilot's firewall blocks a request?

A warning is added to the pull request body for new pull requests, or to a comment on existing ones. It shows the blocked address and the command that tried to make the request.

Is bypassPermissions ever appropriate in Claude Code?

The Claude Code docs say to use this mode only in isolated environments like containers or VMs where Claude Code can't cause damage.

Which related guides should you read?

Sources (reviewed Nov 2026)