codex-supervisor
Codex Supervisor MCP
コード互換ホストが Codex app-server の作業を開始、監視、誘導、中断、再開、承認できるようにするローカル Model Context Protocol (MCP) ブリッジです。
codex app-server をラップするものであり、ターミナル UI を自動化したり IDE をスクレイピングしたりするものではありません。
機能
サーバーは以下の MCP ツールを公開します:
ツール | 目的 |
| 新しい Codex スレッドを開始し、許可されたリポジトリ内で作業を開始します。 |
| アクティブなターンがアイドル状態になった後に、新しい指示を送信します。 |
| 進行中のターンにガイダンスを追加で送ります。 |
| スレッドの状態、最近のイベント、最新のエージェントメッセージ、差分、保留中のリクエストを読み取ります。 |
| 完了、失敗、中断、または承認リクエストまでロングポーリングします。 |
| 進行中のターンを中断します。 |
| 設定されたルート内に永続化されたスレッドを一覧表示します。 |
| 永続化された承認済みスレッドを読み取ります。 |
| 保留中の app-server リクエストを調べます。 |
| コマンド実行およびファイル変更の承認を承認、拒否、またはキャンセルします。 |
Related MCP server: Codex Bridge MCP
要件
Node.js 22 以降。
現在の Codex CLI が
codexとして利用可能であること。Codex CLI の認証がすでに設定されていること。
1 つ以上の明示的なローカルリポジトリルート。
このプロジェクトには npm のランタイム依存関係はありません。
パッケージの検証
npm testテストスイートはプロトコル互換のモック app-server を使用します。モデルリクエストは行わず、Codex の認証も必要としません。
Codex CLI でのインストール
MCP サーバー名として codex-supervisor を使用します。この名前は CODEX_SUPERVISOR_MCP_NAME と一致している必要があります。ブリッジはこの名前を使用して、子の app-server がこの同じ MCP サーバーを再帰的に読み込むのを防ぎます。
macOS または Linux
codex mcp add codex-supervisor \
--env CODEX_ALLOWED_ROOTS="/Users/you/code:/Users/you/work" \
--env CODEX_SUPERVISOR_MCP_NAME="codex-supervisor" \
-- node "/absolute/path/to/codex-supervisor-mcp/src/index.mjs"ルート間の区切りにはプラットフォームのパスリスト区切り文字を使用します。macOS と Linux ではコロン (:) です。
Windows PowerShell
codex mcp add codex-supervisor `
--env CODEX_ALLOWED_ROOTS="C:\src;D:\work" `
--env CODEX_SUPERVISOR_MCP_NAME="codex-supervisor" `
-- node "C:\absolute\path\to\codex-supervisor-mcp\src\index.mjs"Windows ではパスリストの区切り文字はセミコロン (;) です。
登録を確認します:
codex mcp listCodex で /mcp と入力して、接続されたサーバーを確認します。
config.toml でのインストール
examples/config.toml をコピーして調整し、その内容を ~/.codex/config.toml または信頼できるプロジェクトの .codex/config.toml に配置します。
絶対パスを使用してください。サーバー ID と CODEX_SUPERVISOR_MCP_NAME は同一に保ってください。
ChatGPT デスクトップまたは Codex IDE 拡張機能
Settings → MCP servers → Add server を開きます。
名前を
codex-supervisorに設定します。STDIO を選択します。
コマンドを
nodeに設定します。src/index.mjsへの絶対パスを唯一の引数として追加します。CODEX_ALLOWED_ROOTSとCODEX_SUPERVISOR_MCP_NAME=codex-supervisorを追加します。保存してホストを再起動します。
/mcpと入力してツールを確認します。
ローカル STDIO MCP サーバーは、通常の ChatGPT Web チャットでは読み込まれません。Web からこのブリッジを使用するには、別途デプロイされた認証付きリモート MCP サービスまたはホスト型プラグインが必要です。
一般的なワークフロー
MCP ホストに次のように依頼します:
Use codex_start in /absolute/path/to/repository to implement the requested
change. Use workspaceWrite, keep network access disabled, wait for progress,
show me every approval request before resolving it, and report the final diff
and test result.ホストは次の順序に従う必要があります:
codex_start -> codex_wait
approval request -> inspect -> codex_resolve_approval -> codex_wait
active correction -> codex_steer -> codex_wait
completed -> codex_status
later follow-up -> codex_send -> codex_waitstart/send/steer/interrupt の各呼び出しは eventCursor を返します。これを codex_wait または codex_status の afterSequence として渡すことで、古いイベントの再再生を避けられます。
approvalPolicy は現在の app-server ワイヤ値である on-request(デフォルト)と untrusted を受け入れます。レガシー値の onRequest と unlessTrusted はブリッジによって受け入れられ、app-server リクエストの前に正規化されます。
公開承認 API は、Codex app-server リリースがそのリクエストに対して cancel のみを宣伝している場合でも、decline を受け入れます。その場合、ブリッジは安全な app-server キャンセル応答を使用し、要求された決定と実際の決定の両方を報告します。
設定
変数 | デフォルト | 意味 |
| 必須 | プラットフォームのパスリスト区切り文字で区切られたリポジトリルート。 |
|
| ネイティブ Codex 実行可能ファイルのパス。Windows の |
|
| 再帰を防ぐためにネストされた app-server で無効化される MCP 設定 ID。 |
|
| 呼び出し元がネットワークアクセスを要求できるようにするには |
|
| メモリ内イベント数。100〜10,000 にクランプされます。 |
|
| Codex app-server の stderr をこのサーバーの stderr にコピーするには |
| 内部の安全なデフォルト |
|
デフォルトの app-server 引数は次と同等です:
-c mcp_servers.<CODEX_SUPERVISOR_MCP_NAME>.enabled=false app-serverCODEX_APP_SERVER_ARGS を上書きすると、その再帰ガードが削除されます。自分で同等の無効化上書きを含めてください。
セキュリティモデル
CODEX_ALLOWED_ROOTSは必須です。パスは
realpathで正規化されます。シンボリックリンクによるエスケープは拒否されます。Codex は選択されたリポジトリとプラットフォームのデフォルトへの制限付き読み取りアクセスを受け取ります。
workspaceWriteは書き込み可能なルートを選択されたリポジトリに制限します。dangerFullAccessは公開されません。ネットワークアクセスには、
CODEX_ALLOW_NETWORK=1とタスク上のnetworkAccess: trueの両方が必要です。ブリッジには汎用的でサンドボックス化されていないシェルツールはありません。
コマンド実行とファイル変更の承認は明示的に解決する必要があります。
許可されたルートの外にあるスレッドは拒否またはフィルタリングされます。
イベントペイロードは保存前にサイズ制限されます。
保存されたスレッドパスは使用時に再正規化されます。削除または置換されたリポジトリパスはフェイルクローズします。
同じスレッドへの変更、承認応答、および再試行されたリモート呼び出しは、2 回実行されるのではなく、直列化または重複排除されます。
転送エラーは、STDIO または HTTP 境界を越える前に再帰的に編集され、サイズ制限されます。
リレーおよびリモートサーバーの資格情報(
BIOTELE_*およびCODEX_REMOTE_*)は、子 Codex 環境から削除されます。リモート結果の送信は HMAC 認証され、base64url エンコードされ、制限付きチャンクに分割され、使用前に長さと SHA-256 で検証されます。エンコーディングはトランスポートをコンテンツフィルターから保護します。これは暗号化ではありません。
子の app-server は、非リレーのプロセス設定とより広範な Codex 構成を引き続き継承します。信頼できないコードで使用する前に、他の環境シークレット、アプリ、スキル、フック、設定済み MCP サーバーを監査してください。環境のストリップはオペレーティングシステムのセキュリティ境界ではありません。同じ Windows ユーザーとして実行されている子は、ユーザースコープの設定を意図的に照会できます。その脅威が範囲内にある場合は、専用の Windows アカウントを使用してください。
サポートされている承認リクエスト
このリリースは次を解決します:
item/commandExecution/requestApprovalitem/fileChange/requestApproval
他の app-server リクエストは codex_status と codex_list_approvals で表示されたままですが、ブリッジはそれらへの応答を拒否します。これにより、汎用応答エンドポイントが暗黙的に権限を付与したり、機密性の高いユーザー入力を提供したりすることを防ぎます。
永続化とモニタリング
Codex は永続化されたスレッド履歴を所有します。ブリッジは、ストリームされたイベントバッファー、最新の差分、保留中のリクエスト状態をメモリに保持します。MCP サーバーを再起動すると、その一時状態はクリアされますが、codex_list_threads と codex_read_thread を使用して、承認済みの永続化スレッドを回復できます。
開発
npm test
node --check src/index.mjsプロジェクトレイアウト:
src/app-server-client.mjs Codex app-server JSONL client
src/approval-policy.mjs Approval-policy validation and legacy normalization
src/event-store.mjs Bounded event, turn, and approval state
src/security.mjs Repository-root policy
src/supervisor-service.mjs Codex lifecycle orchestration
src/tool-registry.mjs MCP tool schemas and validation
src/mcp-server.mjs Dual-era MCP STDIO transport
src/index.mjs Entrypoint
test/ Unit and integration testsライセンス
MIT
Codex App Server 互換性
バージョン 1.0.3 は、turn/start から非推奨の readOnly.access フィールドと workspaceWrite.readOnlyAccess フィールドを削除します。現在の Codex App Server リリースは、クライアントがカスタムの制限付き読み取りスコープを必要とする場合に権限プロファイルを使用します。スーパーバイザーは引き続き書き込み可能なルートを選択されたリポジトリに制限し、すべてのタスクディレクトリを CODEX_ALLOWED_ROOTS に対して検証します。
Hostinger リモートリレー
バージョン 1.2.5 は、ChatGPT リモート MCP アクセス用の Hostinger 互換リレーを提供します:
ChatGPT -> OAuth bearer JWT -> Hostinger /mcp -> namespace-routed queue
codex_* -> outbound Windows local-agent -> Codex app-server
reeves_* -> outbound Reeves Android agent -> accessibility service公開 /mcp エンドポイントは、外部アイデンティティプロバイダーからの RS256 OAuth アクセストークンを検証します。Windows エージェントと Reeves エージェントは、アウトバウンドポーリング、ステータス、リース取得、結果送信にのみ、独立した HMAC 資格情報を使用します。Hostinger リレーは Codex を起動することも、ローカルリポジトリを読み取ることもありません。
ホスト型リレーは、既存のすべての codex_* ツールを保持し、さらに reeves_status、reeves_tap、reeves_swipe、reeves_type、reeves_back、reeves_home、reeves_recents、reeves_sequence、reeves_screenshot を公開します。ローカル STDIO Codex レジストリは Codex 専用のままです。エージェントの要求は認証されたキー ID によってフィルタリングされます。クライアントが指定したルーティングフィールドは無視されます。
reeves_screenshot は、Android ピクセルを標準の MCP image コンテンツブロック(image/png と base64 データ)として、幅、高さ、キャプチャタイムスタンプ、エージェント ID、バイト長メタデータとともに返します。Android エージェントはリレーがアドバタイズするチャンク化結果プロトコルを使用するため、使用できない Android ローカルパスは公開されず、各署名付き HTTP リクエストはリレーの本文制限内に収まります。
reeves_sequence は、1 から 50 までの順序付けられたデバイスアクションを 1 つのルーティングされたジョブで送信します。Android はタップ、スワイプ、タイプ、Back、Home、Recents、待機、スクリーンショットのアクションをローカルで実行し、デフォルトでは最初のエラーで停止し、デフォルトでは 1 つの最終 MCP イメージを返します。結果には、インデックス化されたアクションの結果と、追加のシークレットフリーなリレー/Android ステージタイミングが含まれます。既存の 25 秒のエージェントリクエストは、エンキュー時起動のロングポールであり、取得遅延ではありません。Android は、各成功した結果送信の直後に別の要求を開始し、1 つの OkHttp 接続プールを再利用します。
このリリースはまた、サポートされている MCP プロトコルバージョンをネゴシエートし、制限付きの OAuth サブジェクトにバインドされたセッションを発行し、後続のリクエストでそのセッションを要求します。再試行されたツール呼び出しは、OAuth サブジェクト、MCP セッション、型付き JSON-RPC ID、リクエストハッシュにバインドされます。セッションを終了すると、キャッシュされたまたは保留中の作業が無効になります。このリリースはまた、キャンセルされたリレー作業とクラッシュした app-server 状態をクリーンアップし、承認されたパスを再検証し、スレッドごとのイベントを分離し、すべての公開トランスポートで制限付きのネストされたエラーデータを編集します。
バージョン 1.2.5 はまた、codex_status.latestAgentMessage を承認済みの永続化トランスクリプトと調整します。完全に永続化された外部 Codex 完了(合成された rollout-* ターンを含む)は、ブリッジが観測した古いメッセージを置き換えますが、不完全または中断されたトランスクリプトの末尾は除外されたままになります。
Windows エージェントを更新する前に、更新されたリレーをデプロイしてください。新しいリレーはレガシーの一回限りの結果を引き続き受け入れますが、新しいエージェントは、リレーがサポートをアドバタイズした後にのみチャンク形式を使用します。
Hostinger hPanel の手順、mcp.biotele.mx の DNS、Auth0 のセットアップ、Microsoft Entra ID のセットアップ、ChatGPT Web コネクタのセットアップと復旧、環境変数、ローカルエージェントのインストール、脅威モデルについては、docs/REMOTE_DEPLOYMENT.md を参照してください。
Available Tools
10 toolscodex_interruptInterrupt Codex turnADestructiveIdempotent
Request cancellation of an active Codex turn.
| Name | Required | Description | Default |
|---|---|---|---|
| turnId | No | Optional turn id; defaults to the active turn known by this bridge. | |
| threadId | Yes | Codex thread id. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds the nuance that the cancellation applies to an 'active' turn, which implies it may not have effect on non-active turns. However, the annotations already declare destructiveHint and idempotentHint, so the description does not need to restate those. It does not clarify what happens if no active turn exists or whether this is a request versus a guaranteed cancellation, but with annotations covering the safety profile, the additional context is moderate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that directly conveys the tool's purpose without any filler. It is perfectly concise and well-structured for such a simple operation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, the presence of annotations (destructive, idempotent) and full schema descriptions, the description provides sufficient context for invocation. It does not mention return values or error scenarios, but with no output schema and a straightforward operation, this is not a critical gap. It covers the essential action and target.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters have thorough descriptions in the schema (100% coverage), including meaning and default behavior for turnId. The tool description itself adds no further parameter semantics, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action (request cancellation) on a specific resource (an active Codex turn), which distinguishes it from sibling tools like codex_start or codex_status. The verb 'request cancellation' is unambiguous and the phrase 'active Codex turn' scopes the operation appropriately.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. It does not mention that it should be used to stop an ongoing turn, or that one might use codex_status first to check for an active turn. The description simply states what it does without any contextual 'when-to-use' or exclusionary language.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_list_approvalsList Codex approvalsARead-onlyIdempotent
List pending app-server requests. This release resolves command-execution and file-change approval requests; unsupported request types remain visible.
| Name | Required | Description | Default |
|---|---|---|---|
| threadId | No | Optional authorized thread filter. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly and non-destructive behavior. The description adds context that unsupported request types remain visible and specifies which types this release resolves, going beyond annotations. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: the first states the primary action, the second adds scope clarification. No waste, information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with good annotations and full schema coverage, the description covers the operation and adds useful context about supported versus unsupported request types. It does not specify the return format, but no output schema exists, so the description is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, threadId, is fully documented in the schema as 'Optional authorized thread filter.' The description adds no further parameter semantics, so the schema carries the weight.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and resource ('pending app-server requests'), clearly distinguishing it from siblings like codex_resolve_approval and codex_list_threads. The title corroborates this.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly provides the context for when to use the tool (listing pending approvals). However, it does not explicitly mention alternatives or exclusions, so it does not achieve a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_list_threadsList Codex threadsARead-onlyIdempotent
List persisted Codex threads whose working directories are inside CODEX_ALLOWED_ROOTS. Results outside those roots are filtered.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional exact allowed working-directory filter. | |
| limit | No | ||
| cursor | No | Optional pagination cursor. | |
| searchTerm | No | Optional thread search text. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only and idempotent safety, so the description adds value by revealing the filtering behavior based on CODEX_ALLOWED_ROOTS and the 'persisted' qualifier. This goes beyond what annotations provide and gives important behavioral context for an agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences. The first sentence states the primary action and scope, and the second clarifies a key behavioral constraint. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple listing tool with no output schema, the description covers the essential purpose and a key constraint. Combined with the schema and annotations, it provides sufficient context to use the tool, though it could mention pagination or return format explicitly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not elaborate on any parameters. However, schema descriptions cover 3 of 4 parameters (cwd, cursor, searchTerm), and the remaining limit parameter has min/max constraints. With 75% schema coverage, the description's lack of parameter details is acceptable but not outstanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') with a clear resource ('persisted Codex threads') and a scoping constraint (working directories inside CODEX_ALLOWED_ROOTS). This clearly distinguishes it from sibling tools like codex_read_thread (which reads a single thread) and codex_list_approvals.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by stating the tool lists threads and filters by allowed roots. It gives clear context (listing function) but does not explicitly name alternative tools or exclusions. The mention that results outside allowed roots are filtered provides actionable guidance about when this tool is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_read_threadRead Codex threadARead-onlyIdempotent
Read a persisted authorized Codex thread. The bridge denies threads outside CODEX_ALLOWED_ROOTS.
| Name | Required | Description | Default |
|---|---|---|---|
| threadId | Yes | Codex thread id. | |
| includeTurns | No | Include full persisted turns. Omit for the safer compact thread view. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds a substantive behavioral detail: the bridge denies threads outside CODEX_ALLOWED_ROOTS, which is not visible in annotations. This informs the agent about potential authorization failures and scoping limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no filler. The main purpose is front-loaded in the first sentence, and the second sentence provides a crucial constraint. Every word contributes to understanding the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, strong annotations, and full parameter schema coverage, the description is mostly complete. It does not describe the return value format, but with no output schema, that is a gap; however, the name and the includeTurns parameter reasonably convey what is returned. The authorization constraint adds essential context for operational use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both parameters, so the structured schema already defines threadId and includeTurns. The description adds no additional meaning beyond what the schema provides, such as the distinction between compact and full turn views, which is already in the schema. Baseline 3 is appropriate when schema covers parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Read') and the resource ('a persisted authorized Codex thread'), immediately distinguishing it from sibling tools like codex_list_threads (list threads) or codex_status (status check). The scope is well-defined with the authorization constraint, making the tool's purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for reading a specific thread's contents, but it does not explicitly differentiate from alternatives like codex_status or codex_list_threads. The mention of CODEX_ALLOWED_ROOTS is a constraint on valid inputs rather than guidance on when to choose this tool over others. Use is implied rather than clearly instructed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_resolve_approvalResolve Codex approvalADestructive
Explicitly accept, accept for the session, decline, or cancel a pending Codex command-execution or file-change approval.
| Name | Required | Description | Default |
|---|---|---|---|
| decision | Yes | ||
| requestKey | Yes | Opaque requestKey returned by codex_status or codex_list_approvals. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already mark the tool as destructive (destructiveHint: true) and non-idempotent (idempotentHint: false). The description adds the specific decision actions (accept, acceptForSession, decline, cancel) but does not disclose behavioral details such as whether accepting triggers command execution or whether cancellation is reversible. It does not contradict the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, information-dense sentence that efficiently lists all decision actions and the approval types. There is no redundancy or filler, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool, the description covers the core purpose and decision spectrum adequately. However, it fails to mention how to obtain a requestKey or what happens after a decision (e.g., whether the command execution proceeds). The lack of an output schema means return values are unaddressed, but this is a minor gap given the simple nature of the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is only 50%, with requestKey having a description and decision lacking one. The description repeats the enum values without explaining their semantic differences or the consequences of each choice. It adds no meaning beyond the schema for requestKey, merely referencing 'pending approval' without clarifying how to obtain or use the key.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses explicit verbs (accept, decline, cancel) and names the resource (pending Codex command-execution or file-change approval), making the tool's purpose immediately clear. It also distinguishes this from sibling tools like codex_list_approvals by indicating this tool resolves rather than lists approvals.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used when a pending approval exists, but it does not explicitly state when to use this tool versus alternatives, nor does it mention prerequisites like obtaining a requestKey. There is no guidance on when to choose acceptForSession over accept, or when to cancel rather than decline.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_sendSend new Codex turnADestructive
Resume an authorized Codex thread when necessary and start a new turn. Use only when no turn is active; use codex_steer for an in-flight turn.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional allowed repository directory override. | |
| model | No | Optional Codex model id. Omit to use the configured default. | |
| effort | No | Optional reasoning effort accepted by the selected model. | |
| prompt | Yes | New user instruction. | |
| threadId | Yes | Codex thread id. | |
| sandboxMode | No | read-only prevents edits; workspace-write permits writes only in the repository. Legacy camelCase aliases remain accepted. | workspace-write |
| networkAccess | No | Requires CODEX_ALLOW_NETWORK=1 on the MCP server. | |
| approvalPolicy | No | Controls when Codex asks before command execution or file changes. | on-request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate destructive and open-world behavior, so the description doesn't need to repeat those. However, it adds only a state constraint ('no turn active') without explaining what 'authorized' means, potential side effects like command execution, or how approval flow (given sibling codex_resolve_approval) interacts. Neutral but somewhat thin.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no fluff, front-loaded with action and usage. Every word earns its place and is highly scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While purpose and usage are clear, the tool has 8 parameters and no output schema. The description doesn't explain what the function returns, how to handle approval requests, or what distinguishes an 'authorized thread'. Sibling tools like codex_wait and codex_resolve_approval imply a larger workflow, but this description alone leaves some gaps for an agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 8 parameters. The description adds no parameter-level detail beyond what the schema already provides, which is acceptable given the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verbs ('Resume', 'start a new turn') with a clear resource ('Codex thread'), and differentiates itself from the sibling tool codex_steer by explicitly stating its scope. It clearly states what the tool does and when it applies.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool ('only when no turn is active') and names the alternative for the opposite case ('use codex_steer for an in-flight turn'). This is exactly the kind of direct usage guidance needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_startStart Codex taskADestructive
Start a new Codex app-server thread and immediately begin a turn in an allowed local repository. Return threadId, turnId, and an event cursor for codex_wait or codex_status.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Existing repository directory inside CODEX_ALLOWED_ROOTS. | |
| model | No | Optional Codex model id. Omit to use the configured default. | |
| effort | No | Optional reasoning effort accepted by the selected model. | |
| prompt | Yes | Complete implementation or investigation request for Codex. | |
| sandboxMode | No | read-only prevents edits; workspace-write permits writes only in the repository. Legacy camelCase aliases remain accepted. | workspace-write |
| networkAccess | No | Requires CODEX_ALLOW_NETWORK=1 on the MCP server. | |
| approvalPolicy | No | Controls when Codex asks before command execution or file changes. | on-request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds behavioral context beyond annotations: it returns threadId, turnId, and an event cursor, and clarifies that the turn begins immediately in an allowed local repository. Annotations already mark it as destructive and open-world, so no contradiction exists. It doesn't elaborate on approval or sandbox behavior, but those are covered by schema and annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences convey purpose, behavior, and return value without repetition. Every clause earns its place: it names the resource, the immediate action, the allowed scope, and the downstream tools that consume the return values.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description appropriately explains the return values. It also contextualizes the tool as a starting point for a thread lifecycle. It doesn't explicitly state that execution is asynchronous or that the returned IDs are needed for later calls, but those are strongly implied by the mention of the event cursor. The tool's complexity is well handled overall.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema documents all parameters well. The description only adds 'allowed local repository' context that aligns with cwd, and mentions the return cursor, but doesn't add new details about parameters like model, effort, sandboxMode, etc. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Start a new Codex app-server thread'), the resource ('Codex app-server thread'), and the immediate behavior ('begin a turn in an allowed local repository'). It also distinguishes this from sibling tools by explicitly returning an event cursor for codex_wait or codex_status, signaling this is the entry point for new threads.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explains what this tool does and implies its role relative to siblings by referencing post-start tools (codex_wait, codex_status). It doesn't explicitly say when not to use it or name alternatives for existing threads, but the context of 'new' thread is clear. The return cursor guidance helps the agent know how to follow up.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_statusRead Codex statusARead-onlyIdempotent
Read a thread snapshot, current turn state, pending approvals, latest agent message, latest diff, and recent streamed events.
| Name | Required | Description | Default |
|---|---|---|---|
| threadId | Yes | Codex thread id. | |
| maxEvents | No | ||
| includeTurns | No | Include persisted turn history; this can produce a large response. | |
| afterSequence | No | Return events newer than this cursor. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds transparency by detailing the exact data returned (latest diff, streamed events, etc.) beyond the annotation flags. It does not mention potential large responses from includeTurns, but that is covered in the schema parameter description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the main action ('Read a thread snapshot') and then lists all data components in a logical sequence. No filler or redundant content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description adequately enumerates the key return categories (thread snapshot, turn state, approvals, etc.). It does not cover edge cases or polling behavior, but given the read-only annotation and schema parameters, it provides sufficient context for an agent to understand the tool's purpose and outputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not elaborate on any parameters, but the input schema already provides descriptions for 3 of 4 parameters (threadId, includeTurns, afterSequence). The only undocumented parameter, maxEvents, is self-explanatory. The description's phrase 'recent streamed events' loosely implies event-related parameters but adds minimal value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads a thread snapshot, current turn state, pending approvals, latest agent message, latest diff, and recent streamed events. It uses a specific verb ('Read') and resource, and the enumerated components distinguish it from sibling tools like codex_read_thread or codex_list_approvals.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly conveys this is for getting a composite status view, but it does not explicitly state when to use this tool versus alternatives such as codex_read_thread or codex_list_approvals. No exclusions or alternative recommendations are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_steerSteer active Codex turnADestructive
Append guidance to the currently active turn without creating another turn. Supply expectedTurnId when available to prevent steering the wrong turn.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Additional in-flight guidance. | |
| threadId | Yes | Codex thread id. | |
| expectedTurnId | No | Optional active turn id returned by codex_start or codex_send. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint false, destructiveHint true, and idempotentHint false, so the agent knows this modifies state. The description adds context about the 'currently active turn' and the safety mechanism of expectedTurnId to avoid steering the wrong turn. Still, it does not explain failure modes or what happens if no active turn exists, so it provides only moderate additional transparency beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the core action, and every word earns its place. It avoids repetition and includes both the primary function and an important usage hint without excess.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of detailed annotations, the description is adequate. It covers the key behavior and the critical safety parameter. A minor gap is that it does not explain return behavior or error conditions (e.g., what happens if no active turn exists), but since there is no output schema and the context is straightforward, this is not a significant omission.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds meaning for expectedTurnId by explaining its purpose ('prevent steering the wrong turn'), which goes slightly beyond the schema. However, it offers no additional context for prompt or threadId beyond the existing schema descriptions. Overall, the added value is marginal, so a 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool appends guidance to the currently active turn, using the specific verb 'append' and resource 'guidance to active turn'. It also distinguishes itself from creating another turn, differentiating it from siblings like codex_send. The mention of expectedTurnId to prevent steering the wrong turn further clarifies its unique role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool: when you want to add guidance to an ongoing turn rather than starting a new one. The phrase 'without creating another turn' provides an exclusion, and the instruction to supply expectedTurnId when available gives practical guidance. However, it does not explicitly name alternative tools, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_waitWait for Codex progressARead-onlyIdempotent
Long-poll an active turn until it completes, fails, requests approval, is interrupted, or reaches the timeout. Continue with the returned eventCursor.
| Name | Required | Description | Default |
|---|---|---|---|
| threadId | Yes | Codex thread id. | |
| maxEvents | No | ||
| timeoutMs | No | ||
| afterSequence | No | Cursor returned by the preceding Codex tool call. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, so behavioral disclosure of safety is covered. The description adds valuable context about long-polling semantics, terminal states, timeout behavior, and the eventCursor continuation mechanism, which goes beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the action and outcome, and every phrase adds value. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple polling tool, the description covers purpose, terminal conditions, timeout, and continuation with eventCursor. There is no output schema, but the description gives enough hint about the return value. It could mention what events contain or how to handle approval requests, but those may be covered by sibling tools like codex_resolve_approval.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: threadId and afterSequence are described, while maxEvents and timeoutMs are not. The description mentions 'timeout' and 'eventCursor', providing partial meaning for timeoutMs and afterSequence, but does not fully compensate for the undocumented parameters. Parameter names are mostly self-explanatory, but a clearer mapping would help.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb ('Long-poll') and a specific resource ('an active turn'), listing all terminal states: completes, fails, requests approval, interrupted, or timeout. This distinguishes it from siblings like codex_status (which likely polls status) and codex_read_thread (which reads a thread).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool: after an active turn exists, to wait for completion or interruption, and to continue using the returned eventCursor. It does not explicitly name alternatives or exclusions, but the context is clear enough that an agent can infer it should be used instead of codex_status for blocking waits.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.2.3- Changed
codex_read_thread2 fields changed- changed
Input schema / properties / includeTurns / defaultPrevious value: -trueNew value: +false - added
Input schema / properties / includeTurns / descriptionAdded value: +"Include full persisted turns. Omit for the safer compact thread view."
10 tool updates
v1.0.3- First observed
codex_interrupt - First observed
codex_list_approvals - First observed
codex_list_threads - First observed
codex_read_thread - First observed
codex_resolve_approval - First observed
codex_send - First observed
codex_start - First observed
codex_status - First observed
codex_steer - First observed
codex_wait
TDQS
Scored across 10 tools
Each tool targets a distinct lifecycle moment: start/send create or resume turns, steer mutates an active turn, status/wait/read observe, interrupt cancels, and approvals have dedicated list/resolve tools. Potentially overlapping pairs like send vs steer and status vs read_thread are explicitly disambiguated in their descriptions.
All tools share the codex_ prefix and use clear action-oriented verbs, with verb_noun forms for list/read/resolve operations. The naming is consistent, predictable, and uniformly snake_case.
10 tools is well-scoped for a Codex supervisor, covering turn lifecycle, observation, thread inspection, and approval handling without unnecessary redundancy. Each tool has a clear role in the workflow.
The surface covers the core workflow: starting, resuming, steering, observing, waiting on, interrupting, and listing threads, plus approval management. Minor gaps exist around deleting threads or resolving unsupported approval types, but agents can complete primary supervision tasks.
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
1Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server that exposes the local Grok CLI to Codex for bounded repo work, reviews, rescue analysis, adversarial checks, session listing/export, and background job management while keeping Codex hidden context out of scope.121MIT
- FlicenseNot gradedqualityCmaintenanceCodex Bridge MCP is a local MCP orchestration service for a stable Claude Code x Codex CLI development workflow.2-
- AlicenseNot gradedqualityAmaintenanceA local STDIO MCP server that bridges MCP clients to the Codex CLI by sending instructions to a configured workspace, exposing task run, status, and result tools with a read-only sandbox and no remote transport.133MIT
- FlicenseBqualityBmaintenanceProduction-oriented MCP gateway for managing Codex through a persistent codex app-server process, supporting threads, autonomous goals, approvals, and HTTP/stdio transports.202-