Usage
codaph run uses the CodexSdkAdapter from src/lib/adapter-codex-sdk.ts for live event capture.Arguments
The prompt to send to Codex.
Options
Working directory for the Codex session. Defaults to current directory.
Codex model to use. Defaults to Codex’s default model.
Resume an existing Codex thread instead of starting a new one.
Enable Mubit cloud sync (default: auto-enabled if MUBIT_API_KEY is set).
Disable Mubit cloud sync even if API key is configured.
Examples
Basic usage
Specify working directory
Use specific model
Resume existing thread
Local-only capture (no Mubit)
How It Works
Run Codex session
Calls
adapter.runAndCapture() which:- Spawns Codex SDK process
- Subscribes to Codex event stream
- Sends the prompt
Capture events
For each Codex event:
- Transforms to
CapturedEventEnvelope - Redacts sensitive data
- Appends to local mirror (
.codaph/) - Writes to Mubit (if enabled)
Event Sources
Events captured viacodaph run have source type:
codex_exec(captured viacodaph exec)codex_history(imported viacodaph push)
Differences from codaph exec
| Feature | codaph run | codaph exec |
|---|---|---|
| Adapter | CodexSdkAdapter | CodexExecAdapter |
| Method | SDK streaming | JSON output parsing |
| Events | Live stream | Parse after completion |
| Source | codex_sdk | codex_exec |
| Use case | Interactive, live | Batch, scripted |
Troubleshooting
Command not found: codex
Command not found: codex
Cause: Codex SDK not installed or not in PATHSolution:
Events captured but not syncing to Mubit
Events captured but not syncing to Mubit
Cause: Mubit API key not configured or circuit breaker openSolution:
Session ID not showing in TUI
Session ID not showing in TUI
Cause: Mirror not flushed or index not updatedSolution:
See Also
codaph exec
Alternative capture using JSON output parsing
Direct Capture Guide
Detailed guide on direct capture methods
Codex SDK Adapter
SDK adapter implementation details
Architecture
How adapters fit into the data flow