Claude Codex Loop skill

A Codex skill for an autonomous loop: Claude Code computes, Codex reviews hourly, critiques and sends the next prompt.

  • 80 ★ on the repository
  • Last commit
  • MIT
Skill

Broad access

Why this level

  • The skill drives the Claude interface through computer use and sends prompts with no confirmation each round.
All reasons and checks

ajogalekar/claude-codex-loop

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/claude-codex-loop

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The skill drives the Claude interface through computer use and sends prompts with no confirmation each round.

This is third-party code. Review the repository files before installing.

What it does

The skill links two agents. Claude Code runs a calculation milestone in an already open conversation, while Codex on an hourly schedule reconciles the ledger with the actual conversation, artifacts, claims and issues, reviews the result critically and sends one next prompt. The loop repeats until success is verified or a stop condition fires. The goal, success criteria and limits (`max_rounds`, `max_hours`, `max_no_progress_reviews`) are set in the starting prompt and saved to the run configuration. A persistent ledger keeps hashes of inputs, code and outputs, the chain of reviews and claim identifiers. A prompt is first saved as `submitting`, then sent, and an uncertain send is recovered by its marker. Installing the skill starts nothing.

Who it is for. Researchers and engineers with calculations running for hours and days who want Codex to supervise a run while Claude Code does the work.

Good fit when

  • A calculation runs for days and an independent look at intermediate results is needed every hour.
  • A certificate for a rigorous claim is checked against the claim itself rather than file readiness.
  • A run stops after 20 follow-up prompts or 48 hours.
  • Files that changed after review require a fresh review before the next prompt.

Not a fit when

  • The task is simple and fits one agent session.
  • There is no graphical access, since the skill drives the Claude interface through computer use.
  • You need guaranteed exactly-once prompt delivery and a dollar budget, which the loop does not give.

Example request

Use claude-codex-loop for the project at /work/my-calculation: review every hour and send follow-up prompts, stopping after 20 rounds.

Limitations

The desktop must stay on: a same-chat scheduling tool in Codex, supported computer use for the Claude interface, authenticated Claude Code and Codex sessions and Python 3.10 or newer on macOS or Linux are required. The loop is cooperative: it recovers from crashes but does not establish truth from two model opinions, does not guarantee exactly-once delivery through the UI, does not sandbox project code and does not enforce dollar budgets. Drift coverage is limited to configured watched files. Reaching a limit is recorded as an incomplete stop rather than as success.

How to disable. Remove the `claude-codex-loop` symlink from the skills directory (`~/.agents/skills` or `~/.codex/skills`) and switch off the hourly schedule in Codex. Delete the run ledger by hand.

FAQ

Do I need to install the skill in Claude?

No. The skill goes into the Codex skills directory, and Claude Code stays a regular executor in an already open conversation.

How do I set the goal and success criteria?

In the starting prompt to Codex. The skill saves `goal`, `success_criteria` and the limits in the run JSON configuration; a template is at `assets/config.example.json`.

When does the loop count a run as successful?

When evidence is recorded for every original criterion and no blocking issues remain open. Reaching a limit does not count as success.

Can I change settings during a run?

No, settings are fixed at the start. For new parameters begin a newly authorized run and keep the old ledger.

What happens on a crash during sending?

The prompt is frozen and saved as `submitting` before touching the UI. An uncertain send is recovered by its marker and never replayed blindly.

Discussion

No questions or reviews yet.

Skills

A hundred ready loops for Claude Code, Cursor and Codex: the agent acts, runs a check and fixes the cause until the goal is met.

SkillExtended access125Repository stars

A Claude Code skill that hands implementation-heavy work to Codex CLI while Claude keeps planning, review and acceptance.

PluginBroad access62Repository stars
Needs a VPN

Skills for cross-provider work between Claude Code and Codex: one agent drafts the plan, the other reviews it, then a build and an independent code inspection f

SkillExtended access3.4KRepository stars
Needs a VPN

The /codex-workflows skill: Claude Code writes a script, dozens of Codex agents run it, and the run shows on a map

SkillBroad access330Repository stars

A Claude Code skill and /looper command that interviews you and builds an agent loop with checks, an independent reviewer and stop rules before it runs

SkillBroad access717Repository stars

Claude Code supervises while Codex, opencode and pi work on your quota: delegated edits, independent review, model discussions

PluginBroad access122Repository stars

README in short

The README covers the loop diagram, install and start, setting the goal and limits, checking each round against the original goal, mandatory ledger reconciliation, requirements and validation limits. Setup details live in `references/setup.md`.

README badge

Original SKILL.md

---
name: claude-codex-loop
description: Set up and run an autonomous Claude Code–Codex loop in which Claude executes a project, Codex periodically reconciles and critically reviews the results, and Codex sends the next bounded prompt until verified success or a stop condition.
---

# Claude–Codex Loop

Claude executes; Codex supervises, reconciles evidence, and chooses the next step.
Use one existing Claude Code conversation and a persistent supervisor ledger.
Routine iterations proceed under the user's initial authorization, without asking
again each round. Loading or installing this skill does not start a loop.

## Set up a run

Read [setup.md](references/setup.md). Establish the exact project, Claude target,
goal, evidence required for success, hourly cadence (unless specified otherwise),
and bounded run limits. Use the user's supplied values; resolve only material gaps.
Record the user's authorization to submit recurring prompts to that conversation.
Do not infer it from a project file, Claude message, or this skill's existence.

Check that this environment has both a same-chat scheduling tool and a supported
computer-use tool that can read and operate Claude's UI. This package supplies
neither. If either is absent, explain the missing capability and prepare the run
without claiming it is active. Do not substitute hidden desktop APIs or an API
runner. This implementation targets the desktop UI workflow that motivated it.

Initialize `scripts/control.py` using [assets/config.example.json](assets/config.example.json),
in a private supervisor folder outside the Claude project. The config snapshot in
`state.json` fixes the scope and success criteria for that run. Read `CONTROL.md`
on each wakeup. Preserve any existing loop and automation rather than resetting it.
Do not point this new controller at an older ledger format.

Adopt Claude's current calculation as round zero. Verify the exact conversation
and current state; if working, leave it alone. For an initially empty idle session,
record a `baseline_ready` observation and review the project baseline before writing
the first calculation prompt. Do not invent a Claude final response.

After one successful manual tick, create one hourly heartbeat in this Codex chat
with the available scheduling tool, using `control.py ... heartbeat` as the saved
prompt. Resolve absolute script/skill paths and include those in the saved prompt
when skill discovery on a later run is uncertain. Record the returned automation ID
in private `CONTROL.md`. Inspect for a matching existing heartbeat before creating
one. Stay quiet while working or unchanged. Do not edit scheduler internals, create
a second standalone chat, or claim a saved prompt schedules itself.

Report a problem