Source profileQuality 84/100Review permissions

tobihagemann/turbo/claude/skills/codex-exec/SKILL.md

codex-exec

Run autonomous task execution using the codex CLI. Use when the user asks to "codex exec", "run codex exec", "execute a task with codex", or "delegate to codex".

Source repository stars
398
Declared platforms
1
Static risk flags
2
Last source update
2026-08-03
Source checked
2026-08-04

Decision brief

What it does—and where it fits

Autonomous task execution via the codex CLI. Runs non-interactively. Progress streams to stderr; final result on stdout.

Best for

  • Use when the user asks to "codex exec", "run codex exec", "execute a task with codex", or "delegate to codex".

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexDeclaredSource recordInstall path and trigger
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/tobihagemann/turbo --skill "claude/skills/codex-exec"
Safe inspection promptEditorial

Inspect the Agent Skill "codex-exec" from https://github.com/tobihagemann/turbo/blob/1c4cc7c9f13514d968e65783f921b82251d3fc0d/claude/skills/codex-exec/SKILL.md at commit 1c4cc7c9f13514d968e65783f921b82251d3fc0d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Sandbox

    All codex Bash calls require dangerouslyDisableSandbox: true (network access to OpenAI API). Without it, codex crashes with an Operation not permitted panic from the system-configuration crate before the model runs.

    All codex Bash calls require dangerouslyDisableSandbox: true (network access to OpenAI API). Without it, codex crashes with an Operation not permitted panic from the system-configuration crate before the model runs.
  2. 02

    Stdin Gotcha

    Codex reads from stdin whenever stdin is non-TTY (per codex exec --help: "If stdin is piped and a prompt is also provided, stdin is appended as a block"). In subagent and subprocess contexts the harness leaves stdin connected to a pipe that never EOFs, so a bare codex exec "..."…

    Codex reads from stdin whenever stdin is non-TTY (per codex exec --help: "If stdin is piped and a prompt is also provided, stdin is appended as a block"). In subagent and subprocess contexts the harness leaves stdin con…Always redirect stdin on non-piped invocations:The piped form (cat context.txt | codex exec "...") is safe — cat closes the pipe after the file, sending EOF.
  3. 03

    Synchronous Execution

    Run codex via the Bash tool as a foreground call (do not set runinbackground). Set timeout: 600000, the Bash maximum. A larger value is not honored: the harness backgrounds the call immediately and hard-kills codex at 600s, truncating its output. Within a valid timeout, codex ru…

    Run codex via the Bash tool as a foreground call (do not set runinbackground). Set timeout: 600000, the Bash maximum. A larger value is not honored: the harness backgrounds the call immediately and hard-kills codex at 6…Capture the session id: from the run's stderr chrome as it starts; it never appears in the -o file, and recovery depends on it. Do not pass --ephemeral when the run may need recovery, since it persists no session files.A run that outlives the timeout is normally force-backgrounded: the result carries a task ID and an output file path, and the run continues to completion. Recover it by reading the output file: Read the path, then Read…
  4. 04

    Transient Crash Retry

    Re-run the command once when the Bash call returned an error exit with no stdout and no task ID. A timeout is not a crash: when the error text reads Command timed out after , resume the session per Synchronous Execution rather than re-running. Recover a force-backgrounded run pe…

    Re-run the command once when the Bash call returned an error exit with no stdout and no task ID. A timeout is not a crash: when the error text reads Command timed out after , resume the session per Synchronous Execution…Treat models-manager and cache-TTL errors as non-fatal warnings. Read the error text for usage-limit and authentication signatures and report those without retrying.
  5. 05

    Permission Levels

    Omitting --sandbox falls back to the codex config and project trust level (trusted projects run workspace-write), so always pass the flag explicitly.

    Omitting --sandbox falls back to the codex config and project trust level (trusted projects run workspace-write), so always pass the flag explicitly.For fix or implementation tasks, default to --sandbox workspace-write --full-auto so Codex can edit files without confirmation prompts. Use --sandbox read-only for analysis or research tasks.

Permission review

Static risk signals and limitations

Writes files

medium · line 16

The documentation asks the agent to create, modify, or delete local files.

Route text you did not author through this channel whatever its size — a diff, file contents, a code comment, a plan or spec, third-party feedback, command output. Keep backticks and `$` out of the quoted argument even in text you wrote, si

Runs scripts

medium · line 55

The documentation asks the agent to run terminal commands or scripts.

Re-run the command once when the Bash call returned an error exit with no stdout and no task ID. A timeout is not a crash: when the error text reads `Command timed out after <duration>`, resume the session per Synchronous Execution rather t

Writes files

medium · line 79

The documentation asks the agent to create, modify, or delete local files.

| `-o <path>` | Write final message to a file |

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score84/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars398SourceRepository attention, not individual Skill quality
Compatibility1 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
tobihagemann/turbo
Skill path
claude/skills/codex-exec/SKILL.md
Commit
1c4cc7c9f13514d968e65783f921b82251d3fc0d
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Codex Exec

Autonomous task execution via the codex CLI. Runs non-interactively. Progress streams to stderr; final result on stdout.

codex exec "task description" < /dev/null

For large context, pipe it via stdin. The prompt stays as the argument, context is passed as <stdin> automatically:

cat context.txt | codex exec "question about the context"

Route text you did not author through this channel whatever its size — a diff, file contents, a code comment, a plan or spec, third-party feedback, command output. Keep backticks and $ out of the quoted argument even in text you wrote, since both stay live inside it. Write the context file with the Write tool so nothing is interpreted on the way in.

Sandbox

All codex Bash calls require dangerouslyDisableSandbox: true (network access to OpenAI API). Without it, codex crashes with an Operation not permitted panic from the system-configuration crate before the model runs.

Stdin Gotcha

Codex reads from stdin whenever stdin is non-TTY (per codex exec --help: "If stdin is piped and a prompt is also provided, stdin is appended as a <stdin> block"). In subagent and subprocess contexts the harness leaves stdin connected to a pipe that never EOFs, so a bare codex exec "..." hangs forever, printing only Reading additional input from stdin....

Always redirect stdin on non-piped invocations:

codex exec "task description" < /dev/null

The piped form (cat context.txt | codex exec "...") is safe — cat closes the pipe after the file, sending EOF.

Synchronous Execution

Run codex via the Bash tool as a foreground call (do not set run_in_background). Set timeout: 600000, the Bash maximum. A larger value is not honored: the harness backgrounds the call immediately and hard-kills codex at 600s, truncating its output. Within a valid timeout, codex runs foreground and returns its result synchronously when it finishes in time.

Capture the session id: from the run's stderr chrome as it starts; it never appears in the -o file, and recovery depends on it. Do not pass --ephemeral when the run may need recovery, since it persists no session files.

A run that outlives the timeout is normally force-backgrounded: the result carries a task ID and an output file path, and the run continues to completion. Recover it by reading the output file: Read the path, then Read it again once the <task-notification> reports completion.

Rarely the run is hard-killed instead, giving an error exit (code 143) reading Command timed out after <duration> with no task ID and no -o file. Do not re-run the prompt from scratch; that discards the work already done and hits the same ceiling. Resume the session with a fresh output path, asking for the findings as the final message rather than as a file write:

codex exec -o <fresh-output-path> resume <session-id> \
  "Reply now with your complete findings as your final message." < /dev/null

resume inherits the original session's sandbox, so pass --sandbox only to change it. When the kill left no session id in hand, recover it from the newest ~/.codex/sessions/<YYYY>/<MM>/<DD>/rollout-<timestamp>-<session-id>.jsonl (the id is the UUID in the filename), listing a single day directory so the ordering is right. codex exec resume --last also works when no other codex run is in flight. Do not consult ~/.codex/session_index.jsonl; it lags behind the rollout files.

Never wait with Monitor (it returns immediately, and events that arrive after your final text are dropped), and never return the task ID, an interim file snapshot, or "Waiting for codex to finish" as the result — each is a false-empty return.

Transient Crash Retry

Re-run the command once when the Bash call returned an error exit with no stdout and no task ID. A timeout is not a crash: when the error text reads Command timed out after <duration>, resume the session per Synchronous Execution rather than re-running. Recover a force-backgrounded run per Synchronous Execution rather than retrying it. Keep the same prompt; when the run writes to an -o file, point the retry at a fresh path. Treat a second failure as final.

