Codex Autoresearch logo

Codex Autoresearch

Free

Codex Autoresearch Skill — A self-directed iterative system for Codex that continuously cycles through: modify, verify, retain or discard, and repeat indefinitely. Inspired by Karpathy’s autoresearch concept.

FreeFree tier
Type
Open Source

About Codex Autoresearch

Codex Autoresearch is a self-directed iterative system for Codex (OpenAI's code generation model) that automates experimentation to achieve measurable goals. It continuously cycles through: modify, verify, retain or discard, and repeat indefinitely until a target metric is reached. The skill works with any outcome a command can measure, such as test failures, code coverage, type errors, warnings, latency, binary size, and security findings. Users specify a numeric target and a metric command. Codex inspects the repository, confirms the experiment, makes one focused change, verifies the impact, and either keeps the improvement or reverts failures. The process runs in foreground (current Codex task) or background (detached controller). Artifacts are stored in an 'autoresearch-results' directory with immutable configuration, append-only event log, and full logs. Inspired by Karpathy's autoresearch concept, this open-source tool (MIT license) integrates directly with Codex without requiring configuration changes or special prompt syntax.

Key Features

Self-directed iterative experimentation loop: modify, verify, retain or discard, repeat until target reached
Works with any measurable metric command (test failures, coverage, type errors, warnings, latency, binary size, security findings)
Foreground and background run modes for live steering or unattended operation
Automatic Git commit management: keeps improvements, reverts failures
Immutable configuration and append-only event log for full audit trail
No Codex configuration changes or special prompt syntax required
Open-source with MIT license

Pros & Cons

Pros
  • Fully automated iterative improvement driven by user-defined metrics
  • Integrates seamlessly with Codex without extra configuration
  • Transparent audit trail with event logs and run artifacts
  • Supports foreground interactive mode and background batch runs
  • Open-source and free to use (MIT license)
  • Works with any measurable outcome that a command can produce
Cons
  • Requires a clean Git repository and a named branch for each run
  • Limited to a single repository per experiment
  • Depends on Codex (OpenAI's model) and the skill installer
  • May not handle complex multi-variable changes (only one change per iteration)
  • No built-in UI; results viewed via file artifacts

Best For

Reducing test failure count to zero in a codebaseImproving code coverage percentageFixing all type errors or warnings in a projectOptimizing binary size or latency to meet a targetAutomating reproducible security findings remediation

FAQ

What is Codex Autoresearch?
It is a self-directed iterative system for Codex that automates experimentation to achieve measurable goals by cycling through modify, verify, retain or discard, and repeat until a target is reached.
How does the loop work?
Codex inspects evidence, makes one focused change, commits and measures the result. If improved and guard passes, the change is kept; otherwise it is reverted. An audit event is appended and the loop repeats until the target is met.
What metrics can it optimize?
Any outcome a command can measure, including test failures, code coverage, type errors, warnings, latency, binary size, and reproducible security findings.
Does it require special Codex setup?
No. After installing the skill, you can invoke it with a simple command. No Codex configuration changes or special prompt syntax are needed.
Can I run it in the background?
Yes. The skill supports a background mode with a detached controller, suitable for long or overnight runs. You can check status, stop, or resume via $codex-autoresearch commands.
Where are results stored?
Run artifacts are stored in an 'autoresearch-results' directory, including run.json (configuration), events.jsonl (history), logs, and an optional report.html.