Skip to content

GUIDE, read 12 Nov 2026

Every coding agent acts as the developer, and their defaults differ more than their feature lists

See the full indexAll guides

Surfaces this guide covers

  • Desktop apps
  • IDE assistants
  • Command-line agents
  • MCP servers
  • Browser extensions
  • SaaS copilots

Actions it covers

  • File read
  • Shell command
  • Network call
  • Credential access
  • Data paste
  • Package install

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.

SurfaceClaude CodeCursorCopilot agent modeCodex CLIGemini CLI
FilesManual mode asks before edits; sandbox, if enabled, reads most of the machine unless denyRead is setReads and workspace edits need no approval; config files do; Read Access defaults to SystemEdits tracked with Keep and Undo; autoApprove globs protect sensitive filesworkspace-write: writes limited to workspace; .git, .codex, .aws protectedSeatbelt default profile confines writes to the project and allows broad reads
ShellApproval per command in Manual mode; sandbox optionalApproval by default; sandbox in Auto-review and optional in AllowlistApproval by default; per-command auto-approve rules; sandbox on supported platformsRuns in OS sandbox; asks to leave itConfirmation prompts; sandbox off unless set
NetworkSandbox proxy with allowedDomains starting empty, if sandbox is onSandbox blocks by default; agent tools limited to listed destinationsSandbox allowNetwork defaults to trueOff by default in workspace-writesandboxNetworkAccess setting defaults to false; the default Seatbelt profile allows network
CredentialsStored in Keychain on macOS; ~/.ssh readable in sandbox unless deniedProtected paths include .git/config and Cursor config; Allowed Team IDs blocks personal accountsMCP secrets in VS Code secure store.aws and .codex protected as read-onlyMCP servers get environment variables redacted by default
PackagesNone found on 12 Nov 2026 in the pages readNone found on 12 Nov 2026 in the pages readCloud agent firewall allowlist permits dependency downloadsLegacy cloud: setup phase installs dependencies; agent phase offline by defaultSandbox 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.

ControlClaude CodeCursorCopilotCodex CLIGemini CLI
Managed policymanaged-settings.json, MDM, server-managed settingsTeam dashboard policies; MDM for workspace trustEnterprise-managed settings; VS Code device policyrequirements.toml via admin console, system file or MDMSystem settings file; Admin policy tier
Disable the unsafe modedisableBypassPermissionsMode, disableAutoModeTeam Run Modes setting exists; a switch that disables Run Everything: none found on 12 Nov 2026 in the pages readManaged permission and sandbox settings exist (key names not read)allowed approval policies and sandbox constraintssecurity.disableYoloMode, admin.secureModeEnabled
MCP restrictionallowedMcpServers, deniedMcpServers, managed-mcp.jsonPer-call approval; MCP allowlist; team marketplaceallowedMcpServers, deniedMcpServersManaged list of enabled servers; per-tool allow and denymcp.allowed, mcp.excluded, system-level definitions
Pre-execution hookPreToolUse can block; allowManagedHooksOnlybeforeShellExecution, beforeMCPExecutionNone found on 12 Nov 2026 in the pages readManaged hooks; allow_managed_hooks_onlyPolicy engine allow, deny, ask_user
TelemetryOTel, opt-in; tool_decision and tool_result eventsAudit log covers settings, not agent activity; hooks for activityNone found on 12 Nov 2026 in the pages readOTel exporter; prompt logging opt-inOTel 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

Sources

  1. Anthropic: Claude Code docs, security, read 12 Nov 2026
  2. Anthropic: Claude Code docs, sandboxing, read 12 Nov 2026
  3. Anthropic: Claude Code docs, permissions, read 12 Nov 2026
  4. Anthropic: Claude Code docs, settings, read 12 Nov 2026
  5. Anthropic: Claude Code docs, MCP, read 12 Nov 2026
  6. Anthropic: Claude Code docs, hooks, read 12 Nov 2026
  7. Anthropic: Claude Code docs, monitoring usage, read 12 Nov 2026
  8. Cursor: docs, agent security, read 12 Nov 2026
  9. Cursor: docs, run modes and sandboxing, read 12 Nov 2026
  10. Cursor: docs, privacy and data governance, read 12 Nov 2026
  11. Cursor: docs, compliance and monitoring, read 12 Nov 2026
  12. Cursor: docs, hooks, read 12 Nov 2026
  13. Microsoft: VS Code docs, Copilot security, read 12 Nov 2026
  14. Microsoft: VS Code docs, MCP servers, read 12 Nov 2026
  15. Microsoft: VS Code docs, AI settings in enterprise environments, read 12 Nov 2026
  16. GitHub: Docs, customizing or disabling the agent firewall, read 12 Nov 2026
  17. OpenAI: Codex docs, agent approvals and security, read 12 Nov 2026
  18. OpenAI: Codex docs, configuration reference, read 12 Nov 2026
  19. OpenAI: Codex docs, managed configuration, read 12 Nov 2026
  20. raw.githubusercontent.com Google, read 12 Nov 2026
  21. raw.githubusercontent.com Google, read 12 Nov 2026
  22. raw.githubusercontent.com Google, read 12 Nov 2026
  23. raw.githubusercontent.com Google, read 12 Nov 2026
  24. raw.githubusercontent.com Google, read 12 Nov 2026
  25. raw.githubusercontent.com Google, read 12 Nov 2026
  26. CrowdStrike: Falcon Guardian blog post, read 12 Nov 2026
  27. CrowdStrike: supply chain attacks endpoint blog post, read 12 Nov 2026
  28. Pillar Security: Agentic Endpoint platform page, read 12 Nov 2026
  29. Microsoft: Defender AI agent runtime protection overview, read 12 Nov 2026
  30. Zenity: coding and personal agents use case, read 12 Nov 2026
  31. Noma Security: runtime security for Cursor blog post, read 12 Nov 2026

Last reviewed 12 Nov 2026.