Codex model plugin for bub.
- Bub plugin entry point:
codex - A
run_modelhook implementation that invokes thecodexCLI - Session continuation via
codex e resume <session_id> - Optional temporary skill wiring from
skillsinto workspace.agents/skills
uv pip install "git+https://github.com/bubbuild/bub-contrib.git#subdirectory=packages/bub-codex"You can also install it with Bub:
bub install bub-codex@maincodexCLI must be installed and available inPATH.codexCLI should be authenticated before runtime.
The plugin reads environment variables with prefix BUB_CODEX_:
BUB_CODEX_MODEL(optional): model override passed as--model <value>BUB_CODEX_YOLO_MODE(optional, default:false): whentrue, appends--dangerously-bypass-approvals-and-sandbox
- Workspace resolution:
- Uses
state["_runtime_workspace"]when present - Falls back to current working directory
- Uses
- Command shape:
codex e resume <session_id> [--model ...] [--dangerously-bypass-approvals-and-sandbox] -
- Prompt is sent through stdin; stdout is returned as model output.
- When Codex exits non-zero, output includes:
Codex process exited with code <code>.
- During invocation, the plugin scans
skillsfor directories containingSKILL.md. - It creates symlinks under
<workspace>/.agents/skills/<skill_name>. - Symlinks created by this plugin invocation are removed after the run.