tk3.biz
ブログ一覧に戻る Back to Blog

Codex に dev-orchestra を入れて使ってみた Using dev-orchestra with Codex

AIdev-orchestraCodexClaude Codeコードレビュー

はじめに

前回は、Claude Code だけの環境で dev-orchestra を使ってみました。 今回は Codex に入れてみます。

結論から言うと、Codex だけでも動きます。でも、いちばんのおすすめは Claude Code と Codex の両方を入れることです。そうすると、別々の会社の AI がレビューする構成に自動でなります。

dev-orchestra が何をするものかは、紹介の記事にまとめています。

dev-orchestra は GitHub で公開しています(MIT ライセンス)。役に立ちそうと思ったら、スターを付けてもらえるとうれしいです。

→ github.com/istb16/dev-orchestra

必要なもの

ものメモ
Codex CLIログインまで済ませておく
Python 3.11 以上標準ライブラリだけで動く
gitレビューする差分を取るのに使う

API キーは要りません。Codex のログインをそのまま使います。

手順

1. インストールする

ターミナルで 2 行です。

codex plugin marketplace add istb16/dev-orchestra
codex plugin add dev-orchestra@dev-orchestra

入ったかどうかは codex plugin list で確かめられます。

2. 初回にプリセットを選ぶ

使い始めは Claude Code のときと同じです。dev-orchestra を使う依頼を初めて出すと、プリセットを聞いてきます。 迷ったら standard で大丈夫です。プリセットの中身は、この連載の後半でくわしく書きます。

3. Codex だけのときの構成を見る

Claude Code が入っていないマシンで standard を選ぶと、構成はこうなりました(dev-orchestra 1.0.0 の config show の抜粋)。

Preset: standard (implicit; fitted to codex)
  note: claude not found on PATH: reviewer seat 2 (general) was not added; it would repeat codex-general
  note: claude not found on PATH: reviewer seat 4 (test) was not added; codex has no cheap model named offline

  Architect
    codex / recommended-coding / latest
  Implementer
    codex / recommended-coding / latest
  Reviews
    1. codex / recommended-coding / latest / general / codex-general
    2. codex / recommended-coding / latest / security / codex-security

設計も実装もレビューも、すべて Codex に割り当てられています。

ここで、Claude Code だけのときとの違いが 1 つあります。レビュアーが 4 人ではなく 2 人です。

  • 2 番目の general の枠は、1 番目とまったく同じ Codex になってしまうので追加しない
  • test の枠は「安いモデル」用の枠で、Codex には安いモデルを名前で指定できないので追加しない

同じ AI を同じ役で 2 人並べても意味がないので、無駄な枠は最初から作らない、という動きです。

4. Claude Code も入れると推奨構成になる

ここからがおすすめの使い方です。同じマシンに Claude Code も入っていると、構成はこう変わります。

Preset: standard (implicit; fitted to claude, codex)

  Architect
    claude / fable / latest
  Implementer
    claude / opus / latest
  Reviews
    1. claude / opus / latest / general / claude-general
    2. codex / recommended-coding / latest / general / codex-general
    3. claude / sonnet / latest / security / claude-security (opus when high-risk)
    4. claude / sonnet / latest / test / claude-test

2 番目のレビュアーが Codex になりました。

  • 実装は Claude、レビューには Claude と Codex が入る
  • 別々の会社の AI は、思い込みも違う。同じ差分を見て意見が食い違ったところが、本物のバグのありかになる

設定を書き換えなくても、入っている CLI を見て自動でこの形になります。

設計や実装を Codex に任せたい場合は、役ごとに AI を変えることもできます。組み替え方は、この連載の後半で書きます。

5. 準備ができているか確かめる

エージェントに「dev-orchestra の doctor を実行して」と頼みます。Codex の部分はこう出ました(抜粋)。

Codex CLI (codex)
  Installed: yes
  Model selection: supported
  Read-only runs: enforced by -s read-only (CLI sandbox); filesystem writes are blocked by the sandbox (measured); MCP servers were not examined, so external side effects are not covered

設計役とレビュー役は、Codex の読み取り専用のサンドボックスで動きます。ファイルの書き込みはサンドボックスが止めます。 ただし、MCP サーバーまでは確認していない、と正直に書いてあります(下の表でも触れます)。

最後に No problems found. と出れば準備完了です。

6. 1 文で依頼する

あとは Claude Code のときと同じで、普段どおり話しかけるだけです。

この issue を設定済みのワークフローで実装して

計画の承認を聞いてくるところから最終報告までの流れは、前回の記事に書いたとおりです。

複数のレビュアーを動かすぶん、トークンは 1 つの AI で済ませるより増えます。最初は小さな依頼から試すのがおすすめです。

Codex の場合だけの機能・制限

Codex で使うときに知っておくと役に立つ点です(dev-orchestra 1.0.0 時点。くわしくは providers.md)。

内容
○ 読み取り専用はサンドボックスで強制設計とレビューは -s read-only で動き、シェルからの書き込みも止まる
○ モデルは「推奨のもの」をそのまま使う既定は recommended-coding。ほかのモデルは dev-orchestra model list に出るものだけ指定できる
○ 設計の続きから再開できる前の設計の会話を、読み取り専用のまま引き継げる(確認済みの Codex の版で)
△ MCP サーバーとフックは確認していないSlack などの MCP ツールを通じた外への影響までは、dev-orchestra は保証しない
△ 作業ディレクトリの外も読めるClaude のように読み取りの範囲を閉じ込めてはいない。リポジトリの中でも外でも .env などの秘密のファイルを読めて、読んだ中身は OpenAI に送られる
△ Codex だけだとレビュアーは 2 人(standard の場合)同じ Codex を重ねる枠と、安いモデル用の枠を作らないため。quality なら 4 人、fast ならふだん 1 人(危険な変更では+1 人)
△ 独自の model_provider だと設計の再開ができないconfig.toml で独自のプロバイダーを使っていると、再開は失敗して新しく実行し直す
△ 実装役のサンドボックス設定はグローバル設定からsandbox / approve をプロジェクトの設定ファイルに書くと、実装の実行が拒否される

秘密のファイルは、レビュアーの手が届かない場所に置いておくのが安心です。どうしても外に出したくないコードは、ローカルの LLM でレビューする手もあります(紹介の記事で触れています)。

プラグインを更新するときは、codex plugin marketplace upgrade だけでは新しい版が入りません。続けて codex plugin add dev-orchestra@dev-orchestra を実行します。

まとめ

  • Codex への導入も 2 行。API キーは要らない
  • Codex だけでも動く。設計・実装・レビューがすべて Codex になり、レビュアーは 2 人(standard の場合)
  • Claude Code も入れると推奨構成。レビューに Claude と Codex の両方が入り、別々の会社の AI が独立してレビューする
  • 設計とレビューは Codex の読み取り専用のサンドボックスで動く。ただし MCP とフックは確認していない
  • 更新するときは marketplace upgrade のあとに plugin add をもう一度

詳しい使い方は README(日本語) にまとめています。 次回は、Antigravity で使ってみます。

GitHub: istb16/dev-orchestra(スターを付けてもらえると励みになります)


English version

Introduction

Last time, I used dev-orchestra in a Claude Code-only environment. This time I’m installing it in Codex.

To cut to the chase: it works with Codex alone. But my top recommendation is to install both Claude Code and Codex. That way, you automatically get a setup where AIs from different companies review your code.

For what dev-orchestra actually does, see the introduction post.

dev-orchestra is open source on GitHub (MIT license). If it looks useful, a star would mean a lot.

→ github.com/istb16/dev-orchestra

Requirements

ItemNotes
Codex CLIAlready logged in
Python 3.11 or laterRuns on the standard library only
gitUsed to get the diff to review

No API key is needed. It uses your existing Codex login.

Steps

1. Install it

Two lines in the terminal.

codex plugin marketplace add istb16/dev-orchestra
codex plugin add dev-orchestra@dev-orchestra

You can check that it’s installed with codex plugin list.

2. Pick a preset on first use

Getting started is the same as with Claude Code. The first time you make a request that uses dev-orchestra, it asks you for a preset. If unsure, go with standard. I’ll cover what’s in each preset in detail later in this series.

3. Check the Codex-only setup

On a machine without Claude Code, choosing standard gave me this setup (excerpt from config show in dev-orchestra 1.0.0).

Preset: standard (implicit; fitted to codex)
  note: claude not found on PATH: reviewer seat 2 (general) was not added; it would repeat codex-general
  note: claude not found on PATH: reviewer seat 4 (test) was not added; codex has no cheap model named offline

  Architect
    codex / recommended-coding / latest
  Implementer
    codex / recommended-coding / latest
  Reviews
    1. codex / recommended-coding / latest / general / codex-general
    2. codex / recommended-coding / latest / security / codex-security

Design, implementation and review are all assigned to Codex.

There’s one difference from the Claude Code-only setup: there are 2 reviewers instead of 4.

  • The second general seat would be exactly the same Codex as the first, so it is not added
  • The test seat is meant for a “cheap model”, and Codex has no cheap model that can be named, so it is not added

Putting the same AI in the same role twice is pointless, so it doesn’t create useless seats in the first place.

This is the setup I recommend. If Claude Code is also installed on the same machine, the setup changes to this.

Preset: standard (implicit; fitted to claude, codex)

  Architect
    claude / fable / latest
  Implementer
    claude / opus / latest
  Reviews
    1. claude / opus / latest / general / claude-general
    2. codex / recommended-coding / latest / general / codex-general
    3. claude / sonnet / latest / security / claude-security (opus when high-risk)
    4. claude / sonnet / latest / test / claude-test

The second reviewer is now Codex.

  • Claude implements, and both Claude and Codex review
  • AIs from different companies have different blind spots. Where they disagree on the same diff is where the real bugs are

Without touching any settings, it picks this shape automatically based on the CLIs installed.

