Documentation
¶
Overview ¶
Package codex implements adapters.HarnessAdapter for the Codex CLI.
Run() forks `codex exec` with signal forwarding and exit normalisation. Unlike the claude adapter, session persistence, payload-patch application, and boid task notify integration are not wired.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements adapters.HarnessAdapter for the Codex CLI.
func (*Adapter) Bindings ¶
Bindings declares the host bind-mounts codex.Adapter.Run() needs inside the sandbox.
Returns nil: codex CLI state and skills reach the sandbox via the workspace HOME volume (internal/dispatcher/workspace_home.go) and dispatcher-owned skill mounts (skills_overlay.go) instead of an adapter-declared bind. The codex CLI binary itself is expected to be installed into that workspace home by the workspace's init.sh; a missing binary fails fast with an explicit message from Run() (run.go's missingCLIError).
func (*Adapter) Run ¶
Run forks codex. Interactive vs non-interactive is keyed off rc.TaskID: session jobs (JobKindSession) carry no task and are user-initiated, so they land in interactive TUI mode; hook jobs carry a BOID_TASK_ID and fall through to non-interactive `codex exec`. This mirrors how the claude adapter discriminates JobKindSession from JobKindHook via rc.TaskID == "".
Other responsibilities mirror the claude / opencode adapters: signal forwarding via sigutil, exit code normalisation for daemon-initiated stops, PWD strip on the child env, and cmd.Dir as the source of truth for the workdir.
Session persistence and payload-patch application are deliberately NOT wired here — interactive sessions are run-and-done, no resume yet.