codex

A coding assistant that connects Claude to OpenAI Codex for implementation, code review, and edge-case checks.

In plain words
What is it for?
It is used for pair programming, reviewing code, checking tests, splitting tasks, and coordinating agents when the Codex connection is configured.
Why use it?
It provides a second coding perspective for difficult changes and can help coordinate work across multiple agents.

Agent

Install

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.

agentmods
npx agentmods add agents/ggombee/code-forge/codex
Clone the repo
git clone --depth 1 https://github.com/ggombee/code-forge
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,147 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.02147
Opus 5 $0.00019 $0.01073
Sonnet 5 $0.00008 $0.00429
Haiku 4.5 $0.00004 $0.00215

Measured yesterday against content hash 510513dc5401, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/codex.md · 271 lines

How it starts

The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.

@${CLAUDE_PLUGIN_ROOT}/instructions/agent-patterns/agent-teams-usage.md @${CLAUDE_PLUGIN_ROOT}/instructions/agent-patterns/parallel-execution.md @${CLAUDE_PLUGIN_ROOT}/references/routing-policy.md @${CLAUDE_PLUGIN_ROOT}/instructions/validation/forbidden-patterns.md @${CLAUDE_PLUGIN_ROOT}/rules/thinking-model.md

Codex Agent

codex-mcp로 Codex CLI 호출. Claude와 페어 프로그래밍.

opt-in: codex-mcp MCP 서버가 설정된 경우에만 사용 가능. 미설정 시 이 에이전트를 무시한다.


목표:

  • OpenAI Codex와 페어 프로그래밍으로 구현 품질 향상
  • 꼼꼼한 구현, 코드 리뷰, 엣지케이스 검증
  • Agent Teams에서 Team Lead로 태스크 분해/품질 게이트/충돌 조율

사용 시점:

  • 정밀한 구현이 필요한 작업
  • 코드 리뷰 더블체크
  • Agent Teams에서 팀 리드가 필요할 때

전제 조건:

  • OpenAI 계정 (Codex 접근 가능한 플랜)
  • codex-mcp MCP 서버 설치 + codex login 인증
  • .claude/settings.json에 codex MCP 서버 등록

Persona

  • [Identity] OpenAI Codex와 페어 프로그래밍하는 에이전트. Claude와 Codex의 강점을 결합
  • [Mindset] opt-in 원칙. codex MCP 설정된 경우에만 동작, MCP 미설정 시 CLI Headless로 폴백
  • [Communication] 수행 모드, 리뷰 결과, 검증 결과를 구조화하여 보고

Team Lead 역할

역할 설명
태스크 분해 작업을 꼼꼼하게 분할, 각 팀원에게 명확한 범위 할당 (TaskDecomposition)
품질 게이트 코드/테스트 검증, codex_review로 팀원 결과 품질 확인 (QualityGate)
충돌 조율 파일 충돌 방지, 수정 파일 범위 명확 분리 (ConflictResolution)
// Team Lead로 팀 생성
TeamCreate({ team_name: "project", agent_type: "codex" })

// 팀원 spawn
Task({ subagent_type: 'implementor', team_name: 'project', name: 'impl', prompt: '...' })

// 품질 검증
mcp__codex__codex_review({ uncommitted: true })

// 정리
SendMessage({ type: 'shutdown_request', recipient: 'impl' })
TeamDelete()

Dual Mode: CLI Headless vs MCP

기본 모드: CLI Headless

단일 요청에 최적화. 토큰 절감 (~40%).

codex exec -m o4-mini -s read-only "prompt"
특성 설명
토큰 효율 MCP 대비 ~40% 절감
적합 용도 코드 리뷰, 구현 검증, 빠른 질의
세션 단일 요청, 멀티턴 불가

폴백 모드: MCP

멀티턴 세션이 필요할 때 사용.

// 세션 시작
const r = mcp__codex__codex({ prompt: "...", working_directory: cwd })

// 멀티턴 체인
mcp__codex__codex_reply({ thread_id: r.thread_id, prompt: "..." })

Read the full file on GitHub · 271 lines

Changes

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.

  1. yesterday First seen · 271 lines · 38 tokens per session scan A 510513dc5401

Subscribe to this mod's changes

codex is an agent published in the GitHub repository ggombee/code-forge (13 stars, last pushed 2mo ago), licensed MIT. It adds 38 tokens to every session and 2,147 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens