GUIDE, read 12 Nov 2026
Every coding agent acts as the developer, and their defaults differ more than their feature lists
All five agents run commands as the developer, so the user account is the real boundary
Claude Code, Cursor, GitHub Copilot agent mode in VS Code, OpenAI Codex CLI and Google Gemini CLI share one basic property. Each can read files, edit them and run shell commands on a developer laptop using the signed-in developer's account. Anthropic states the consequence for its own tool: a Bash command the developer approves can still write anywhere the user account can. Cursor describes its Run Modes as best-effort guardrails rather than a hard security boundary. Google says its enterprise settings are not a foolproof boundary against a user with local administrative rights.
Each vendor's controls therefore reduce accidents and limit blast radius. They differ in what is on at install, what an administrator can force, and what leaves a record. This guide compares the five using each tool's own security documentation, read on 12 Nov 2026. The per-tool guides on this site go deeper on configuration.
Files, shell, network, credentials and packages are the five surfaces to compare
The table lists what each agent can reach by default, or by documented option, in each surface. Cells state the default behavior from the docs, and a setting name where one decides the outcome.
| Surface | Claude Code | Cursor | Copilot agent mode | Codex CLI | Gemini CLI |
|---|---|---|---|---|---|
| Files | Manual mode asks before edits; sandbox, if enabled, reads most of the machine unless denyRead is set | Reads and workspace edits need no approval; config files do; Read Access defaults to System | Edits tracked with Keep and Undo; autoApprove globs protect sensitive files | workspace-write: writes limited to workspace; .git, .codex, .aws protected | Seatbelt default profile confines writes to the project and allows broad reads |
| Shell | Approval per command in Manual mode; sandbox optional | Approval by default; sandbox in Auto-review and optional in Allowlist | Approval by default; per-command auto-approve rules; sandbox on supported platforms | Runs in OS sandbox; asks to leave it | Confirmation prompts; sandbox off unless set |
| Network | Sandbox proxy with allowedDomains starting empty, if sandbox is on | Sandbox blocks by default; agent tools limited to listed destinations | Sandbox allowNetwork defaults to true | Off by default in workspace-write | sandboxNetworkAccess setting defaults to false; the default Seatbelt profile allows network |
| Credentials | Stored in Keychain on macOS; ~/.ssh readable in sandbox unless denied | Protected paths include .git/config and Cursor config; Allowed Team IDs blocks personal accounts | MCP secrets in VS Code secure store | .aws and .codex protected as read-only | MCP servers get environment variables redacted by default |
| Packages | None found on 12 Nov 2026 in the pages read | None found on 12 Nov 2026 in the pages read | Cloud agent firewall allowlist permits dependency downloads | Legacy cloud: setup phase installs dependencies; agent phase offline by default | Sandbox expansion flags npm install as needing extra permission |
Each tool ships a different set of administrator controls
The second table covers what an administrator can enforce and what telemetry exists. A control counts here only when the vendor documents it as enforceable by the organization.
| Control | Claude Code | Cursor | Copilot | Codex CLI | Gemini CLI |
|---|---|---|---|---|---|
| Managed policy | managed-settings.json, MDM, server-managed settings | Team dashboard policies; MDM for workspace trust | Enterprise-managed settings; VS Code device policy | requirements.toml via admin console, system file or MDM | System settings file; Admin policy tier |
| Disable the unsafe mode | disableBypassPermissionsMode, disableAutoMode | Team Run Modes setting exists; a switch that disables Run Everything: none found on 12 Nov 2026 in the pages read | Managed permission and sandbox settings exist (key names not read) | allowed approval policies and sandbox constraints | security.disableYoloMode, admin.secureModeEnabled |
| MCP restriction | allowedMcpServers, deniedMcpServers, managed-mcp.json | Per-call approval; MCP allowlist; team marketplace | allowedMcpServers, deniedMcpServers | Managed list of enabled servers; per-tool allow and deny | mcp.allowed, mcp.excluded, system-level definitions |
| Pre-execution hook | PreToolUse can block; allowManagedHooksOnly | beforeShellExecution, beforeMCPExecution | None found on 12 Nov 2026 in the pages read | Managed hooks; allow_managed_hooks_only | Policy engine allow, deny, ask_user |
| Telemetry | OTel, opt-in; tool_decision and tool_result events | Audit log covers settings, not agent activity; hooks for activity | None found on 12 Nov 2026 in the pages read | OTel exporter; prompt logging opt-in | OTel off by default; tool_call events; logPrompts defaults true |
Defaults differ more than the feature lists suggest
Read in the order of install, the five agents start in different places. Codex CLI starts with an OS-enforced sandbox, network off and writes limited to the workspace. Claude Code starts in a permission mode with prompts and an optional sandbox, off by default. Gemini CLI also leaves its sandbox and Trusted Folders off. Cursor asks before shell commands and MCP calls but lets the agent read widely. Copilot agent mode asks before terminal commands and has a sandbox option whose network setting defaults to open.
Defaults are what an unmanaged laptop runs. A team that publishes a hardened configuration is judging the tool at its managed state, and one that does not is judging it at install. Check both before comparing.
Repository files, MCP servers and bypass modes are the shared weak points
Three patterns recur across the documentation. First, a repository can carry configuration that changes agent behavior. Claude Code asks for workspace trust and per-server approval for .mcp.json; Gemini CLI's Trusted Folders discovery lists commands, MCP servers, hooks, skills and setting overrides; VS Code applies Workspace Trust to MCP definitions; Cursor's workspace trust is off by default. Anthropic adds that a non-interactive -p session shows neither the trust dialog nor the server prompt, which matters for scripts.
Second, MCP servers run with the developer's permissions and no vendor audits them. Anthropic says it does not security-audit or manage any MCP server, VS Code says local servers can run code on the machine, and Codex relies on tool annotations that the server itself advertises. Third, every tool has a mode that removes the prompts: bypassPermissions in Claude Code, Run Everything in Cursor, Allow all and Autopilot in Copilot, never and danger-full-access in Codex, and YOLO in Gemini CLI. Only some have a documented administrator switch to disable it, as the second table shows.
A fourth gap is common to the whole set. In the pages read, none found on 12 Nov 2026 describes a control that checks the reputation or integrity of packages an agent installs. The sandbox and firewall features decide whether a download can happen, not whether it is safe.
An endpoint control adds pre-execution blocking and a record the agent cannot edit
The agent's own settings can be edited by a user with the right access, and the telemetry they emit is either off by default or limited. An endpoint control adds two things the tools do not provide uniformly. The first is a decision before a command or tool call runs, applied the same way across agents. The second is a log delivered off the machine. Several of the tools document the interface vendors use for the first: Claude Code PreToolUse hooks, Cursor beforeShellExecution and beforeMCPExecution, and Codex managed hooks.
Vendors state their coverage as follows, and each statement is the vendor's claim, read on 12 Nov 2026. CrowdStrike says agent-level hooks for Claude Code, OpenAI Codex, GitHub Copilot, OpenCode and Cursor can inspect prompts and block malicious activity before harmful actions run, and that its sensor blocks malicious open-source npm and PyPI packages as they reach the endpoint, including packages pulled in by AI coding agents. Pillar says pre-action enforcement covers Claude Code, Codex CLI and Cursor only as of October 2026, with Gemini CLI scanned for configuration but runtime blocking not listed. Microsoft says agent-native inspection uses vendor event interfaces for Claude Code, Codex CLI and GitHub Copilot CLI. Zenity says it can block or modify a dangerous tool call before it executes for Claude Code, Codex, Copilot and Cursor. Noma says it uses Cursor Agent Hooks for inline decisions.
The package claim is the only one in this set that addresses the fourth gap. The coverage differs by agent, which is why a comparison table from a vendor deserves a test on your own fleet: install each of the five agents, trigger a blocked action and confirm what the tool recorded.
A one-afternoon check on a single laptop shows which gaps are open
Before choosing any tool, a security engineer can test one reference laptop. This is verification of settings, not a rollout program.
Each check below comes from a setting named in the vendors' documentation.
- Sandbox state. Claude Code: sandbox.enabled and failIfUnavailable. Gemini CLI: tools.sandbox. Copilot: agent sandboxing and the allowNetwork setting. Codex: sandbox_mode and sandbox_workspace_write.network_access.
- Prompt-removal modes. Confirm whether the disable switches are set: Claude Code's disableBypassPermissionsMode, Gemini CLI's disableYoloMode, and Codex's approval and sandbox requirements.
- Repository trust. Check Trusted Folders in Gemini CLI, Workspace Trust in VS Code and Cursor, and search CI scripts for Gemini CLI's trust bypass flag.
- Telemetry destination. Confirm OpenTelemetry settings are in managed configuration, and decide on prompt logging: Gemini CLI's logPrompts defaults to true and Codex's log_user_prompt is opt-in.
- Credential reach. Confirm which paths a sandboxed command can read, starting with ~/.ssh and ~/.aws.
Where this sits in the index
- Agent Surface MapWhich of six agent surfaces each of 16 tools sees
- Action Control MatrixWhich of six agent actions each tool can stop
- The ranked index16 tools on seven published criteria
Related guides
- What agentless means on an endpoint
- Local MCP servers on the endpoint
- Securing Google Gemini CLI on developer laptops
Sources
- Anthropic: Claude Code docs, security, read 12 Nov 2026
- Anthropic: Claude Code docs, sandboxing, read 12 Nov 2026
- Anthropic: Claude Code docs, permissions, read 12 Nov 2026
- Anthropic: Claude Code docs, settings, read 12 Nov 2026
- Anthropic: Claude Code docs, MCP, read 12 Nov 2026
- Anthropic: Claude Code docs, hooks, read 12 Nov 2026
- Anthropic: Claude Code docs, monitoring usage, read 12 Nov 2026
- Cursor: docs, agent security, read 12 Nov 2026
- Cursor: docs, run modes and sandboxing, read 12 Nov 2026
- Cursor: docs, privacy and data governance, read 12 Nov 2026
- Cursor: docs, compliance and monitoring, read 12 Nov 2026
- Cursor: docs, hooks, read 12 Nov 2026
- Microsoft: VS Code docs, Copilot security, read 12 Nov 2026
- Microsoft: VS Code docs, MCP servers, read 12 Nov 2026
- Microsoft: VS Code docs, AI settings in enterprise environments, read 12 Nov 2026
- GitHub: Docs, customizing or disabling the agent firewall, read 12 Nov 2026
- OpenAI: Codex docs, agent approvals and security, read 12 Nov 2026
- OpenAI: Codex docs, configuration reference, read 12 Nov 2026
- OpenAI: Codex docs, managed configuration, read 12 Nov 2026
- raw.githubusercontent.com Google, read 12 Nov 2026
- raw.githubusercontent.com Google, read 12 Nov 2026
- raw.githubusercontent.com Google, read 12 Nov 2026
- raw.githubusercontent.com Google, read 12 Nov 2026
- raw.githubusercontent.com Google, read 12 Nov 2026
- raw.githubusercontent.com Google, read 12 Nov 2026
- CrowdStrike: Falcon Guardian blog post, read 12 Nov 2026
- CrowdStrike: supply chain attacks endpoint blog post, read 12 Nov 2026
- Pillar Security: Agentic Endpoint platform page, read 12 Nov 2026
- Microsoft: Defender AI agent runtime protection overview, read 12 Nov 2026
- Zenity: coding and personal agents use case, read 12 Nov 2026
- Noma Security: runtime security for Cursor blog post, read 12 Nov 2026
Last reviewed 12 Nov 2026.