Set a Goal, Go to Bed, Let Codex Iterate
This Codex skill turns a plain-English goal into an autonomous overnight loop of modify, verify, keep or revert, and repeat.

What it does
Describe what you want improved—fewer any types, higher coverage, lower latency—and this Codex skill reverse-engineers a metric and verification command from your repo. It then loops: modify one thing, trial-commit, run the verifier, keep the change if the metric improved or revert if it regressed, and log everything. Foreground for watching, background for sleeping.
The interesting bit The loop has an escalation policy that feels almost bureaucratic in a good way: three failures trigger a refinement, five trigger a pivot to a new strategy, two pivots trigger web search, and three pivots trigger a full stop with a request for human input. One success resets the counters, so it behaves less like a stuck script and more like a cautious lab assistant.
Key highlights
- Infers goal, scope, metric, and verification tooling from a single sentence; no configuration files to write.
- Records every iteration in a TSV log with commit hash, metric delta, and keep/discard status, preserving an audit trail even for reverted experiments.
- Supports resuming interrupted runs from a state snapshot and can run up to three parallel hypotheses via git worktrees.
- Includes a non-interactive
execmode with JSON output for CI pipelines. - Cross-run learning biases future hypothesis generation based on past failures and successes.
Caveats
- The README flags that smoothest operation requires starting Codex with full sandbox bypass.
- Works best with clear, measurable goals; open-ended exploration requires switching to
planmode first.
Verdict Handy if you already live in Codex CLI and want to delegate measurable drudge work—type cleanup, coverage gaps, failing tests—to an overnight agent. If you don’t use Codex or dislike automated git churn, this isn’t for you.
Frequently asked
- What is leo-lilinxiao/codex-autoresearch?
- This Codex skill turns a plain-English goal into an autonomous overnight loop of modify, verify, keep or revert, and repeat.
- Is codex-autoresearch open source?
- Yes — leo-lilinxiao/codex-autoresearch is open source, released under the MIT license.
- What language is codex-autoresearch written in?
- leo-lilinxiao/codex-autoresearch is primarily written in Python.
- How popular is codex-autoresearch?
- leo-lilinxiao/codex-autoresearch has 2.5k stars on GitHub and is currently accelerating.
- Where can I find codex-autoresearch?
- leo-lilinxiao/codex-autoresearch is on GitHub at https://github.com/leo-lilinxiao/codex-autoresearch.