autoresearch AGENTS.md

autoresearch AGENTS.md is an instructions file for Codex, OpenCode from smallnest/autoresearch. It costs 1,710 tokens per session, scanned A, original, MIT.

Project instructions for autoresearch, a Bash-based tool that implements GitHub Issues through repeated agent review and creates pull requests. AGENTS.md is a file containing guidance for coding agents working in a repository.

In plain words
What is it for?
Use it when running autoresearch on a GitHub Issue, selecting a project path or iteration limit, continuing an interrupted run, or checking its shell tests.
Why use it?
It gives agents the commands, project structure, workflow archiving rules, and available regression tests they need to work consistently. It also explains how to resume or customize a run.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/smallnest/autoresearch/agents-md
Clone the repo
git clone --depth 1 https://github.com/smallnest/autoresearch

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for autoresearch AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/smallnest/autoresearch/agents-md.svg)](https://agentmods.dev/instructions/smallnest/autoresearch/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/smallnest/autoresearch/agents-md"><img src="https://agentmods.dev/badge/instructions/smallnest/autoresearch/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,710 This file is loaded in full into every session.
When invoked 1,710 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01710 $0.01710
Opus 5 $0.00855 $0.00855
Sonnet 5 $0.00342 $0.00342
Haiku 4.5 $0.00171 $0.00171

Measured 4d ago against content hash f196d827eaed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

autoresearch AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.

Project Overview

autoresearch is a fully automated software development tool: given a GitHub Issue number, it implements the feature through multi-agent iterative review, then auto-creates a PR, merges it, and closes the Issue. The entire runtime is a single Bash script (run.sh).

Running

# Process Issue #N in the current directory's project
./run.sh 42

# With project path, max iterations, or continue mode
./run.sh -p /path/to/project 42 16
./run.sh -c 42 10              # Continue from last interrupted iteration

# Skip archiving of previous workflows (useful for debugging)
./run.sh --no-archive 42

There are no build/test/lint commands for autoresearch itself. Shell-based regression tests live under tests/, including:

  • tests/test_extract_score.sh
  • tests/test_agent_logic.sh
  • tests/test_archive.sh
  • tests/test_context_overflow.sh
  • tests/test_cleanup.sh

Architecture

Archiving Mechanism

Before a new run starts (and not in continue mode), run.sh automatically archives old workflow data:

  • Scans .autoresearch/workflows/ for issue-* directories.
  • Moves non-current issue directories to .autoresearch/archive/YYYY-MM-DD-issue-N/.
  • If the target archive directory already exists, it appends a numeric suffix (e.g., -1, -2).

Iteration Loop

Planning Phase: First agent reads Issue → outputs tasks.json with subtask breakdown
Iteration 1: Agent implements current subtask → tests run
Iteration 2+: Agent round-robin review + fix per subtask
    → Score >= 85? → mark subtask passed → advance to next subtask
    → Score < 85?  → agent fixes based on review feedback → next iteration
    → All subtasks passed? → auto commit/PR/merge/close Issue

If planning fails (no tasks.json generated), falls back to original mode: implement entire Issue in one go.

Agent rotation (from iteration 2): (iter - 1) % N where N = number of agents.

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 148 lines · 1,710 tokens per session scan A f196d827eaed

Subscribe to this mod's changes

autoresearch AGENTS.md is an instructions file published in the GitHub repository smallnest/autoresearch (570 stars, last pushed 1mo ago), licensed MIT. It adds 1,710 tokens to every session, about $0.0086 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.