refactor(input): bake codex cli runtime

This commit is contained in:
2025-10-15 17:29:06 -05:00
parent 5cd30ef5f2
commit 6a5ce586eb
5 changed files with 32 additions and 39 deletions

View File

@@ -20,12 +20,12 @@ cd input/Docker
./run-input-processor.sh up -d
```
Environment variables you can pass before the command:
- `CODEX_COMMAND_TEMPLATE` override the Codex CLI invocation for the resume customization run (defaults to `codex prompt --input {prompt} --output {output} --format markdown`).
- `CODEX_NORMALIZER_COMMAND_TEMPLATE` optional override for the job-description normalization run (defaults to the same value as `CODEX_COMMAND_TEMPLATE`).
- `POLL_INTERVAL_SECONDS` watcher polling cadence (default `5`).
- `CODEX_TIMEOUT_SECONDS` hard timeout for Codex calls (default `600`).
- `CODEX_CONFIG_DIR` optional override for the host directory that should mount into `/home/codex/.codex`.
- Environment variables you can pass before the command:
- `POLL_INTERVAL_SECONDS` watcher polling cadence (default `5`).
- `CODEX_TIMEOUT_SECONDS` hard timeout for Codex calls (default `600`).
- `CODEX_CONFIG_DIR` optional override for the host directory that should mount into `/home/codex/.codex`.
The container bundles the Codex CLI and expects the caller to mount their `~/.codex` directory for credentials.
Stop or inspect the stack with:
@@ -44,4 +44,4 @@ cd input/Docker
## Troubleshooting
- If Codex CLI fails, the job description moves to `ForCustomizing/failed/`. Check container logs, adjust the Markdown, then requeue it.
- Fatal errors (multiple resumes, multiple job descriptions, missing template, or missing Codex binary) stop the container. Resolve the issue and restart via the wrapper.
- To change the Codex command format, pass a quoted template (e.g., `CODEX_COMMAND_TEMPLATE='codex run --input {prompt} --output {output}' ./run-input-processor.sh up -d'`). The template must include `{prompt}` and `{output}` placeholders.
- The watcher logs the exact `codex prompt --input --output … --format markdown` command before each invocation; inspect container logs if troubleshooting is needed.