Treat models-manager and cache-TTL errors as non-fatal warnings. Read the error text for usage-limit and authentication signatures and report those without retrying.

Permission Levels

LevelFlagWhen to Use
Read-only--sandbox read-onlyAnalysis, code reading, generating reports
Workspace write--sandbox workspace-writeEditing files within the project
Full access--sandbox danger-full-accessInstalling packages, running tests, system operations
Full auto--full-autoCombined with a sandbox level for unattended execution

Omitting --sandbox falls back to the codex config and project trust level (trusted projects run workspace-write), so always pass the flag explicitly.

For fix or implementation tasks, default to --sandbox workspace-write --full-auto so Codex can edit files without confirmation prompts. Use --sandbox read-only for analysis or research tasks.

Options

OptionDescription
--full-autoAllow file edits without confirmation prompts
--sandbox <level>Permission level: read-only, workspace-write, danger-full-access
--jsonJSON Lines output (progress + final message)
-o <path>Write final message to a file
--output-schema <path>Enforce JSON Schema on the output
--ephemeralNo persisted session files
--skip-git-repo-checkBypass git repository requirement

Prompt Shaping

Codex uses XML tags in its own context scaffolding, so the model parses them natively. Structure prompts with XML tags for clearer responses:

  • <task>: The concrete job and relevant context.
  • <structured_output_contract>: Required output shape, ordering, and format.
  • <compact_output_contract>: Same purpose but for concise prose responses.
  • <grounding_rules>: When claims must be evidence-based.
  • <dig_deeper_nudge>: Push past surface-level findings to check for second-order failures.
  • <verification_loop>: When correctness matters — ask Codex to verify before finalizing.

Keep prompts compact, with tight output contracts. One clear task per exec call. For a large scope, instruct codex to report findings as it goes rather than verifying exhaustively before reporting, so a run that hits the timeout ceiling still yields usable output.

Parallel Execution

Codex supports parallel sub-agents via spawn_agent / wait_agent. The model will not fan out unless the prompt explicitly requests it. See references/parallel-execution.md for patterns and limitations.

Interpreting Results

  • Exec output is a starting point, not a guaranteed solution
  • Cross-reference suggestions with project documentation and conventions
  • Test incrementally rather than applying all changes at once
  • For file-editing tasks, always review the diff before committing

Alternatives

Compare before choosing

Computed 10014,225

wanshuiyin/Auto-claude-code-research-in-sleep

kill-argument

Two-thread adversarial review: a fresh reviewer constructs the strongest 200-word rejection memo, then a second fresh reviewer defends the paper point-by-point and surfaces still-unresolved critical issues. Use when user says "kill argument", "adversarial review", "hostile review", "rebuttal preparation", "reviewer-2 simulation", or before submitting a theory paper that has already passed standard review rounds.

Computed 10014,225

wanshuiyin/Auto-claude-code-research-in-sleep

kill-argument

Two-thread adversarial review: a fresh reviewer constructs the strongest 200-word rejection memo, then a second fresh reviewer defends the paper point-by-point and surfaces still-unresolved critical issues. Use when user says "kill argument", "adversarial review", "hostile review", "rebuttal preparation", "reviewer-2 simulation", or before submitting a theory paper that has already passed standard review rounds.

Computed 9814,225

wanshuiyin/Auto-claude-code-research-in-sleep

auto-paper-improvement-loop

Use it for operations tasks; the detail page covers purpose, installation, and practical steps.

Computed 98351

cameronfreer/lean4-skills

lean4

Use when editing .lean files, debugging Lean 4 builds (type mismatch, sorry, failed to synthesize instance, axiom warnings, lake build errors), searching mathlib for lemmas, formalizing mathematics in Lean, finding a counterexample to, refuting, or disproving a Lean statement, or learning Lean 4 concepts. Also trigger when the user asks for help with Lean 4, mathlib, or lakefile. Do NOT trigger for Coq/Rocq, Agda, Isabelle, HOL4, Mizar, Idris, Megalodon, or other non-Lean theorem provers.