Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/runnithan/claudex-setup/codex-loopgit clone --depth 1 https://github.com/runnithan/claudex-setupWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00036 | $0.02569 |
| Opus 5 | $0.00018 | $0.01285 |
| Sonnet 5 | $0.00007 | $0.00514 |
| Haiku 4.5 | $0.00004 | $0.00257 |
Grade A, and why
codex-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/codex-loop: review, fix, repeat until clean
Run codex review against a base branch, fix what it finds, and keep looping
until two consecutive rounds return no findings. Run autonomously. Do
not report back between rounds and do not ask permission to continue; the point
is that the owner starts it and walks away.
--base is the COMPARISON point, not the branch under review. Run this from
the feature branch you are working on; --base main then reviews everything
that branch adds on top of main. Do not check out the base branch to run it.
Default base is main.
There is no round cap by default. Run as many rounds as it takes.
--max-rounds N sets an optional ceiling. The stop conditions in §6 are the
real terminators, and they are what keep this from being an infinite loop.
Fixes run on Opus (pinned in this file's frontmatter). Triage is the hard part of this loop, and a cheaper model tends to apply findings literally, which is the exact failure §2 exists to prevent.
Requires the Codex CLI, authenticated, with codex review available
(codex review --help).
0. Before the first round
- Start whatever services the test suite needs (database container, etc.). A suite whose dependency is missing often does not fail cleanly, it hangs, which reads like a slow suite rather than a missing dependency and can burn half an hour before you notice. Start dependencies first, and if a suite runs far longer than its usual time, suspect a missing service before suspecting the tests.
- Confirm the working tree is clean apart from the work you intend to review.
- Create or resume the state file
.planning/codex-loop/STATE.md(or the project's equivalent scratch location). This loop runs long enough to be compacted mid-flight and everything that matters between rounds otherwise lives only in context. If the file exists with an unfinished run, RESUME from it rather than restarting the count.
# codex-loop state
base: main
started: <HEAD sha at round 1>
round: <n>
consecutive_clean: <0..2>
max_rounds: none
## Rounds
- R1: 4 findings -> 4 fixed (sha, sha, ...)
- R2: 3 findings -> 2 fixed, 1 rejected (reason)
- R4: 2 findings, all self-inflicted x2 -> fixed by Codex (escalation) (sha, sha)
## Rejected (do not re-litigate)
- <finding>, <evidence it is not real, or why the suggested fix is wrong>
## Flagged, deliberately not fixed
- <finding>, <why>
## Self-inflicted
- <finding>, caused by <sha> earlier in this loop
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 223 lines · 36 tokens per session scan A d3de77076962
codex-loop is a command published in the GitHub repository runnithan/claudex-setup (1 stars, last pushed 2d ago), licensed MIT. It adds 36 tokens to every session and 2,569 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
template
Manage issue templates for streamlined issue creation.
design-review
Workflow recipe — review a design end-to-end, ending in measured numbers rather than adjectives, by chaining 4 skills.
setup-pm-skills
Onboard a new user — find out what they do, recommend the right bundles & top skills, and set up a project CONTEXT.md so every skill is tailored to them.
security-review
CWE 기반 보안 검토 + STRIDE 위협 모델링 (v6 - effort:max 강제).
auto-browse
Auto-browse — learn, optimize, and graduate browser operations or web data-mining workflows.
release-harn
Run the tag-first Harn release workflow.