opencodex is a local proxy that lets OpenAI Codex and other coding tools use language models from different providers through a common interface. It is for people who want to run models such as Claude, Gemini, Grok, DeepSeek, or Ollama with Codex, Claude Code, Claude Desktop, or Grok Build. The catalogue add-on supports workflows built around this proxy.
Borrowing it
Nothing to install: this file belongs to lidge-jun/opencodex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lidge-jun/opencodex/main/AGENTS.mdgit clone --depth 1 https://github.com/lidge-jun/opencodexWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/lidge-jun/opencodex/agents-md)<a href="https://agentmods.dev/instructions/lidge-jun/opencodex/agents-md"><img src="https://agentmods.dev/badge/instructions/lidge-jun/opencodex/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/lidge-jun/opencodex/agents-md"><img src="https://agentmods.dev/badge/instructions/lidge-jun/opencodex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.06679 | $0.06679 |
| Opus 5.5 | $0.02672 | $0.02672 |
| Sonnet 5.5 | $0.01336 | $0.01336 |
| Haiku 4.5 | $0.00668 | $0.00668 |
Grade C, and why
opencodex AGENTS.md scanned grade C with 2 findings 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 7d 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
curl -fsSL https://bun.sh/install | bash # installs ~/.bun/bin/bun Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -fsSL https://bun.sh/install | bash # installs ~/.bun/bin/bun How it starts
The opening of the file, as written. The whole thing — 484 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Guidance for AI agents (and humans) working on or reviewing this repository.
What this project is
opencodex (ocx) is a universal provider proxy for OpenAI Codex and Claude Code:
one local proxy that lets Codex CLI/App/SDK and Claude Code use many LLM
providers (Claude, Gemini, Grok, DeepSeek, Ollama, and more). The runtime is
Bun-native TypeScript with no separate server compile step.
Repository layout
src/— proxy runtime: routing, provider adapters, config, management API.tests/— Bun tests in domain directories that mirrorsrc/(tests/<domain>/*.test.ts;providers/andadapters/have one more level for the larger vendors). The explicit map isscripts/test-layout/layout.jsonplus itsexplicitShardssibling maps, with regex seeds and migration state inscripts/test-layout/seeds.json;tests/test-layout.test.tsenforces that every file resolves to a domain and sits in it, and only the two layout guards live at the root. Shared helpers intests/helpers/, fixtures intests/fixtures/, broader scenarios intests/e2e-style/. Source-oracle tests resolve the repository throughtests/helpers/repo-root.ts(repoRoot(),repoPath(),helperPath(),fixturePath()), neverimport.meta.dir + "/..". A new test file lands in its domain directory and needs an entry in bothlayout.jsonexplicit(or its domain shard) and atests/fixtures/test-layout-expected*.jsonshard (tests/test-layout-tooling.test.tsnames the missing one); the regex seeds inseeds.jsonplace a conventionally named file until then. History:devlog/_fin/260905_test_modularization_and_windows/.gui/— React + Vite dashboard; packaged output is served fromgui/dist.app/— native macOS WidgetKit extension bundled into the Tauri desktop app;MenuBarCoreis its snapshot model/formatting layer. Its tests are executables, not XCTest bundles — Command Line Tools ships neither a usable XCTest module nor the swift-testing runtime.docs-site/— public docs (Astro + Starlight), deployed to GitHub Pages.go/— retired Go native-runtime experiment; kept only where the TypeScript runtime still references it. New work does not go here.structure/— maintainer invariants and architecture notes; read before changing shared subsystems.structure/INDEX.mdis the reading order and the source-ownership table, andstructure/AGENTS.mdholds the rules for changing anything in there. Ownership is not advisory: changing an owned source area obliges the same change to update its doc, andbun run structure:check(wired into the suite bytests/ci-workflows/structure-ssot.test.ts) fails on a doc that names a path this tree no longer has, on an invariant whose test is gone, and on a newsrc/area nobody claimed.scripts/— release and maintenance tooling;scripts/release.tsis the release authority.desktop/— Tauri v2 desktop shell, bootstrap UI, and compiled proxy sidecar preparation.devlog/— planning and investigation notes, tracked in this repository. See "Thedevlogdirectory" below for what may and may not go there.
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.
- 7d ago Changed · +14 lines · +326 tokens per session 8eed3edfe4c1
- 9d ago Changed · +5 lines · +121 tokens per session b4d6f1dc4dfe
- 23d ago Changed · +8 lines · +133 tokens per session 6cc6ce871cea
- 1mo ago Changed · +1 lines · +18 tokens per session ad1bda04b2f7
- 1mo ago Changed · +10 lines · +175 tokens per session 80654eab1988
- 1mo ago Changed · +13 lines · +123 tokens per session 8aeeadb9b75b
- 1mo ago Changed · +49 lines · +675 tokens per session d5c37ad819a0
- 1mo ago Changed · +9 lines · +176 tokens per session 01fc2b107a0e
- 1mo ago Changed · -3 tokens per session 240dce7a5bf8
- 2mo ago First seen · 375 lines · 4,935 tokens per session scan C 8d8c9de6146a
opencodex AGENTS.md is an instructions file published in the GitHub repository lidge-jun/opencodex (18,235 stars, last pushed 2d ago), licensed MIT. It adds 6,679 tokens to every session, about $0.0267 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
opencodex AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| opencodex AGENTS.mdlidge-jun/opencodex | Instructions file | 18k | 2d ago | MIT | C | 6,679 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |