SkillsReviewed · boshu2

AgentOps codex-exec

codex-exec is an AgentOps skill for developers running one unattended Codex prompt, but its strongest safeguards require scripts from an AgentOps source checkout. It documents deadline enforcement, bounded output capture, sandbox settings and process-status reporting, with a simpler direct CLI fallback.

Researched 16 Nov 2026

In short.

codex-exec is a skill for developers and CI maintainers running one unattended Codex prompt, but its installed files do not include the guarded runner. The documented runner uses a shared deadline, caps combined output at 10 MiB by default and distinguishes several failure states. The direct CLI fallback lacks survivor checks and prompt-echo detection. The runner implementation is outside the supplied scope, current CLI compatibility is unknown, and nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

The selected scope is plugin/skills/codex-exec at revision 299da1c4d339d13b897d82f237267c9d833d255c. The supplied manifest identifies SKILL.md and references/guarded-runner.md as the complete selected folder, supplemented by repository-level LICENSE and NOTICE. The guarded runner script, other repository implementation files, sibling skills and linked validation references are excluded. All supplied file text was considered; implementation correctness, host compatibility, cleanup, isolation, generated-output quality and operating cost remain unverified. Nothing was executed.

The overview

Identity

codex-exec is an instruction skill in boshu2/agentops, described as a one-shot runtime adapter. It passes one caller-supplied prompt to a noninteractive Codex process and captures its output and exit status. It does not choose tasks, retry, validate the answer or continue work.

