techlist.io
OpenAI2026-05-073 min read

Curated summary

Running Codex safely at OpenAI

Read original(opens in new tab)

OpenAI runs Codex, its coding agent, inside a layered set of controls: sandboxing, approval policies, a managed network policy, locked-down credentials, and command rules. Together these let routine engineering work proceed without friction while higher-risk actions stop for review. Agent-native telemetry then records why Codex acted, not just what it did, so security teams can audit its behavior and tune the rollout.

Sandboxing and Approvals

  • The sandbox sets the technical boundary: where Codex can write, whether it can reach the network, and which paths stay protected.
  • The approval policy decides when Codex must ask before acting, such as when it needs to step outside the sandbox. Users can approve an action once or approve that action type for the session.
  • Auto-review mode auto-approves certain requests. Codex sends the planned action and recent context to an auto-approval subagent, which approves low-risk actions, or high-risk ones backed by sufficient user authorization, without interrupting the user.
  • Example config sets approvals_reviewer = "auto_review", adds ~/development to writable_roots, and restricts allowed_sandbox_modes to read-only and workspace-write.

Network Access

  • Codex does not get open-ended outbound access. A managed network policy allows expected destinations, blocks unwanted ones, and requires approval for unfamiliar domains.
  • Web search is limited to cached results (allowed_web_search_modes = ["cached"]).
  • The network proxy is enabled with localhost binding allowed. pastebin.com is denied, and specific domains such as login.microsoftonline.com and *.openai.com are auto-allowed.

Identity and Credentials

  • CLI and MCP OAuth credentials are stored in the OS keyring instead of plaintext files.
  • Login is forced through ChatGPT and pinned to a specific enterprise workspace ID, so usage stays under workspace-level controls.
  • Codex activity appears in the ChatGPT Compliance Logs Platform.

Command Rules

  • Codex does not treat every shell command the same. Starlark prefix_rule entries define per-command decisions with a justification string.
  • Benign read-only commands like gh pr view, gh pr list, and kubectl get, describe, or logs run without approval outside the sandbox.
  • Dangerous patterns can be blocked or routed to approval.

Managed Configuration

  • Controls are delivered through cloud-managed requirements, macOS managed preferences, and local requirements files. Users cannot override admin-enforced requirements.
  • Teams can test different configurations by team, user group, or environment while keeping a consistent baseline.
  • These settings apply across the desktop app, CLI, and IDE extension.

Agent-Native Telemetry and Audit Trails

  • Traditional security logs show that a process started or a connection was attempted, but not why. Codex's telemetry adds the user's intent and the agent's reasoning context.
  • Codex exports OpenTelemetry logs for user prompts (log_user_prompt = true), tool approval decisions, tool execution results, MCP server usage, and network proxy allow or deny events. Logs can be sent to an OTLP endpoint and centralized in SIEM and compliance systems.
  • When an endpoint alert flags unusual Codex behavior, an AI security triage agent reviews the original request, tool activity, approvals, results, and network decisions. It then reports to the security team, which separates expected agent behavior and benign mistakes from activity that needs escalation.
  • The same logs support adoption analytics: which tools and MCP servers are used, how often the network sandbox blocks or prompts, and where the rollout needs tuning.

Takeaway

For security teams adopting coding agents, the post argues that the combination of enforced configuration, constrained execution, explicit network and credential policy, and agent-aware telemetry lets organizations deploy Codex with confidence while preserving developer productivity. OpenAI's configuration and Compliance API documentation are linked for implementation details.

Continue with another curated summary.