PromptReports
Agent policy

OpenAI Codex: requirements.toml

PromptReports ID makes OpenAI Codex's requirements.toml from your org's agent policy. Your device management puts it on each machine, where OpenAI Codex reads it.

State: Planned: built behind AGENT_POLICY, which is off

PromptCompute built the policy and these files behind the AGENT_POLICY switch, which is off in production. Until it is on, the Agent policy page and the downloads are not served.

What it holds

A [mcp_servers.<name>] table with an identity for each server: its url, or its command with the program and each argument matched exactly. Codex runs a server only when its name and its identity both match. An empty [mcp_servers] table turns MCP off.

[rules] prefix_rules asks (decision = "prompt") before a command that starts with a shell pattern's leading words, and before every git commit when the policy has a commit approval.

How device management pushes it

  1. An owner or admin sets the org's agent policy on the Agent policy page at PromptReports ID, or through set_agent_policy on the family MCP. Each change is an approval in the credentials class: an owner or admin other than the person who asked decides it, never an agent, and the applied change is an agent_policy.applied entry in the org's signed ledger.
  2. Download requirements.toml from the Agent policy page. Any member of the org may download it, from an address the org allows. The ID serves it at GET /v1/agent-policy/files/codex-requirements?org_id=<org id>.
  3. In your device management, put it at /etc/codex/requirements.toml on macOS, /etc/codex/requirements.toml on Linux and %ProgramData%\OpenAI\Codex\requirements.toml on Windows.
  4. Download it again after each change to the policy and push the new copy. The X-Agent-Policy-Version header names the policy version the file was made from, and the ETag changes whenever the file's bytes do.

What OpenAI Codex cannot enforce from it

Codex runs only these servers. Its requirements file has no tool list and no file rule. A shell rule matches the command's leading words up to the first wildcard, so it asks more often than the pattern says; a pattern that starts with a wildcard is left to the hook package. A commit rule asks for every git commit.

From the example policy

# Made from the PromptCompute agent policy of org_example, version 3. Do not edit; change the policy instead.

[mcp_servers.github]
identity = { url = "https://api.githubcopilot.com/mcp/" }

[mcp_servers.files.identity]
command = { executable = "npx", args = [{ match = "exact", value = "-y" }, { match = "exact", value = "@modelcontextprotocol/server-filesystem" }, { match = "exact", value = "." }] }

[rules]
prefix_rules = [
  { pattern = [{ token = "git" }, { token = "commit" }], decision = "prompt", justification = "PromptCompute agent policy: a commit needs a person's approval" },
  { pattern = [{ token = "npm" }, { token = "run" }], decision = "prompt", justification = "PromptCompute agent policy: npm run migrate* needs a person's approval" },
]

The example policy is on the agent policy page.

Docs: https://learn.chatgpt.com/docs/enterprise/managed-configuration, https://learn.chatgpt.com/docs/config-file/config-reference