# Repository Briefing: JAY201368/codex-castor
> Source: https://repoforai.com/repo/JAY201368/codex-castor (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/JAY201368/codex-castor
- **Official Docs / Website**: https://jay201368.github.io/codex-castor/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (83/100 · Maintenance 35/35 · Adoption 8/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.3.0 (2026-12-04) — https://github.com/JAY201368/codex-castor/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: MCP, CLI, Self-Hosted
- **Momentum**: 64 ★ total (+2 24h / +58 7d) · 3 forks
- **Topics**: `ai-agents`, `antigravity`, `codex`, `gemini`, `git-worktree`, `mcp`, `python`
- **When to Use**: Best for: Antigravity users who repeatedly delegate repository changes to Codex and want independent review, optional worktree separation, and a reviewable record of cost and outcomes. Skip if: You only need occasional direct Codex runs, require offline inference, or expect background wakeup to work unchanged across MCP clients.

## Overview
```text
### Architecture & Core Mechanics
Codex Castor is a Python 3.9+ MCP bridge with no third-party Python dependencies. `mcp/server.py` accepts newline-delimited JSON-RPC 2.0 over stdio and handles each tool call in a worker thread. Gemini in Antigravity writes the implementation brief; the bridge launches `codex exec` or `codex exec resume`, records Codex's JSON event stream on disk, and returns the final report alongside Git status, diff statistics, telemetry, and artifact paths.

Background execution and wakeup belong to the Antigravity client, not to stdio itself. That division lets Gemini end its turn and return to review the diff and run checks when Codex finishes. The orchestrator skill and `config/GEMINI.md` define the handoff procedure; `mcp/telemetry.py` and the `mcp/monitor.html` MCP App handle persistent metrics and task inspection separately from that procedure.

### Key Capabilities & Differentiators
Seven MCP tools cover dispatch, resume, feedback, status, cancellation, managed worktree cleanup, and monitoring. Dispatch accepts a brief inline or from a file and can create a separate Git worktree and branch for concurrent implementation. Resume sends review feedback to the existing Codex session. The final report schema fixes six fields: status, summary, changed files, commands run, test summary, and open issues.

Execution remains on Codex CLI, with options for a model, reasoning effort, Fast mode, and permission policy. Monitor and the analytics CLI combine per-round and cumulative time and token counts with rework counts, ratings, and verdicts; the exports include `telemetry.jsonl`, `telemetry.csv`, and `report.md`. Both analytics surfaces exclude failed tasks from aggregates, so use task-level failure details alongside the model-by-effort matrix when judging reliability.

### Trade-offs & Limitations
Compared with running Codex CLI directly, Castor adds a repeatable spec-to-review loop, same-session rework, and consistent task records. Those benefits come with an Antigravity-specific skill, hook, and client configuration. Other MCP clients can receive progress and log notifications, but do not inherit Antigravity's automatic wakeup. The Monitor's periodic refresh is separate from the architect's workflow: it does not require Gemini to poll for completion.

Git worktrees separate branches and working copies; they are not a security boundary. Review Codex's permission policy before granting extra writable directories, and treat forced worktree cleanup as destructive: it can discard local changes and delete an unmerged branch. Local state can contain prompts, verbatim first replies, and execution events, so decide who can access those records and how long to retain them.

### Hardware & Deployment Guide
Deployment is a local stdio integration, not a hosted service. It requires Python 3.9+, Git, a working Codex CLI with an account configured, and Antigravity for the bundled workflow. Use `./scripts/install.sh` on macOS or Linux and `py -3 scripts/install.py` on Windows 11 x64; the Windows path uses native executables without WSL. Reload Antigravity, then run `scripts/doctor.py` with the appropriate Python launcher to verify the installation and the MCP handshake.

The installer manages files under the Gemini configuration directory and backs up `hooks.json` when changing it. Use `--dry-run` to preview changes; enable the optional CLI status line with `--install-statusline`. Release v1.2.0 added Fast mode support and the Antigravity composer widget. v1.3.0 added permission and approval configuration across the server and UI surfaces.
```

## Key Capabilities
```text
- Transport: `mcp/server.py` uses newline-delimited JSON-RPC 2.0 over stdio and handles each call in a worker thread.
- Handoff: Dispatch and resume run in the background in Antigravity; results include a structured report, Git summaries, and artifact paths.
- Parallel work: Managed Git worktrees give workers separate checkouts and branches, with explicit cleanup after review.
- Observability: Codex Monitor refreshes every second when active and every eight seconds when idle; MCP clients can subscribe to progress or logs.
- Evaluation: Per-round and cumulative time and token counts can be compared with rework counts and human feedback by model and reasoning effort.
- Execution policy: v1.3.0 exposes Codex permission and approval settings across the MCP server, composer widget, and Monitor.
```

## Quick Start / Clone
```bash
git clone https://github.com/JAY201368/codex-castor.git && cd codex-castor && ./scripts/install.sh
```
