Codex Commander Panel
Provides orchestration of local OpenAI Codex CLI workers, including creating parallel sessions, selecting models and reasoning effort, running prompts and read-only reviews, isolating work in Git worktrees, and tracking token usage via the user's ChatGPT subscription.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Codex Commander Panel
Antigravity 侧边栏多 Worker OpenAI Codex CLI 控制台 —— 让 Gemini 专注总指挥与前端审美,把后端重活、并发重构与只读审查无缝派发给本机 Codex CLI(直走 ChatGPT 订阅)。
核心特性
零额外 API 费用:直接调用本机
codexCLI,复用你的 ChatGPT 订阅登录状态(自动检测Logged in using ChatGPT)。多 Worker 并行与受管 Worktree:通过
+ 新建打开并行会话。开启隔离时,插件为每个 Worker 显式创建并绑定独立的 Git worktree。后台 Detached 守护进程:长任务在独立守护进程中运行,刷新面板或重载 MCP 服务不会中断执行中的 Codex 任务。
一键只读对抗式审查:顶部「审查」按钮可直接以
codex exec review只读模式审查当前仓库未提交改动。产物预览与一键交接:
自动收集生成图片与变更文件,支持缩略图并发限流预览、全屏灯箱(含
TabFocus Trap 与Esc焦点恢复)、一键「存到项目」与原生标签页打开。侧边栏「交给 Gemini」按钮可一键将 Worker 摘要、Worktree 路径和产物路径发回主对话,由 Gemini 负责最终验收。
长期使用无负担:
持久化 Token 用量统计:独立账本按「今日 / 近 7 天 / 累计总计 / 按模型」记录输入、缓存命中、输出与轮次,删除或清空会话不丢历史账单。
日志自动轮转:单日志文件上限 2 MiB、最多保留 2 份归档,支持跨轮转无缝读取尾部日志。
旧会话自动清理:默认保留最近 20 条(7 天内)已完成会话,运行中会话绝不误删。
内置
codex-commanderSkill:配套 Gemini 总指挥 + Codex 并行调度脚本dispatch.mjs,支持结构化交卷报告(--structured)与实时同步到侧边栏面板。
Related MCP server: Pi Conductor
v1.2.0 更新
核心架构与安全加固
确定的 worktree 归属:新会话直接记录受管目录与分支,旧会话通过可验证记录识别归属。已绑定目录丢失时,续跑和 Diff 会返回错误。自动清理保留仍关联受管目录的会话,手动回收时会提示未提交改动或新增提交。
跨进程可靠性:文件互斥锁覆盖 Worker 状态与 Token 账本写入。POSIX 上停止任务前会检查进程身份,降低 PID 复用导致的误终止风险。日志尾读以实际读取字节数为准。
项目与文件边界:按规范化的 Git 项目根匹配会话。
open_codex_panel返回轻量摘要,面板按需拉取当前会话详情。原生打开文件前由服务端app_authorize_file核对文件是否属于允许的 Worker 或产物目录。MCP 与交付状态:默认协商 MCP
2025-11-25,未知工具调用返回 JSON-RPC-32602。--batch绑定并行派发批次,deliveryStatus标识成功、部分交付、阻塞或自检失败。
Codex 风格界面与交互
中性灰和 Codex 宝蓝:助手消息平铺,用户消息使用浅灰圆角气泡。悬浮调优卡提供 24px 蓝色胶囊思考强度滑块,Fast 档显示
1.5×与星光动效。滑块就地更新并保留焦点。稳定的聊天输入:常驻输入框保留中文输入法拼字状态,圆形
↑发送键随可提交状态更新。点击浮层外部可关闭浮层,Toast 悬浮反馈,300px 和 390px 断点分别调整窄侧栏布局。Token 用量面板:可切换今日、近 7 天和累计,查看缓存输入、新输入、输出与推理构成、近 7 天柱状趋势和按模型用量占比。
可读性与减少动效:修复 SVG 图标按钮提示消失问题,支持
prefers-reduced-motion。默认浅色主题的 5 组文本配色均达到 4.5:1 的 AA 文本对比度阈值。WCAG 2.2 文本对比度
协作架构
flowchart LR
User["用户"] --> Gemini["Gemini 主对话 (总指挥 / 前端审美 / 验收官)"]
User --> Panel["Antigravity 侧边栏 / 辅助栏 UI (MCP App)"]
Gemini -- "dispatch.mjs" --> Runner["codex-runner.mjs (状态 / 账本 / 权限边界)"]
Panel -- "MCP Tools (stdio JSON-RPC)" --> Server["server/index.mjs"]
Server --> Runner
Runner -- "detached daemon / 受管 worktree" --> Codex["本机 Codex CLI (ChatGPT 订阅)"]
Codex -- "JSONL 事件流" --> Runner
Panel -- "交给 Gemini" --> Gemini快速安装(零构建即用)
仓库已包含预编译的 dist/app.html,克隆即可直接使用:
1. 前置条件
Node.js
>= 20.0.0已安装 Git。
已安装 OpenAI Codex CLI 并完成登录:
codex login status # 应输出类似:Logged in using ChatGPT
2. 安装到 Antigravity 插件目录
支持 macOS / Linux / Windows 全平台安装:
macOS / Linux(Terminal):
git clone https://github.com/trruth/codex-commander-panel.git \
~/.gemini/config/plugins/codex-panel
cd ~/.gemini/config/plugins/codex-panel
npm ci --omit=devWindows(PowerShell):
$pluginDir = Join-Path $env:USERPROFILE '.gemini\config\plugins\codex-panel'
git clone https://github.com/trruth/codex-commander-panel.git $pluginDir
Set-Location -LiteralPath $pluginDir
npm.cmd ci --omit=dev完成后重启或刷新 Antigravity 的 MCP 服务,即可在右侧辅助栏 + 菜单或左侧全局边栏看到 Codex 面板。
如果需要修改前端源码(
ui/app.ts、ui/styles.css),请安装完整依赖后重新构建:npm ci && npm run build
3. 升级现有安装
在插件目录更新至 v1.2.0 后,重新运行上方对应平台的依赖安装命令,刷新或重启 Antigravity 的 MCP 服务。保留现有的 ${PLUGIN_DATA} 目录。若旧会话的 worktree 已丢失,恢复原目录或新建 Worker 后再继续。
使用指南
1. 侧边栏直接使用
点击右上角
+ 新建开启独立 Worker,可在设置栏切换模型(自动读取~/.codex/models_cache.json与config.toml)、推理强度、工作目录和worktree开关。点击齿轮打开 默认配置,可保存模型、思考强度和响应速度。未在面板保存速度时,默认读取
~/.codex/config.toml的service_tier。极速和经济档的可用性取决于模型与账号。点击顶部
审查,对当前 Git 仓库未提交改动启动只读 Code Review。点击顶部
用量,查看今日 / 近 7 天 / 累计及按模型分布的 Token 统计与缓存命中率。任务完成后,可点击
Diff/日志排查改动,或点击交给 Gemini一键转交主对话验收。
2. 由 Gemini 自动编排(codex-commander Skill)
在主对话中直接让 Gemini 拆解任务并派发给 Codex,内置脚本会将实时状态同步到侧边栏:
node ~/.gemini/config/plugins/codex-panel/skills/codex-commander/scripts/dispatch.mjs \
--cwd "/path/to/your/project" \
--title "实现后端接口与测试" \
--model "gpt-6.2-sol" \
--effort "high" \
--speed "standard" \
--batch "example-batch" \
--worktree \
--structured \
--prompt "你的结构化任务指令"同一批 Worker 使用相同的 --batch 值。读取脚本输出的 deliveryStatus 可确认交付结果。
目录结构
codex-commander-panel/
├── plugin.json # Antigravity 插件清单
├── mcp_config.json # MCP Server 配置(自动挂载 ${PLUGIN_DATA})
├── assets/logo.svg # 插件图标
├── server/
│ ├── index.mjs # MCP stdio JSON-RPC 服务与工具路由
│ ├── codex-runner.mjs # Worker 调度、安全边界、日志轮转、用量账本
│ └── worker-daemon.mjs # 独立 detached 后台守护进程
├── ui/
│ ├── index.html # MCP App 入口模板
│ ├── app.ts # 面板交互逻辑(状态轮询、草稿隔离、灯箱 Focus Trap)
│ └── styles.css # 自适应宿主深/浅色主题样式
├── dist/app.html # 单文件内联构建产物(零构建即用)
├── scripts/
│ ├── build-ui.mjs # esbuild 单文件打包脚本
│ └── test.mjs # 回归测试套件(npm test)
└── skills/codex-commander/ # Gemini + Codex 协作 Skill 与 dispatch.mjs跨平台与安全说明
数据隔离与权限:所有运行态状态、日志与用量账本默认保存在
${PLUGIN_DATA}(目录0700、文件0600),不会污染插件源码目录。产物访问边界:预览、复制与原生打开均校验文件真实路径及 Worker 归属,拒绝符号链接逃逸。侧边栏严格禁止以
danger-full-access启动或续聊。图片预览:macOS 使用系统
/usr/bin/sips生成缩略图。没有sips时,支持直接预览不超过 1.2 MiB 的位图,更大的图片可在系统查看器中打开。Windows 上的 Codex 启动:支持官方 npm 安装的
codex.cmd和原生codex.exe。自定义安装可将CODEX_BIN设为原生codex.exe的完整路径。
本地开发与测试
npm ci
npm run build && npm run check && npm test12 项 P0/P1/P2 回归覆盖并行 Worktree 归属与回收、重复续跑防护、并发 Token 记账、日志尾读、文件授权、MCP 协议、版本一致性和构建产物。
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Run multiple coding agents without them stepping on each other and colliding. FlightPlan gives each agent the same preflight picture, lets them coordinate while plans are still cheap to change, and leaves behind what changed and why for whichever agent comes next. Across sessions. Across people. Across providers. Across time. One shared picture. This is the hosted mcp version.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables Grok Build to orchestrate the local Codex CLI for code reviews, adversarial reviews, task rescue, session transfer, and background job management through MCP tools.1Apache 2.0
- AlicenseAqualityCmaintenanceEnables Codex to orchestrate persistent Pi RPC workers over a local MCP server, spawning dev, explore and review agents in isolated git worktrees or in place. Codex can inspect status, activity, token/cost metrics and real diffs, then merge only the accepted work and clean up idle workers.13MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to run and manage parallel local Codex worker tasks, including submission, status polling, cancellation, deadlines, logs, and resumable session continuation, while delegating inference to a configured LAN model service.MIT
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to orchestrate multiple Codex CLI tasks in parallel, each isolated in its own git worktree and guarded by layered security policies like command allowlists and path restrictions. It collects structured results with patches, logs, and evidence, and can also review development plans for completeness and parallelization gaps.9 npmMIT