codex-loop
Skill1 starsChanged 5 months agoMITView on GitHub
Run a codex review on my latest edits. Use when the user says things like "review my changes with codex", "run codex on my edits", "start an edit-review loop", "check my code with codex", or "do a codex review". After each round of file edits, calls the codex_review_start MCP tool with the connected folder's HOST path, polls codex_review_status until the result is ready, summarizes the findings, and iterates until the review is clean.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Bostonvex/Claude-Codex-Orchestratortheir own version, first seen Jul 13, 2026
- justinchoo93/skillstheir own version, first seen Mar 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Bostonvex/Claude-Codex-Orchestrator★ 1same name
- justinchoo93/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
After you (or the user) have edited files in the connected project folder, this skill:
- Distinctive: line 51
Ask the user for the absolute host path if it is not already known:
- Distinctive: line 67
If the output is empty there is nothing to review yet.
- Very specific: line 133
After applying all fixes, call codex_review_start again with the same parameters (a fresh review needs a fresh job), and poll as in Step 4.
- Distinctive: line 137
If new issues appear in the re-review, repeat from Step 5.
- Very specific: line 143
If the tool returns an error like "got a sandbox path", you passed a /sessions/...
- Very specific: line 144
If the output is marked [output truncated], the diff is very large.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
codex-loop skill
What this skill does
After you (or the user) have edited files in the connected project folder, this skill:
- Calls the
codex_review_startMCP tool with the project's host path — it returns ajob_idimmediately while the review runs in the background on the host. - Polls
codex_review_statuswith thatjob_iduntil the review completes. - Summarizes the issues and suggests fixes.
- Applies fixes using Read/Write/Edit tools.
- Starts a new review to verify the fixes.
- Repeats until the review reports no issues.
Reviews run as background jobs because they often take several minutes — longer than the MCP client's ~180s per-tool-call limit. Each start/status call itself returns quickly, so the loop never hits that limit.
Critical: always use the HOST path
The folder parameter to codex_review_start must be the host machine path — the path you would use in a terminal on the user's Mac or Linux machine.
Correct:
codex_review_start(
folder = "/Users/yourname/code/myproject"
)WRONG — never pass a sandbox path:
codex_review_start(
folder = "/sessions/abc123/mnt/myproject" <- REJECTED
)Determine the folder's HOST path from the user (e.g. the path they shared when connecting the folder, such as /Users/yourname/code/myproject). Never derive it from the sandbox mount path. If you are unsure, ask the user: "What is the absolute path to this project on your machine?"
Step-by-step instructions
Step 1 — Identify the host path
Ask the user for the absolute host path if it is not already known:
"What is the absolute path to the project on your host machine? (e.g. /Users/yourname/code/myproject)"
Step 2 — Confirm there are uncommitted changes
You can optionally run:
run_command(
command = "git",
args = ["status", "--short"],
folder = "/Users/yourname/code/myproject"
)If the output is empty there is nothing to review yet. Tell the user and wait for more edits.
Step 3 — Start the review
codex_review_start(
folder = "/Users/yourname/code/myproject"
)scope defaults to uncommitted (staged + unstaged + untracked) — do not pass it unless you need a different scope:
For a branch diff against a base ref (e.g. main):
codex_review_start(
folder = "/Users/yourname/code/myproject",
scope = "base",
base = "main"
)For a specific commit:
codex_review_start(
folder = "/Users/yourname/code/myproject",
scope = "commit",
commit = "<SHA>"
)The result contains a job_id — note it for the next step.
prompt: focused reviews only — do NOT pass it by default
Only pass prompt when the user explicitly asks to narrow or focus the review (e.g. "focus on security", "only review the concurrency changes"). For a normal review, omit it entirely. Do not restate the scope in the prompt (e.g. never prompt = "review my uncommitted changes") — the scope parameter already covers that.
codex_review_start(
folder = "/Users/yourname/code/myproject",
prompt = "focus on error handling and resource cleanup"
)It is safe to combine prompt with any scope: the codex CLI forbids scope flags alongside a prompt, so the server folds the scope into the prompt text for you.
Step 4 — Poll for the result
codex_review_status(
job_id = "<job_id from step 3>"
)Each call blocks up to ~50s waiting for completion, then returns either the finished review or status: running. If it is still running, call codex_review_status again with the same job_id — keep polling until it completes. Reviews typically take 1–10 minutes; do not give up or restart the review just because a few polls returned running.
Step 5 — Summarize and fix
The verdict is the text under --- Codex review --- in the completed status result. Make the next-step decision by reading that text — not by the exit code. codex review always exits 0, even when it lists problems.
- If the verdict lists concrete issues or risks → summarize them as a numbered list, apply fixes using the Edit tool (or Read then Write for larger changes), then re-review (Step 6).
- If the verdict says it found no issues, looks clean, or approves the changes → STOP. Report to the user that the review is clean. Do not loop again.
Note on the tool result: the result contains only codex's verdict, not its progress/exec trace. The full live trace is in the desktop log
~/Library/Logs/Claude/mcp-server-hostrunner.log(whenstream_outputis enabled, which is the default). If the result header shows a non-zerocodex exit N(e.g.Mode: uncommitted (codex exit 1)), codex itself failed — a--- codex stderr ---section will be included. Treat that as a tool error to report to the user, not as review findings. A[codex was killed after the server-side timeout ...]marker means the review hit the server'stimeoutconfig; suggest the user raise it (and restart Claude Desktop afterwards).
Step 6 — Re-review
After applying all fixes, call codex_review_start again with the same parameters (a fresh review needs a fresh job), and poll as in Step 4. If the review returns no issues or only informational notes, the loop is complete. Tell the user the review is clean.
Step 7 — Repeat if needed
If new issues appear in the re-review, repeat from Step 5.
Tips
- The default scope
uncommittedcovers staged, unstaged, and untracked changes —codex reviewcomputes the diff itself. - One review = one
codex_review_start+ repeatedcodex_review_statuspolls. Never callcodex_review_startagain while a job for the same folder is still running. - If the tool returns an error like
"got a sandbox path", you passed a/sessions/...path. Stop and ask the user for the correct host path. - If the output is marked
[output truncated], the diff is very large. Consider asking the user to scope the review to fewer files or review a specific commit instead. - Finished job results stay retrievable via
codex_review_statusfor ~30 minutes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

