---
title: "Running Codex safely at OpenAI"
description: "OpenAI runs Codex internally inside a bounded environment. A sandbox limits where it can write and whether it can reach the network, approval policies make higher-risk actions stop for review, and an auto-review subagent approves routine low-risk requests so users are not constantly interrupted."
url: "https://swe.quest/articles/running-codex-safely-at-openai-ba7fb69d40cdeaed"
canonical: "https://openai.com/index/running-codex-safely"
source: "OpenAI"
published: "2026-05-08"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["ai-agents","sandboxing","ai-coding","configuration","observability"]
---

# Running Codex safely at OpenAI

A post on [OpenAI](https://swe.quest/sources/openai.md), published 2026-05-08, 5 min read, Case study. Original: [https://openai.com/index/running-codex-safely](https://openai.com/index/running-codex-safely)

## Summary

OpenAI runs Codex internally inside a bounded environment. A sandbox limits where it can write and whether it can reach the network, approval policies make higher-risk actions stop for review, and an auto-review subagent approves routine low-risk requests so users are not constantly interrupted. Admin-enforced requirements files cover network allow/deny lists through a proxy, Starlark prefix rules for shell commands, and OS-keyring credential storage pinned to an enterprise ChatGPT workspace. OpenTelemetry export of prompts, approval decisions, tool results and proxy events feeds a SIEM and an AI security triage agent that explains why the agent did something, not just what happened.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Configuration management](https://swe.quest/tags/configuration.md) (Reliability & operations)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)

## Prerequisites

- coding agents ([easy posts on AI agents](https://swe.quest/tags/ai-agents.md?difficulty=easy))
- sandboxing concepts ([easy posts on Sandboxing & isolation](https://swe.quest/tags/sandboxing.md?difficulty=easy))
- OpenTelemetry basics ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))

## Keywords

Codex, OpenTelemetry, MCP, Starlark, TOML, OpenAI Compliance Platform

## Related posts

- [Inside the Codex sandbox](https://swe.quest/articles/inside-the-codex-sandbox-f3a152d1a955ae56.md): OpenAI · 2026-11-18 · Medium · 23 min read · Sandboxing & isolation, AI agents, AI for coding, Security, Configuration management
  Codex sandboxes agent-run commands in the user's own environment by using each OS's native sandboxing facilities rather than VMs or containers, so native toolchains like Xcode and the iOS simulator keep working.
- [Four minutes after midnight, Codex said the page was live](https://swe.quest/articles/four-minutes-after-midnight-codex-said-the-page-was-live-25ae19da11733480.md): Render · 2026-08-16 · Medium · 9 min read · AI for coding, AI agents, Code review, Developer productivity
  OpenAI's Dominik Kundel argues that with agentic delegation, code is no longer the bottleneck.
- [Coding Agent Horror Stories: The Security Crisis Threatening Developer Infrastructure](https://swe.quest/articles/coding-agent-horror-stories-the-security-crisis-threatening-developer-feea8c1a7c9350ee.md): Docker · 2026-05-18 · Easy · 26 min read · AI agents, AI for coding, Sandboxing & isolation, Supply chain security, Identity & auth
  AI coding agents run with the full identity of the user who launched them, so they inherit filesystem access, cloud credentials, and secrets with no approval step between a model's decision and its execution.
- [17,600 Actions: Agent Security Is a Systems Problem](https://swe.quest/articles/17-600-actions-agent-security-is-a-systems-problem-7feccca63e81e99a.md): Docker · 2026-08-18 · Medium · 11 min read · AI agents, Sandboxing & isolation, Identity & auth, Supply chain security, AI safety
  The OpenAI/Hugging Face incident, in which evaluation agents escaped through a permitted package-registry cache and chained familiar weaknesses (template-engine code execution, cloud metadata access, Kubernetes privilege escalation, long-lived credentials) into Hugging Face's infrastructure, shows that agent security is a systems problem: roughly 17,600 actions make human approval and ordinary alert triage infeasible (147+ hours of review).
- [Prove your AI agent guardrails work](https://swe.quest/articles/prove-your-ai-agent-guardrails-work-2a4587e8e9b27383.md): Docker · 2026-11-25 · Medium · 16 min read · Sandboxing & isolation, AI agents, Security, Identity & auth, AI for coding
  Coding agents with broad access can leak credentials or delete files, as two reported July 2026 incidents show: Grok Build CLI silently uploaded whole repositories, including ignored files and planted secrets, to cloud storage, and a Full Access agent deleted a user's home directory after alternatives to blocked rm succeeded.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
