boshu2/agentops/codex-exec
Claude Code and agent skill by boshu2/agentops
- community
Checking that the SKILL.md file is still in the repository.
Run one prompt through headless Codex and capture the result. Use when: wanting a one-shot `codex exec` run or CI step. Not for batches or retries.
Install
npx vskill@latest install boshu2/agentops/codex-execSKILL.md
Codex Exec — one-shot runtime adapter
Run exactly one caller-supplied Codex prompt as one process and capture its result. This skill does not choose work, retry, validate or continue.
Rules that change the command
- Sandbox from declared effects.
-s read-onlyfor review or analysis,
workspace-write only for authorized edits, and network or wider access only when the caller explicitly requires those effects. "In case it needs it" is not a declared effect. -s limits only Codex's shell commands; the user's config.toml still starts its MCP servers. For review and CI add --ignore-user-config (auth still loads) and --ephemeral, or report the inherited MCP servers as undeclared effects. A permission denial inside the run (EPERM, "Operation not permitted") shows only what the mode blocks, not whether the host or the code would fail. Quote it and report the check as sandbox-limited under not run / not_checked: neither a pass nor a failed check. A host-side observation still stands; a host run is the caller's decision.
- Close stdin.
codex execreads the prompt from stdin when no prompt
argument is given, and appends piped stdin to a prompt argument. A non-TTY run (CI, a script) with an open stdin can wait forever: the stdin hang. Feed the prompt on stdin and let it end, or redirect </dev/null.
- One deadline, never renewed. Fix one absolute deadline before the first
attempt. Each invocation, including any retry the caller decides to make, gets only the time left before that deadline. A retry never gets a fresh budget: a loop that gives each attempt its own new timeout has silently multiplied the caller's bound. A missing, zero, negative or malformed bound prevents launch; an expired deadline stops before dispatch.
- No retry here. Report a timeout, error or empty output as it is. Another
invocation is the caller's decision, under the same deadline.
- Capped capture, typed exit. Capture output to a file under a byte cap and
report the exit status. A timeout is not a result.
Run it
In an AgentOps source checkout, use the guarded library. It enforces the deadline, the combined output cap (10 MiB default), process-group cleanup and echo detection:
Outside a Git repository add CODEX_EXEC_SKIP_GIT_CHECK=1; to keep the final message outside the cap, add -o "$LAST" to that array (assigned on its own line).
An installed skill ships no scripts, so scripts/lib/codex-exec.sh is absent outside a source checkout. Run codex exec directly instead, with bash or zsh (flags as of codex-cli 0.163.0; confirm with codex exec --help; add --skip-git-repo-check and -o <file> as above):
An output file exactly at the cap was truncated, and its status reflects the closed pipe, not a review. The fallback has no survivor check or echo detection; report both as not enforced.
Exit codes (guarded library)
| Exit | Meaning | |
|---|---|---|
| 0 | Codex completed and produced output | |
| 2 | precondition: binary missing, bounds invalid or missing, capability unavailable, or cleanup unverified; not a result | |
| 122 | descendants survived Codex's exit; degraded run | |
| 123 | capture or prompt-preparation cap reached; partial evidence kept | |
| 124 | deadline expired, or a clean exit with empty output; a stall, not a result | |
| 125 | output repeats the prompt; not a result | |
| 128+N | cancelled by signal N (129 HUP, 130 INT, 143 TERM) | |
| other | Codex's own nonzero status, preserved |
Reserved codes are runtime evidence, never a semantic verdict. A Codex 124 or 137 returns 124 with the STALL line; a Codex 2, 122, 123, 129, 130 or 143 returns with no codex-exec: stderr line, so check stderr, the capture and elapsed time before reading one as the runner's. Guarded runner internals covers inputs, host requirements, process supervision and the external sandbox wrapper.
Report, then stop
A Codex validator follows the judgment receipt convention and the model-dispatch recipe: a requested model flag or the model's own description does not prove which model ran. Siblings: claude-exec (one headless Claude prompt), agy-native (AGY) and agent-native (worker batches).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/codex-exec/SKILL.md
Popularity
- Repository stars
- 416
- Repository forks
- 40
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/boshu2/agentops/codex-exec)