shellout
/shellout
How to delegate a self-contained task to a cheaper pseudo-subagent via `codex exec` (OpenAI models; default gpt-5.6-sol). Use ONLY when the user explicitly invokes /shellout or names codex as the runner — not for general subagent or delegation requests.
- Author
- david-crespo ↗
- Repository
- dotfiles ↗
- Licence
- MIT
- Last repository change
- 05.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
How to delegate a self-contained task to a cheaper pseudo-subagent via `codex exec` (OpenAI models; default gpt-5.6-sol). Use ONLY when the user explicitly invokes /shellout or names codex as the runner — not for general subagent or delegation requests.
Original author description
How to delegate a self-contained task to a cheaper pseudo-subagent via `codex exec` (OpenAI models; default gpt-5.6-sol). Use ONLY when the user explicitly invokes /shellout or names codex as the runner — not for general subagent or delegation requests.
How it works
- Invocation
- Multi-turn: follow up on the same thread
- Cost
- Running from Claude Code
- Models
SKILL.md preview
---
name: shellout
description: How to delegate a self-contained task to a cheaper pseudo-subagent via `codex exec` (OpenAI models; default gpt-5.6-sol). Use ONLY when the user explicitly invokes /shellout or names codex as the runner — not for general subagent or delegation requests.
---
# shellout: codex as a pseudo-subagent
Anthropic's cheaper models are not cost-effective for subagent work, so this skill
delegates self-contained tasks to a one-shot `codex exec` run: a full agent with
file, search, and shell tools that runs in cwd, takes one prompt, and prints a
final answer. It is the `claude -p` equivalent.
## Invocation
```bash
codex exec -m <model> -s <sandbox> --color never "<task>"
```
- **Sandbox** (`-s`) bounds what the run can do at the OS level (seatbelt on macOS):
- `read-only`: read, search, run read-only commands. Use for analysis and review.
- `workspace-write`: also edit files and run commands, writes confined to cwd.
Use for implementation. The run does not prompt for approval.
- `danger-full-access`: no sandbox. Avoid unless the task truly needs it.
- Pass a complete, self-contained task. The run shares no context with this
session: spell out files, goal, constraints, and what to return.
- Add `-C <dir>` to run in another directory, `--skip-git-repo-check` outside a
git repo, and `--ephemeral` to skip saving the session (not if you may want to
resume or price it later). Redirect stdin from `/dev/null` so codex does not
wait on it.
- The user's codex hooks print `hook: ...` lines; ignore them. The final message
is repeated at the end of stdout. For clean output use `-o <file>` (last
message only) or `--json` (JSONL events).
- Review the result like any subagent's work.
## Multi-turn: follow up on the same thread
The run is one-shot, but the thread persists. Reuse it to give feedback,
redirect, or ask codex to act on an analysis it just produced, without
re-explaining the task. This is the SendMessage equivalent for codex.
To capture the thread id, run the first turn with `--json` and read it from the
first event, which is `{"type":"thread.started","thread_id":"..."}`:
```bash
codex exec --json -m <model> -s <sandbox> -o "$TMPDIR/codex-last.md" "<task>" \
> "$TMPDIR/codex-events.jsonl" </dev/null
head -1 "$TMPDIR/codex-events.jsonl" | jq -r .thread_id
cat "$TMPDIR/codex-last.md"
```
Then continue with:
```bash
codex exec resume <THREAD_ID> -m <model> -o "$TMPDIR/codex-last.md" "<follow-up>"
```
Always repeat `-m` on resume. The model is NOT inherited from the thread: without
`-m` it falls back to the config default (`gpt-6-astra`), which is 50x luna's
price. The sandbox is inherited and `resume` has no `-s` flag. `codex exec
resume --last` picks the most recent thread in cwd when the id was not captured.
`codex exec fork <THREAD_ID> "<prompt>"` branches a thread to try an alternative
without disturbing the original.
## Cost
Report the cost after each turn, or at least at the end of the session:
```bash
bun ~/repos/dotfiles/codex/cost.ts <THREAD_ID>
# Token cost ≈ $0.01 this turn · $0.31 session
```
This reads the thread's rollout under `~/.codex/sessions` using the same pricing
table as the user's codex Stop hook (which does not fire for `codex exec`). The
`turn.completed` usage in the `--json` output is cumulative for the thread on
resumed turns, so don't price it per turn by hand.
Nothing meaningful is lost by ending the process between turns: the history is
replayed from disk, so the model sees the same prefix and server-side prompt
caching still applies if the follow-up comes within the cache window.
## Running from Claude Code
`codex` fails inside the Claude Code bash sandbox (it cannot start its app-server),
so run it with the sandbox bypass. Prefer `-s read-only` when the task allows,
since codex's own sandbox is then the only boundary.
## Models
The user usually names the model when invoking the skill. Otherwise use
`gpt-5.6-sol`. Prices per 1M tokens (in / out), as of 2026-09:
| Model | In | Out | Use for |
|-------|----|-----|---------|
| `gpt-5.6-sol` | $4.00 | $20.00 | default; ~40% of Fable's price, clearly strongest of the three |
| `gpt-5.6-terra` | $2.00 | $12.00 | routine code tasks where sol's judgment isn't needed |
| `gpt-5.6-luna` | $0.20 | $1.20 | bulk read-only exploration and summaries |
`gpt-6-astra` ($10 / $50) is the top model and rarely worth it over running the
task in this session.
Versions
The database has no other skills named shellout.
Database snapshot: 13.11.2026 · package version cd60b3862bd9 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100use-codex
Delegate independent codebase analysis, adversarial review, debugging, implementation, or patching to OpenAI Codex CLI as an external subagent. Use only when the user explicitly asks to use Codex, requests a Codex review or second opinion, or wants Codex to patch files. Route… - 100codex-delegation
Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured. - 100codex
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Uses GPT-5.2 by default for state-of-the-art software engineering. - 100codex
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Uses GPT-5.2 by default for state-of-the-art software engineering. - 95gpt
Delegate a task to OpenAI Codex through the Quest CLI runner from Claude-led sessions. Use when the user invokes /gpt, asks to use codex, or wants a second opinion from a different model. - 90sol-delegate
Use when Sol is the main Codex agent and should delegate execution to Terra, GPT-5.5, GPT-5.4, or another available model while retaining judgment and review.