An agent has been asked to review a repository change. It proposes reading src/search.ts, writing its report in a sibling directory, and checking a pull request on GitHub. Each action follows a different path. The client decides whether a tool call needs approval, the execution environment constrains the process, and the external service checks the connected account’s rights. To find out what will happen, first identify the tool that will perform the action.
What Codex CLI checks
In Codex CLI, the approval policy governs when the agent can ask for confirmation. The sandbox defines what local commands can do with files and the network. In the typical workspace-write and on-request setup, a command can read an accessible src/search.ts and write within the permitted working area. Writing to a sibling directory outside the allowed paths requires approval. Local commands in this mode run with network access disabled by default. When a local gh needs to reach GitHub, both network access and the rights of the account it uses matter. Codex approvals and sandboxing
For a review, you can select a read-only policy and check which tools the reviewer receives. Accessible paths matter even in this mode. A read-only process can still see the data that its profile allows it to open. Sandboxing in Codex CLI
Where Claude Code applies its rules
In Claude Code, built-in Read and shell reads pass through different checks. Read follows the file tool’s permission rules. When enabled on a supported platform, the shell sandbox covers a shell command and its child processes. For a write through Edit, check the rules for Edit. For a Bash write, also check which paths the process can access. Claude Code permissions · Claude Code sandbox scope
Can MCP perform the same action?
When an MCP tool supplies pull request status, the client sends a request and the server performs the operation. Find out where that server runs, who authorizes the call, and what permissions its GitHub connection has. In Claude Code, for example, local MCP servers run outside the sandbox used for shell commands. The review configuration therefore includes the server process’s local permissions, the exposed MCP operations, and the account’s rights. MCP architecture · Processes outside the Claude Code sandbox
This review can run with access to read the repository and, when the PR status is needed, permission to perform that specific GitHub read. The report can come back as text in the session. To check that the profile fits the job, follow every required action to the process that will run it and the account whose rights it will use.