When Codex runs a shell command locally, the operating system enforces limits on what that command can read, change or reach over the network. A permission profile defines those limits. In OpenAI’s built-in workspace profile, commands can write inside the workspace, with protections for directories such as .git. The profile allows broader reads subject to the user’s operating-system permissions and disables network access.
The approval policy determines when Codex must pause and request permission. For a code review, start with read-only access. For a task that requires edits, limit writes to the relevant workspace and check what additional access a command needs before approving it.
Review Model Context Protocol (MCP) tools separately. A local MCP server launched as a separate process may run with the permissions of the account that started Codex. The shell command’s permission profile does not automatically apply to that server. Give local servers only the filesystem and network access they need. For a remote MCP connection, review which operations the server exposes and what its credentials allow.
OpenAI’s Codex sandbox engineering write-up · Codex documentation on approvals and security