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 instructions/softcane/codex-blackbox/agents-mdgit clone --depth 1 https://github.com/softcane/codex-blackboxWhat 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.01559 | $0.01559 |
| Opus 5 | $0.00779 | $0.00779 |
| Sonnet 5 | $0.00312 | $0.00312 |
| Haiku 4.5 | $0.00156 | $0.00156 |
Grade B, and why
codex-blackbox AGENTS.md 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 2d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Do not mutate `~/.codex/config.toml` for wrapper behavior. How it starts
The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex Blackbox Agent Instructions
These instructions apply to the whole repository unless a deeper AGENTS.md
overrides them.
Product Boundary
- Codex Blackbox observes Codex traffic through a local Envoy proxy,
codex-blackbox-core, and thecodex-blackboxCLI. - Fake OpenAI Responses fixtures validate local contracts only. Do not turn a fake e2e result into a live Codex support claim.
- Live support claims require explicit real smoke or dogfood evidence.
- Prefer the current code and tests over stale copied comments or old planning text.
Implementation Map
- Architecture and harness map:
ARCHITECTURE.md,docs/index.md,docs/harness.md - Request parsing:
codex-blackbox-core/src/codex_request.rs - Response SSE accumulation:
codex-blackbox-core/src/codex_response.rs - Turn accounting:
codex-blackbox-core/src/codex_accounting.rs - Pricing:
codex-blackbox-core/src/pricing.rs - Runtime, persistence, hooks, and Envoy ext_proc:
codex-blackbox-core/src/main.rs - Watch event types:
codex-blackbox-core/src/watch.rs - Metrics:
codex-blackbox-core/src/metrics.rs - CLI wrapper, preflight, watch rendering:
codex-blackbox-cli/src/main.rs
Worktree Rules
- For multi-step work, use
docs/PLANS.mdand keep active plans indocs/exec-plans/active/. - Read the code path and nearby tests before changing behavior.
- Use
rg/rg --filesfor searches. - Check
git status --shortbefore and after meaningful edits. - Do not revert or overwrite user changes.
- Keep changes scoped to the requested behavior and surrounding module.
- Use
apply_patchfor manual edits. - Update tests and user-facing docs when behavior changes.
Codex Routing
codex-blackbox run -- codex ...uses the experimental ChatGPT subscription proxy path.- The default Envoy listener routes
/backend-apitochatgpt.com. - Codex model turns use command-line config overrides:
chatgpt_base_url,openai_base_url,model_provider="openai", andfeatures.enable_request_compression=false. - Do not mutate
~/.codex/config.tomlfor wrapper behavior. - Do not inject
--ephemeral; Codex keeps normal session persistence. - Remove inherited parent-session
CODEX_*variables listed in the CLI before spawning child Codex processes. OPENAI_API_KEYis not used for ChatGPT subscription proxy mode.- A successful
codex execchild run must still fail the wrapper ifcodex-blackbox-coreobserves no newprovider="codex_responses"request.
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.
- 2d ago First seen · 148 lines · 1,559 tokens per session scan B 932d3135f156
codex-blackbox AGENTS.md is an instructions file published in the GitHub repository softcane/codex-blackbox (6 stars, last pushed 3mo ago), licensed MIT. It adds 1,559 tokens to every session, about $0.0078 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
kmux AGENTS.md
Instructions for kkd927/kmux, covering agents.md, kmux focus and test discipline.
corral AGENTS.md
Instructions for x0c/corral, covering corral, 文档导航, 组件一览, 领域地图(doc-init) and 待补充知识库(doc-init backlog).
Vibe-Halo AGENTS.md
AGENTS.md instructions for DaliBerr/Vibe-Halo, covering agents.md, project scope and repository entry points.
codex-bmad-skills AGENTS.md
AGENTS.md instructions for xmm/codex-bmad-skills, covering bmad for openai codex, runtime contract, skill sources in this repository, trigger intents and migration safety rules.
llm-guard AGENTS.md
Instructions for HendrikReh/llm-guard, covering ai coding assistant onboarding guide, 1. hackathon context, 1.1 event overview, 1.2 current project: llm-guard and 2. collaboration philosophy.
corral CLAUDE.md
Instructions for x0c/corral, a project described as: Corral: terminal session handoff for Claude Code, Codex, OpenCode, Kimi, Cursor, and Pi.