If you want Codex to handle design or implementation, you can change the AI for each role. I’ll show how to rearrange them later in this series.

5. Check that everything is ready

Ask the agent “Run the dev-orchestra doctor”. The Codex part looked like this (excerpt).

Codex CLI (codex)
  Installed: yes
  Model selection: supported
  Read-only runs: enforced by -s read-only (CLI sandbox); filesystem writes are blocked by the sandbox (measured); MCP servers were not examined, so external side effects are not covered

The design and review roles run in Codex’s read-only sandbox. The sandbox blocks file writes. However, it honestly states that MCP servers were not examined (also covered in the table below).

If it ends with No problems found., you’re ready.

6. Make a one-sentence request

From here it’s the same as with Claude Code: just talk to it as usual.

Implement this issue with the configured workflow

The flow from the plan-approval prompt to the final report is as described in the previous post.

Running multiple reviewers uses more tokens than a single AI would. I recommend starting with small requests.

Codex-specific features and limitations

Things worth knowing when using it with Codex (as of dev-orchestra 1.0.0; see providers.md for details).

Details
Plus: Read-only is enforced by the sandboxDesign and review run with -s read-only, which also blocks writes from the shell
Plus: Uses the “recommended” model as isThe default is recommended-coding. Other models can only be specified if they appear in dev-orchestra model list
Plus: Can resume from a previous designCan continue the previous design conversation, still read-only (on verified Codex versions)
Caveat: MCP servers and hooks are not examineddev-orchestra does not guarantee against external side effects via MCP tools such as Slack
Caveat: Can read outside the working directoryUnlike Claude, reads are not confined. It can read secret files like .env inside or outside the repository, and what it reads is sent to OpenAI
Caveat: Only 2 reviewers with Codex alone (for standard)Because it skips the seat that would duplicate Codex and the cheap-model seat. quality gives 4, fast usually 1 (+1 for risky changes)
Caveat: Design resume doesn’t work with a custom model_providerIf you use a custom provider in config.toml, the resume fails and it runs fresh instead
Caveat: Implementer sandbox settings come from the global configIf you put sandbox / approve in the project config file, implementation runs are refused

To be safe, keep secret files where reviewers can’t reach them. For code that must never leave your machine, you can also review with a local LLM (mentioned in the introduction post).

When updating the plugin, codex plugin marketplace upgrade alone doesn’t install the new version. Run codex plugin add dev-orchestra@dev-orchestra afterwards.

Summary

  • Installing in Codex is also two lines. No API key needed
  • It works with Codex alone. Design, implementation and review all go to Codex, with 2 reviewers (for standard)
  • Add Claude Code for the recommended setup. Both Claude and Codex review, so AIs from different companies review independently
  • Design and review run in Codex’s read-only sandbox. However, MCP and hooks are not examined
  • When updating, run plugin add again after marketplace upgrade

For detailed usage, see the README. Next time, I’ll try it with Antigravity.

GitHub: istb16/dev-orchestra (a star is always appreciated)

関連記事 Related Posts

dev-orchestra のプリセット quality / standard / fast を比べてみた Comparing dev-orchestra's quality / standard / fast presets

dev-orchestra の初期設定で選ぶプリセット quality / standard / fast を、Claude Code だけ・Codex だけ・両方の 3 つの環境で実際に展開して比べました。役ごとのモデル、レビュアーの人数、コストを削る度合いがどう変わるか、どれを選べばいいかをまとめます。 I expanded dev-orchestra's setup presets quality / standard / fast in three environments (Claude Code only, Codex only, and both) and compared them. Here is how the per-role models, the number of reviewers, and how much cost is cut change, and which one to pick.

設計・実装・複数AIレビューを1文で回す dev-orchestra を公開してみた I Released dev-orchestra: Design, Implementation, and Multi-AI Review from a Single Request

Claude Code / Codex / Antigravity で動くプラグイン dev-orchestra の紹介です。何ができるか、公式の codex-plugin-cc との違い、Claude Code だけでも使う意味、そしてデメリットまでまとめました。 An introduction to dev-orchestra, a plugin that runs on Claude Code / Codex / Antigravity. I cover what it does, how it differs from the official codex-plugin-cc, why it's worth using even with Claude Code alone, and its downsides.

AIに複数レビューさせるのが面倒すぎて、自動で回すプラグインを作ってみた AIに複数レビューさせるのが面倒すぎて、自動で回すプラグインを作ってみた

AIに書かせたコードを別のAIにもレビューさせたい。でも手作業でやると、ターミナル間のコピペと待ち時間で疲れ果てる。それを仕組みにしたプラグイン dev-orchestra の 1.0.0 を出したので、作った経緯と使ってみての感想をまとめました。 AIに書かせたコードを別のAIにもレビューさせたい。でも手作業でやると、ターミナル間のコピペと待ち時間で疲れ果てる。それを仕組みにしたプラグイン dev-orchestra の 1.0.0 を出したので、作った経緯と使ってみての感想をまとめました。