codex-first
Claude Code work routing: delegate hands-on work to Codex under the native-Claude model gate.
Skill by steipete
Chalk Labs
Need help deploying codex-first?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/steipete-codex-first
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building, agent-orchestration
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/codex-first
What's inside
- Skill name
codex-first- Description
- Claude Code work routing: delegate hands-on work to Codex under the native-Claude model gate. Keep specification, judgment, and verification in Claude; prefer isolated Codex-backed autoreview.
- License
- MIT
- Instructions
- 229 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (7)
- SKILL.md
- coordination.md · references/
- launch-details.md · references/
- resume-and-watchdog.md · references/
- troubleshooting.md · references/
- codex-resume · scripts/
- codex-resume.test.sh · scripts/
SKILL.md (first lines)
# Codex First
## Launch flags — read first, copy verbatim
Default every Codex worker, **fresh or resumed**, to **GPT-6.1 Sol, high
reasoning, Fast service tier** (`service_tier="fast"`, sent as API `priority`;
Peter, 2026-10-30). Pass all three settings unless the user requests an override.
```bash
# fresh
codex exec --yolo -C "$WT" \
-m gpt-6.1-sol -c 'model_reasoning_effort="high"' \
--enable fast_mode -c 'service_tier="fast"' \
-o "$OUT" - < "$ORDER"
# resume: pass the same flags again; resume does not inherit them
codex exec resume "$SID" --dangerously-bypass-approvals-and-sandbox \
-m gpt-6.1-sol -c 'model_reasoning_effort="high"' \
--enable fast_mode -c 'service_tier="fast"' -o "$OUT" -
```
- Old Codex CLIs silently omit tiers they do not know (codex-cli 0.147 on Team warned
`not advertised` and sent no tier); keep the CLI current. Verified on Team with 0.166.0,
2026-10-30.
- Ultrafast only on request: swap in `-c 'service_tier="ultrafast"'` and add
`-c 'model_auto_compact_token_limit=260000'`. It is served up to ~282k prompt tokens, flaky at
288–294k, and silently `fast` at ≥300k (measured 2026-10-13); the 260k cap keeps it there.
Rollouts record only the requested tier; prove the served tier with a direct probe
(`response.service_tier`). Details: [launch details](references/launch-details.md).
- Context: workers get the base 500k window. Add `-p sol61-1m` (or `-p astra-1m`) only when the
order needs a whole-repo context; see `$codex-huge-context`.
- Copy all model/reasoning/tier flags into wrappers; override only on user request. Verify launch
arguments (`fast` default; requested `ultrafast` is valid).
### Security audits and cyber-classifier refusals → Daybreak Red (Peter, 2026-10-15/18)
Security audit lanes (threat models, injection/secret-exposure audits, permission inventories,
security review of hardening diffs) launch on **Daybreak Red** from the start (Peter 2026-10-18:
"use daylight red model for security audits"). Implementation workers stay on Sol.
Worker stops with `This content was flagged for possible cybersecurity risk` → relaunch or resume
the same order on **Daybreak Red** (Peter: "use daybreak red if you hit a blocker with regular
models"). Don't rephrase to dodge the classifier or hop between regular models.
- Direct API only: the ChatGPT-account route returns 400 `not supported when using Codex with a
ChatGPT account`. Add `-c 'model_provider="openai_api_direct"'` (API key via the provider's
auth command in `~/.codex/config.toml`).
- Slug: the `model_catalog_json` entry whose `display_name` is `Daybreak Red`. Keep it out of
public artifacts (commits, PRs, issues, logs) per public model naming.
- No Fast/Ultrafast tier: drop `--enable fast_mode` / `service_tier`; keep `model_reasoning_effort="high"`.
- Verified 2026-10-15 with a one-line `codex exec` probe on the direct provider.
### Capacity fallback (Peter, 2026-10-12)
Org caps `gpt-6.1-sol` at 40M tokens/min. Worker or resume fails with `Rate limit reached for
gpt-6.1-sol ... tokens per min (TPM)`, `Selected model is at capacity`, or `overloaded` → resume
that same session on **GPT-6 Astra, high, Fast** immediately (Peter, 2026-10-12: "use
astra if sol has rate limits"); no waiting loop:
```bash
codex exec resume "$SID" --dangerously-bypass-approvals-and-sandbox \
-m gpt-6-astra -c 'model_reasoning_effort="high"' \
--enable fast_mode -c 'service_tier="fast"' -o "$OUT" -
```
- Resume onto Astra keeps the thread (verified 2026-10-12: Sol-created session resumed on Astra and replied).
Fresh orders at capacity: same flags with `codex exec --yolo -C "$WT"`; a fresh launch that dies
on capacity already has a session id in stderr (`session id: …`) — resume that, don't relaunch.
- Back off only when Sol and Astra are both limited; then alternate with growing sleeps.
- Wrapper retry triggers must match all three strings (`rate limit|at capacity|overloaded`);
matching only "rate limit" made capacity failures exit instead of falling back.
- Autoreview at capacity: `--model gpt-6-astra --thinking high --codex-speed fast`. If autoreview
refuses because its provider/route doesn't match operator config, don't change config — review
with a fresh-context subagent (diff + brief) and say so in the PR.
- New workers still start on Sol 6.1 Fast; fall back per worker, only on the capacity error.
- Restarts and recoveries: this skill's `scripts/codex-resume` does the
fallback, busy check, safe stop, and classified exits ([resume and watchdog](references/resume-and-watchdog.md)).
### Wrapper and process hygiene (2026-10-12/13)
- Never edit a running wrapper script in place: bash reads scripts incrementally, so live runs
execute the new bytes at their old offset. Write `x.new`, `bash -n`, `chmod +x`, then `mv`
(rename keeps the old inode for running copies; forgetting `chmod` gives exit 126).
- Never run `codex exec` under `set -e` in a wrapper: a rate-limit death exits non-zero and ends
the script before its fallback runs (2026-10-13, a 27-worker fleet). Capture the code
(`… && rc=0 || rc=$?`) and classify it, or hand the session to `codex-resume`.
- Killing a wrapper orphans its `codex exec` children; the next resume then fails with
`thread … already has an active writer`. Stop and resume with `codex-resume --stop "$SID"`:
it finds the worker through its open rollout file (fresh launches don't carry `$SID` in argv,
so `pgrep -f` misses them) and refuses while `scripts/pr` or git runs beneath it. A leftover
`~/.codex/thread-writer-locks/$SID.lock` file without a live holder is harmless.
- To redirect a running worker (new design/priority), `codex-resume --stop -p "$ORDER_FILE" "$SID"` (or `--message "…"`);
its worktree changes and context survive.
- To retire a worker for good, do not use `codex-resume`: `--stop` always resumes afterward
(2026-10-18, a cancelled worker restarted in its deleted worktree). Kill the native codex
binary (`pgrep -P <node-shim-pid>`), then the node shim and its wrapper.
## Hard gate
**Autoreview exception:** always prefer Codex-backed `$autoreview`, independent
of `ANTHROPIC_BASE_URL`, router state, or harness. Reviewing a frozen bundle is
not hands-on self-delegation. Do not switch review engines merely because the
parent session is router-backed. This exception takes precedence over the gate
below.
Use the autoreview helper with `--engine codex` (defaults: 6.1 Sol, medium, Ultrafast) unless the user requests an override. It tries the ChatGPT subscription first and, on an auth failure, retries once on the configured direct-API provider; pass `--codex-config 'model_provider="openai_api_direct"'` only to skip the subscription attempt. Preserve the helper's reviewer isolation.
For direct hands-on delegation, use this skill only when the session is running
on a native Claude model and can run shell commands: Claude Code, or an OpenClaw
agent (for example on the Team Gateway) whose session model is Claude.
**Model check (primary).** The point of the gate is model economics: Claude
tokens are metered and expensive, so hands-on work moves to Codex; but if the
session is already routed to a cheaper/other model, delegation gains nothing.
Decide by the model the session actually runs on, not by the transport:
1. Read the model id: Claude Code shows it in the system prompt's environment
section ("You are powered by the model …"); OpenClaw shows it in the
Runtime line and `session_status`. Router-wrapped ids may be opaque
(`claude-ccr-<hex>`); the hex suffix is often ASCII — decode itFrom steipete/agent-scripts, MIT.
More from steipete/agent-scripts
- 0.843score
fleet-maintenance
steipete
Mac fleet inventory and upkeep with full/worker profiles: collect installed apps and packages, compare desired versus observed state, audit local-account…
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.840score
project-structure
steipete
Generate a single-file compressed symbol map of a TypeScript or Swift repository — files, exported symbols, typed signatures, plugin boundaries — sized to fit…
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.839score
openclaw-relay
steipete
OpenClaw session relay: prompts/posts via local/remote acpx over SSH.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.839score
video-transcript-downloader
steipete
yt-dlp downloads: video, audio, subtitles, transcripts, clips, playlists.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.839score
nano-banana-pro
steipete
Nano Banana/Gemini image gen/edit: text/image input, 512-4K workflows.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.838score
codex-huge-context
steipete
Codex 1M context: direct OpenAI Responses API inference, safe Astra/Sol/Terra/Luna input headroom, Keychain delivery, and Mac fleet rollout.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.835score
release-mac-app
steipete
macOS app release: Sparkle, notarization, GitHub Release, Homebrew, closeout.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.835score
npm
steipete
npm registry ops: login, whoami, names, publish; 1Password tmux.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.834score
markdown-converter
steipete
Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.829score
remote-mac
steipete
Remote Macs: MacBooks, Mac Studios, hosted claw Macs, Tailscale, SSH, and OpenClaw.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.797score
maintainer-orchestrator
steipete
Coordinate multiple maintainer issues, PRs, or repositories with bounded workers, serialized public actions, and clear owner decisions.
SkillBFreshness: B★ 7.4KClaude Code +9 - 0.794score
xcode-sync
steipete
Xcode fleet sync: signed archives, compatibility, install, selection, first launch.
SkillBFreshness: B★ 7.4KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 7,401
- Forks
- 646
- Open issues
- 0
- Last commit (this folder)
- Oct 18, 2026 (12 days ago)
- Last release
- Jul 17, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/steipete/agent-scripts
- Website
- steipete.me
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from steipete
- 0.843score
fleet-maintenance
steipete
Mac fleet inventory and upkeep with full/worker profiles: collect installed apps and packages, compare desired versus observed state, audit local-account…
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.840score
project-structure
steipete
Generate a single-file compressed symbol map of a TypeScript or Swift repository — files, exported symbols, typed signatures, plugin boundaries — sized to fit…
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.839score
openclaw-relay
steipete
OpenClaw session relay: prompts/posts via local/remote acpx over SSH.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.839score
video-transcript-downloader
steipete
yt-dlp downloads: video, audio, subtitles, transcripts, clips, playlists.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.839score
nano-banana-pro
steipete
Nano Banana/Gemini image gen/edit: text/image input, 512-4K workflows.
SkillAFreshness: A★ 7.4KClaude Code +9 - 0.838score
codex-huge-context
steipete
Codex 1M context: direct OpenAI Responses API inference, safe Astra/Sol/Terra/Luna input headroom, Keychain delivery, and Mac fleet rollout.
SkillAFreshness: A★ 7.4KClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get codex-first running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
codex-first skill. Agent Mart. https://agentmart.dev/skills/steipete-codex-first (last updated 2026-10-24)