By ozeron
Autonomous experiment loop: try ideas, keep what works, discard what doesn't, never stop.
Set up and run an autonomous experiment loop for any optimization target. Gathers what to optimize, then starts the loop immediately. Use when asked to "run autoresearch", "optimize X in a loop", "set up autoresearch for X", or "start experiments".
Pause the autoresearch loop so you can do normal dev work. Creates .autoresearch-paused in the project directory — all hooks become no-ops until autoresearch-create is run again.
Remove repo-local autoresearch Codex hooks from the current checkout so the loop no longer auto-resumes or blocks stop in this repo.
Autonomous experiment loop plugin for Claude Code and Codex. Forked and ported from davebcn87/pi-autoresearch — the original plugin for Pi.
Try ideas, measure results, keep improvements, discard failures, repeat forever.
claude plugin install /path/to/claude-autoresearch
Or add to your project's .claude/plugins.json.
This repo also ships a Codex plugin manifest at .codex-plugin/plugin.json, a repo-local marketplace at .agents/plugins/marketplace.json, and repo-local hook maintenance scripts:
./scripts/install-codex-hooks.sh
./scripts/uninstall-codex-hooks.sh
Codex-specific setup details live in docs/README.codex.md and .codex/INSTALL.md.
The same hook management logic is bundled under skills/autoresearch-create/scripts/ so Codex skills can install or remove repo-local hooks after plugin installation.
jq (for hook scripts): brew install jqTell Claude Code to set up autoresearch for any optimization target:
"Run autoresearch to optimize the build time of my project"
The plugin will:
autoresearch.md (session manifest) and autoresearch.sh (benchmark script)The plugin blocks Claude from stopping while experiments are active. To stop:
autoresearch.md — the loop will end on the next cycle.autoresearch-active — allows the current stop to proceed| Tool | Description |
|---|---|
init_experiment | Configure session: name, metric, unit, direction |
run_experiment | Execute benchmark command with timeout, run optional checks |
log_experiment | Record result — keep auto-commits, discard/crash suggests revert |
show_dashboard | Display full experiment history table |
stop-guard.sh) — blocks stopping when experiments are activesession-start.sh) — injects session summary on resumeIn Codex, those hooks are installed repo-local into .codex/hooks.json. The Claude-only PostToolUse MCP matcher is not installed for Codex because current Codex PostToolUse is Bash-only.
| File | Purpose |
|---|---|
autoresearch.md | Session manifest — goal, metrics, scope, constraints, history |
autoresearch.sh | Benchmark script — runs the workload, outputs metrics |
autoresearch.checks.sh | Optional correctness checks (tests, types, lint) |
autoresearch.ideas.md | Ideas backlog for promising but untried optimizations |
autoresearch.jsonl | Append-only experiment log |
Results are stored in autoresearch.jsonl (compatible with pi-autoresearch):
{"type":"config","name":"optimize-build","metricName":"duration","metricUnit":"s","bestDirection":"lower"}
{"run":1,"commit":"a3f1c2d","metric":42.3,"metrics":{},"status":"keep","description":"baseline","timestamp":1710331260000,"segment":0}
cd servers/autoresearch
npm install
npm run build # compile TypeScript to dist/
npm run dev # run with tsx (hot reload)
The plugin ships with pre-built dist/ so users don't need a build step.
claude-autoresearch/
├── .codex-plugin/plugin.json Codex plugin manifest
├── .agents/plugins/marketplace.json Repo-local Codex marketplace
├── .codex/hooks.template.json Repo-local Codex hook template
├── .claude-plugin/plugin.json Plugin manifest
├── .mcp.json MCP server config
├── servers/autoresearch/
│ └── src/
│ ├── index.ts MCP server entry point
│ ├── types.ts Type definitions
│ ├── state.ts JSONL parsing, state reconstruction
│ ├── render.ts Text dashboard rendering
│ └── tools/
│ ├── init.ts init_experiment
│ ├── run.ts run_experiment
│ ├── log.ts log_experiment
│ └── dashboard.ts show_dashboard
├── skills/autoresearch-create/
│ └── SKILL.md Agent instructions
├── hooks/hooks.json Hook configuration
└── scripts/
├── stop-guard.sh Stop hook
└── session-start.sh SessionStart hook
MIT
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub ozeron/autoresearchAutonomous experiment loop — iteratively optimize any metric with git-tracked experiments, a Stop-hook loop engine, noise-floor keep/discard, and a locked eval harness
Autonomous experiment loop that optimizes any file by a measurable metric. 5 slash commands, 8 evaluators, configurable loop intervals (10min to monthly).
Autonomous experimentation skill — your AI coding agent designs experiments, tests hypotheses, discards failures, keeps wins. Runs overnight while you sleep.
Autonomous experiment loop for any project type. Inspired by karpathy/autoresearch.
Autonomous experiment loop that edits code, runs benchmarks, measures metrics, and keeps improvements or reverts — repeating forever. Works for any optimization target: LLM training loss, test speed, bundle size, build time, Lighthouse scores, and more.
Memory compression system for Claude Code - persist context across sessions