Documentation
¶
Overview ¶
Package codex adapts the Codex CLI (`codex exec --json`) to the executor's canonical events (ADR-0010 Decision 3). Translate is a pure per-line function; the fixtures in the test pin every mapping.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct{}
func (*Adapter) Command ¶
Command builds the headless launch. The prompt stays the trailing positional argument regardless of --sandbox, so flag placement never depends on whether PermissionMode was set.
--ephemeral is deliberately not used (ADR-0010 Decision 2): keeping the thread means provider_session_id (thread_id) still points at Codex's own session log, the original-reference pattern claude-code already uses (ADR-0006 Decision 3). ADR-0022 turns that kept thread into the chat's continuity: `exec resume <id> <prompt>`.
A resumed turn carries no --sandbox: measured on codex 0.144.4, `exec resume` has no such flag — the thread keeps the sandbox it was started with. Dropping it is the truthful mapping, not a silent downgrade.
作業場所の外で扱わせる場所 (ADR-0047 Decision 3) は codex にも --add-dir が ある("Additional directories that should be writable alongside the primary workspace")。claude 側とは権限の細部が違うが「主ワークスペースの外もこの 場所なら扱ってよい」という同じ意図の口なので、同じ Request フィールドの 翻訳先として使う。--sandbox と同じく `exec resume` にはこのフラグが無いため 再開ターンでは積まない — スレッドは開始時の設定のまま続く。 働く場所そのもの(WorkDir)に codex の -C/--cd は使わない: cwd は Executor が全 Provider 共通で落とす(Decision 2)。