Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/andrewaltimit/template-repo/codex-setupgit clone --depth 1 https://github.com/AndrewAltimit/template-repoWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02260 |
| Opus 5 | $0.00000 | $0.01130 |
| Sonnet 5 | $0.00000 | $0.00452 |
| Haiku 4.5 | $0.00000 | $0.00226 |
Grade B, and why
codex-setup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
**Security Notice**: Codex can execute arbitrary code. The MCP integration defaults to **safe sandboxed mode** to protect your system. How it starts
The opening of the file, as written. The whole thing — 310 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex Agent Setup and Configuration
THIS INTEGRATION IS DISABLED
OpenAI has entered partnerships with governments that conduct mass surveillance and enable autonomous weapons. All OpenAI/Codex/GPT integrations in this project have been disabled as of March 2026. The mass surveillance exposure alone makes any OpenAI product an unacceptable security risk for pipelines handling proprietary or sensitive code.
We strongly recommend Anthropic models (Claude) as the primary AI backend. If you choose to re-enable OpenAI integrations despite these risks, do so with extreme caution, full awareness of the data exposure implications, and only if you truly understand what you are opting into.
To re-enable: restore the
codexkey in.mcp.json, change docker-compose profiles back fromcodex-disabledtoservices/codex, and restore theifcondition inpr-validation.yml.
This guide covers the setup and usage of OpenAI Codex as an AI agent in the repository.
Overview
Codex is OpenAI's AI system that translates natural language to code. It powers GitHub Copilot and can be used as a standalone CLI tool for code generation, completion, and refactoring tasks.
Important: Sandbox Configuration
Security Notice: Codex can execute arbitrary code. The MCP integration defaults to safe sandboxed mode to protect your system.
Default Safe Mode (Recommended)
By default, the Codex MCP server runs with:
--sandbox workspace-write: Restricts file system access to workspace only--full-auto: Bypasses manual approvals but maintains sandbox restrictions
This is the recommended configuration for most users.
Sandboxed VM Mode (Advanced)
If you're running in an already-sandboxed environment (VM, container, or isolated system), you can enable bypass mode:
# Set environment variable BEFORE starting the MCP server
export CODEX_BYPASS_SANDBOX=true
# This enables --dangerously-bypass-approvals-and-sandbox
# ONLY use this in sandboxed VMs or containers!
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 310 lines · 0 tokens per session scan B ad524aafa5ca
codex-setup is an agent published in the GitHub repository AndrewAltimit/template-repo (131 stars, last pushed 1mo ago), licensed Unlicense. It costs nothing until one of its globs matches a file; then it loads 2,260 tokens. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
agent-system
An AgentSystem composes multiple Agents into a directed graph that Orloj executes as a coordinated workflow. The graph defines how messages flow between agents during task execution.
ai-safety-auditor
AI safety and security auditor for LLM systems. Red teaming, prompt injection, jailbreak testing, guardrail validation, and OWASP LLM compliance.
Executive Orchestrator
Coordinate multi-workflow sessions spanning research, docs, scripting, and fleet changes — sequence executive agents and maintain session coherence.
grader
INTERNAL SMARTS analyst dispatched by the decision-variance skill. Produces a SMARTS analysis and recommendation for one (artifact-position, scaffold-evidence) pair. Never decides — the user decides. Never dispatch directly.
Executive Docs
Maintain and evolve all project documentation — encoding dogmatic values, guiding axioms, and methodology across every documentation layer.
D4 Methodology Enforcer
Validate proposed changes against MANIFESTO.md axioms — flag over-interactivity, unnecessary token burn, and Programmatic-First violations.