Practical guide. Provider claims are attributed to the sources below. This page does not claim a new independent DARC benchmark.
For: Developers allowing agents to execute commands
Before you start: A disposable test repository
⚡ TL;DR — the 30-second version
- Instructions are not access control.
- Network calls can be data-exfiltration paths.
- Test denied actions, not only approved actions.
A coding agent can read files, edit code and run commands. A repository instruction asking it to avoid secrets may be useful context, but it is not the same as a filesystem or permission boundary. Understanding the distinction is essential before giving an agent unattended work.
Current Claude Code documentation separates memory/instructions from settings and warns that some hook filters are best-effort. Codex documentation separately addresses approval policies, command-network access and search modes.
“Instructions influence behavior. Permissions authorize actions. Isolation limits damage. None replaces the other two.”
Field guide / 01
01 / Assign each control a job
Use project instructions for conventions, test commands and intent. Use the permission system to authorize or deny tool categories. Use a sandbox and scoped credentials to constrain what a permitted command can actually reach.
Keep secrets out of the workspace when they are not needed. A deny rule is useful, but a credential that was never mounted is a stronger reduction of exposure.
| Control | Purpose | Not a guarantee of |
|---|---|---|
| Repository instructions | Guide the model's choices | Enforced access control |
| Approval | Authorize a specific action | Safe behavior of arbitrary commands |
| Sandbox | Limit filesystem/network reach | Correct business logic |
| Scoped credentials | Constrain remote authority | Correct reasoning |
Field guide / 02
02 / Treat network access as data export
An HTTP request can send source code or secrets to an external host even if its command looks harmless. Review allowlisted domains and tool inputs, and distinguish web-search access from arbitrary shell networking.
Cached search can reduce exposure to arbitrary live pages, but results remain untrusted. A document that tells the agent to run a command does not become an instruction merely because it appears in a search result.
Field guide / 03
03 / Make confirmation useful
Present the exact command or action, the target and the data it may expose. Avoid blanket approvals that outlive the task unless a deliberate policy supports them. A reviewer should be able to deny without breaking unrelated read-only work.
If the proposal changes after approval, reauthorize it. Record approved, denied, attempted and executed actions separately so a later incident review can reconstruct the boundary.
Field guide / 04
04 / Prove the denial path
In a disposable environment, test an out-of-scope file read, an unauthorized network destination and a sensitive write. Confirm the enforcement layer blocks them even when the model requests them.
Save the policy and results alongside your task brief. Re-run these checks after installing plugins, adding MCP servers or changing the execution environment.
Before you ship
0/5Use this as a review aid. Checks reset when you leave this page.
Sources & verification
Last checked 23 Sept 2026. Publication dates and access conditions belong to the linked originals.
- 01Claude Code — permission and configuration referenceAnthropic↗
- 02Claude Code — hook lifecycle and limitationsAnthropic↗
- 03Codex — agent approvals and securityOpenAI↗
- 04Codex — local configuration and search modesOpenAI↗
- 05MCP — security best practicesModel Context Protocol↗