# One agent policy, a managed file for each coding assistant

Raw: https://promptreports.ai/id/agent-policy.md

An org's agent policy at PromptReports ID lists the MCP servers its agents may use, each by one exact https address or one exact command, the tools allowed on each, and the shell commands, file paths, commits and MCP tools that need a person's approval. From that policy the ID makes the managed file each coding assistant reads, for your device management to put on every machine. The page for each file says how.

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.

## The example policy

The example policy from PromptCompute's design for this work. Each page below shows the file the ID makes from it, from the generator in promptcompute.ai `packages/approvals/src/agent-policy-files.ts`, run on 2026-11-24.

```json
{
  "format": "promptcompute-agent-policy/v1",
  "org_id": "org_example",
  "version": 3,
  "servers": [
    {
      "name": "github",
      "url": "https://api.githubcopilot.com/mcp/",
      "tools": [
        "*"
      ]
    },
    {
      "name": "files",
      "command": [
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "."
      ],
      "tools": [
        "list_directory",
        "read_file"
      ]
    }
  ],
  "approvals": [
    {
      "kind": "shell",
      "pattern": "npm run migrate*"
    },
    {
      "kind": "file",
      "pattern": "infra/**"
    },
    {
      "kind": "commit",
      "pattern": "main"
    },
    {
      "kind": "mcp",
      "pattern": "github:merge_*"
    }
  ]
}
```

## Claude Code: managed-mcp.json

Page: https://promptreports.ai/id/agent-policy/claude-code-mcp/

Each server of the policy, as an `http` entry with its URL or a `stdio` entry with its command and arguments. Once the file is on a machine, Claude Code loads only these servers.

A policy with no servers gives `{ "mcpServers": {} }`, which turns MCP off.

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 `managed-mcp.json` 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/claude-code-mcp?org_id=<org id>`.
3. In your device management, put it at `/Library/Application Support/ClaudeCode/managed-mcp.json` on macOS, `/etc/claude-code/managed-mcp.json` on Linux and `C:\Program Files\ClaudeCode\managed-mcp.json` 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 Claude Code cannot enforce from this file: Claude Code loads only these servers. Tool lists and approvals are in managed-settings.json.

From the example policy:

```json
{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    },
    "files": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "."
      ]
    }
  }
}
```

Docs: https://code.claude.com/docs/en/managed-mcp

State: Planned: built behind AGENT_POLICY, which is off

## Claude Code: managed-settings.json

Page: https://promptreports.ai/id/agent-policy/claude-code-settings/

`allowedMcpServers` names each server by `serverUrl` or `serverCommand`, and `allowManagedMcpServersOnly` makes Claude Code ignore allowlists outside managed settings.

`permissions.allow` lets each listed tool that no approval names run without asking, as `mcp__<server>__<tool>`. `permissions.ask` holds a rule for each approval: `Bash(<pattern>)` for a shell command, `Edit(<pattern>)` for a file path, `Bash(git commit *)` for a commit, and `mcp__<server>__<tool>` for an MCP tool.

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 `claude-code-managed-settings.json` 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/claude-code-settings?org_id=<org id>`.
3. In your device management, put it at `/Library/Application Support/ClaudeCode/managed-settings.json` on macOS, `/etc/claude-code/managed-settings.json` on Linux and `C:\Program Files\ClaudeCode\managed-settings.json` 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 Claude Code cannot enforce from this file: Deploy it with managed-mcp.json: tool rules name a server, and only that file fixes which server a name means. Claude Code asks, rather than refuses, before a tool that is not on a server's list. A commit rule asks for every commit, since a rule cannot name a branch; the hook package narrows it. A file rule is read from the session's folder, and a shell pattern with a parenthesis or a file pattern starting with ! or # or holding [ ] ? is left to the hook package.

From the example policy:

```json
{
  "allowedMcpServers": [
    {
      "serverUrl": "https://api.githubcopilot.com/mcp/"
    },
    {
      "serverCommand": [
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "."
      ]
    }
  ],
  "allowManagedMcpServersOnly": true,
  "permissions": {
    "allow": [
      "mcp__files__list_directory",
      "mcp__files__read_file"
    ],
    "ask": [
      "Bash(npm run migrate*)",
      "Edit(infra/**)",
      "Bash(git commit *)",
      "mcp__github__merge_*"
    ]
  }
}
```

