Codex cli agent
Run OpenAI Codex CLI headlessly via codex-exec.sh (codex exec). Use when the user asks for Codex, GPT coding agent, codex exec, Codex subagents, or spawn_agents_on_csv. -r / read-only sandbox blocks workspace writes — use -s workspace-write when the prompt must write files. -T prefers subagents. Orchestrator owns git (--no-git).From its SKILL.md
npx -y skills add ImL1s/agent-cli-skills --skill codex-cli-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.2 KB, 537 tokens by cl100k_base, as published. Nobody here has run it
Codex CLI (codex exec) Executor
When to use
- User wants Codex /
codex execas the coding agent - Need Codex subagents, agent TOML profiles, or CSV fan-out
- Sandboxed writes (
-s workspace-write) vs strict read-only reviews (-r)
Wrapper
./codex-exec.sh -C /path/to/repo -s workspace-write "Implement X. NO git."
./codex-exec.sh -r -C /path/to/repo "Review for bugs" # sandbox read-only
./codex-exec.sh -T -C /path/to/repo "Parallelize with subagents"
./codex-exec.sh -j -o /tmp/last.txt -f /tmp/bundle.txt
./codex-exec.sh --enable some_feature -m <model> "…"
Flags: -m · -t · -C · -s read-only|workspace-write|danger-full-access · -o last-message file ·
-f · -j/--json · -r · -T · --skip-git-repo-check (default on) · --require-git-repo ·
--ephemeral · --add-dir · --image · --enable · --profile · --no-git · -- passthrough.
-C is absolutized before use (avoids nested relative cwd).
Sandbox vs writing answer files
If the prompt must write a file under the workspace, do not use -r / read-only.
That fails with writing is blocked by read-only sandbox after the model finishes reasoning.
Use -s workspace-write and instruct “only write the designated path”, or capture stdout.
Native multi-agent
- Subagents (parallel spawn + synthesize); custom roles in
~/.codex/agents/*.tomlor.codex/agents/ - Experimental batch:
spawn_agents_on_csv(one worker per CSV row) - Feature flags:
codex features list|enable|disable -Tasks Codex to prefer subagents / CSV fan-out when useful
Models
Do not hard-code a stale model table. Discover via your Codex build / account docs.
Pin with -m when automation requires stability.
Discipline
Always --skip-git-repo-check outside git repos. Exit code untrusted. Orchestrator owns git.
What ships with it: 4 files
16.1 KB alongside SKILL.md, 4 of them executable
lib/
- common.shruns6.8 KB
- parse_stream_json.pyruns3.5 KB
- pty_run.pyruns1.7 KB
- codex-exec.shruns4.0 KB
Gives 0 of the 12 instructions most context ai engineering skills give in 537 tokens
Counted across 1,328 of the 2,349 authors here whose files we hold, read 2026-09-06
- Dispatch a fresh subagent for each taskin 76 of 1328, across 59 files
- Perform spec compliance review before code quality reviewin 44 of 1328, across 34 files
- Dispatch a final code reviewer after all tasksin 38 of 1328, across 26 files
- Answer subagent questions before allowing implementationin 36 of 1328, across 26 files
- Use the least powerful model capable of the taskin 33 of 1328, across 26 files
- Create a TodoWrite list for all tasksin 32 of 1328, across 22 files
- Perform a task review after each implementationin 31 of 1328, across 24 files
- Extract all tasks and context from the planin 29 of 1328, across 20 files
- Provide full task text to subagentsin 28 of 1328, across 20 files
- Use git worktrees for isolated workspacesin 25 of 1328, across 20 files
- Specify the model explicitly when dispatching a subagentin 23 of 1328, across 18 files
- Execute all tasks from the plan without stoppingin 21 of 1328, across 16 files
Said here and by no other author read
- Use -s workspace-write for file writing tasks
- Use -r for read-only reviews
- Use -T to prefer subagents
- Absolutize the -C path before use
- Pin models with -m for stability
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.