The original resource folder is [https://github.com/boshu2/agentops/tree/299da1c4d339d13b897d82f237267c9d833d255c/plugin/skills/codex-exec]. Its supplied contents are SKILL.md and references/guarded-runner.md.

Assessment

The skill is useful when a script or CI job needs one Codex invocation with explicit limits and inspectable failures. Its distinctive value is its treatment of unattended-process problems: open stdin, renewed timeout budgets, excessive output, empty responses, prompt echoes and descendants that outlive the parent process.

The main trade-off is operational complexity. The stronger controls depend on a separate shell library and host capabilities. The supplied documents explain their intended behavior, but do not establish that the implementation enforces it correctly.

Users

The clearest audience is developers and CI maintainers comfortable with shell scripts, environment variables and exit codes. A typical use is asking Codex to analyze code or perform a specifically authorized edit without an interactive terminal.

Beginners can use the instructions to understand how unattended Codex runs differ from interactive sessions, but setup requires command-line knowledge. Batch execution, automatic retries, task planning and judging generated work require additional tooling or caller decisions.

Capabilities

The documented guarded runner supports workspace and sandbox settings, an optional model flag, prompt files or arguments, combined or separate output capture, and a default 10 MiB combined stdout/stderr cap. It also describes deadline enforcement, prompt-echo detection, descendant supervision and preservation of partial output.

Its documented statuses distinguish completion (0), precondition failure or unverified cleanup (2), surviving descendants (122), capture or prompt-preparation limits (123), deadline expiry or unexpected empty output (124), and prompt echo (125). These describe process outcomes, not the correctness of generated work. Empty output can be accepted explicitly with CODEX_EXEC_EXPECT_OUTPUT=0.

Using it

Requirements

A usable Codex CLI, its authentication setup, a workspace and a supplied prompt are needed. The documented workflow uses one absolute Unix deadline fixed before launch and reused across any caller-authorized invocations. The library also accepts a positive finite timeout; when both bounds are supplied, the earlier bound applies. Missing or invalid bounds prevent launch.

The guarded path requires an AgentOps source checkout containing scripts/lib/codex-exec.sh. Its documented host requirements include /usr/bin/perl with POSIX, IO::Select, Fcntl and Time::HiRes, a monotonic clock, process-group signalling, and timeout or gtimeout supporting --foreground. The direct fallback is documented for bash or zsh.

Mechanism

The guarded runner is documented as creating an owned process group before launching Codex. On expiry, cancellation, excess output or direct-parent exit, it sends TERM and then KILL after 200 milliseconds. Pipe draining has a bounded cleanup window. Descendants surviving parent exit degrade the run even if later cleanup succeeds; remaining group membership, including unreaped zombies, makes cleanup unverified.

The time bound includes capability probes and prompt preparation. Partial captures are retained after interrupted runs. For Codex, an optional external wrapper can supply the sandbox instead of Codex's own sandbox, while the capture and cleanup supervisor operates outside that wrapper.

Setup

In an AgentOps source checkout, the documented setup sources scripts/lib/codex-exec.sh, assigns CODEX_EXEC_EXTRA_ARGS as a shell array on its own line, and supplies the workspace, sandbox, prompt file, deadline and capture path to codex_exec_guarded. Stdin must end or be redirected from /dev/null to avoid an unattended process waiting for input.

For review and CI, the instructions recommend --ignore-user-config to avoid starting inherited MCP servers; authentication still loads. Non-Git workspaces need the documented skip-Git-check option. If persistent session transcripts are needed, omit --ephemeral because it prevents session files from being written. An installed skill without the source checkout uses the direct CLI fallback.

Example

An illustrative CI use is asking Codex to explain a proposed code change. The caller could supply that prompt in a file, choose read-only mode, ignore user configuration, set one absolute deadline and capture output with the default 10 MiB limit.

The resulting record should identify the invocation, sandbox, launch-time budget, capture path, truncation, exit meaning and cleanup status. A permission-denied message would leave the affected check sandbox-limited; it would not establish a defect in the code. This example was not executed, and no output or success result is available.

Assessment & evidence

Limitations

Codex's sandbox flag limits its shell commands, while user-configured MCP servers may still start. The output cap covers captured stdout and stderr; workspace files and a final-message file written through -o are outside it. Documented process cleanup does not cover processes that deliberately escape the owned group or session.

The direct fallback lacks survivor checks and prompt-echo detection. Output reaching its cap may be truncated, with the pipeline status reflecting a closed pipe rather than completed work. Some raw Codex statuses overlap runner-reserved codes, so stderr, captured output and elapsed time are needed to interpret them. Nothing in these files establishes answer accuracy or execution success.

Reasoning

This approach fits work where the caller already knows the prompt and needs clear limits around a single AI subprocess. Its shared deadline prevents repeated invocations from silently multiplying the allowed time, while explicit failure states help distinguish usable output from stalls or incomplete capture.

The caller still needs to match permissions to the intended task and evaluate the answer. A completed process does not establish correct code, and a requested model flag or the model's own description does not prove which model actually ran.

Alternatives

The included direct codex exec fallback avoids the AgentOps library dependency. It combines timeout or gtimeout with a byte-limited pipeline, but documents weaker cleanup assurance and no prompt-echo detection.

SKILL.md points to sibling skills named claude-exec for one Claude prompt, agy-native when AGY is required, and orchestrate for batches. Their contents are outside the supplied scope, so their behavior, requirements and costs cannot be compared here.

Evidence

The resource documentation is available as SKILL.md [https://raw.githubusercontent.com/boshu2/agentops/299da1c4d339d13b897d82f237267c9d833d255c/plugin/skills/codex-exec/SKILL.md] and guarded-runner.md [https://raw.githubusercontent.com/boshu2/agentops/299da1c4d339d13b897d82f237267c9d833d255c/plugin/skills/codex-exec/references/guarded-runner.md]. Repository-level LICENSE and NOTICE provide the supplied rights evidence.

These files establish documented interfaces and intended behavior. They do not include the guarded runner implementation, execution logs, benchmarks or independent confirmation of cleanup and isolation. Nothing was executed.

Access & freshness

Costs

The Apache 2.0 license grants rights without license royalties. The supplied material does not establish Codex access prices, model inference charges, CI compute costs, storage costs or a per-run total.

The documented controls limit runtime and captured bytes. No monetary spending cap or model-token budget is described, so operating cost remains unknown.

Rights

The repository LICENSE and NOTICE identify Apache License 2.0 as the applicable license. NOTICE names AgentOps and Copyright 2025 Boden Fuller. The license permits use, modification and redistribution subject to its conditions.

Redistribution requires a license copy, retention of applicable source notices and preservation of relevant NOTICE attribution. Modified files must prominently state that they changed. The license includes a conditional patent grant, grants no general trademark rights and provides no warranty. Terms for Codex services and generated output are not established by these notices.

Freshness

The supplied snapshot identifies revision 299da1c4d339d13b897d82f237267c9d833d255c, captured on 16 November 2026. SKILL.md describes the direct CLI flags as applicable to codex-cli 0.163.0 and advises checking codex exec --help.

That version reference does not establish the latest CLI version or compatibility with a reader's installation. Changes after the captured revision and current runtime compatibility are unknown.

Actions

Before adopting the guarded path, inspect scripts/lib/codex-exec.sh at the same revision, confirm the documented host capabilities and compare the CLI flags with the installed Codex help. Decide the intended permissions, deadline, capture limit and need for persistent transcripts.

A practical evaluation should examine a small known prompt, forced deadline expiry, excessive output and descendant cleanup, retaining the resulting captures and statuses. Evaluate generated work separately and establish model usage costs independently. These are suggested next steps; no such evaluation was performed.

Evidence for this report

LICENSEnotice · checked 2026-11-16
NOTICEnotice · checked 2026-11-16
plugin/skills/codex-exec/SKILL.mdselected · checked 2026-11-16