Docs: https://code.claude.com/docs/en/managed-settings, https://code.claude.com/docs/en/permissions, https://code.claude.com/docs/en/settings

State: Planned: built behind AGENT_POLICY, which is off

## OpenAI Codex: requirements.toml

Page: https://promptreports.ai/id/agent-policy/codex-requirements/

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 this file: 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:

```toml
# 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" },
]
```

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

State: Planned: built behind AGENT_POLICY, which is off

## Cursor: permissions.json

Page: https://promptreports.ai/id/agent-policy/cursor-permissions/

`mcpAllowlist` holds `server:tool` for each listed tool that no approval names. Those calls run without asking. The file blocks no server.

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 `permissions.json` 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/cursor-permissions?org_id=<org id>`.
3. In your device management, put it at `~/.cursor/permissions.json` on macOS, `~/.cursor/permissions.json` on Linux and `%USERPROFILE%\.cursor\permissions.json` 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 Cursor cannot enforce from this file: This file only lets the listed tools run without asking, by the server name in each mcp.json, which a repository can choose. Cursor blocks a server only from its team dashboard (MCP Configuration), so set the same servers there, by address or command.

From the example policy:

```json
{
  "mcpAllowlist": [
    "files:list_directory",
    "files:read_file"
  ]
}
```

Docs: https://cursor.com/docs/reference/permissions, https://cursor.com/docs/enterprise/deployment-patterns

State: Planned: built behind AGENT_POLICY, which is off

## GitHub Copilot: managed-settings.json

Page: https://promptreports.ai/id/agent-policy/copilot-settings/

`allowedMcpServers` names each server by `serverUrl` or `serverCommand`, with `allowManagedMcpServersOnly`.

`permissions.ask` holds `Shell(<pattern>)` for a shell command, `Edit(<pattern>)` for a file path and `Shell(git commit *)` for a commit.

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 `copilot-managed-settings.json` 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/copilot-settings?org_id=<org id>`.
3. In your device management, put it at `/Library/Application Support/GitHubCopilot/managed-settings.json` on macOS, `/etc/github-copilot/managed-settings.json` on Linux and `%ProgramFiles%\GitHubCopilot\managed-settings.json` 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 GitHub Copilot cannot enforce from this file: Copilot has no rule for one MCP tool, so tool lists and mcp patterns are left to the gateway. A shell rule matches a prefix (git push *) or exact text, so a pattern with a wildcard inside asks for its leading words; one that starts with a wildcard is left to the hook package. A commit rule asks for every commit.

From the example policy:

```json
{
  "allowedMcpServers": [
    {
      "serverUrl": "https://api.githubcopilot.com/mcp/"
    },
    {
      "serverCommand": [
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "."
      ]
    }
  ],
  "allowManagedMcpServersOnly": true,
  "permissions": {
    "ask": [
      "Shell(npm run *)",
      "Edit(infra/**)",
      "Shell(git commit *)"
    ]
  }
}
```

Docs: https://docs.github.com/en/copilot/reference/enterprise-administrators/enterprise-managed-settings, https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-mcp-usage/configure-enterprise-allowlist

State: Planned: built behind AGENT_POLICY, which is off

## The hook package's file

The sixth download, `promptcompute-agent-policy.json`, is the policy itself. Device management puts it next to Claude Code's `managed-settings.json`, where the RepoOps hook package reads it to send matching shell, file and commit actions to a PromptCompute approval. The hook package is built in repo-dashboard behind `AGENT_ACTION_APPROVALS`, which is off.

## State

- Claude Code managed-mcp.json, made from the org's agent policy: Planned: built behind AGENT_POLICY, which is off
- Claude Code managed-settings.json, made from the org's agent policy: Planned: built behind AGENT_POLICY, which is off
- OpenAI Codex requirements.toml, made from the org's agent policy: Planned: built behind AGENT_POLICY, which is off
- Cursor permissions.json, made from the org's agent policy: Planned: built behind AGENT_POLICY, which is off
- GitHub Copilot managed-settings.json, made from the org's agent policy: Planned: built behind AGENT_POLICY, which is off

Every file name, path and field on these pages comes from the generator and the download route in promptcompute.ai, read on 2026-11-24. Each generator follows the client's docs cited on its page. Nobody has pushed a generated file to a machine yet; that is the owner's check in wp-97 task 6.2.

Page: https://promptreports.ai/id/agent-policy/
