recursive-mode: Instructions file for Codex

AGENTS.md

recursive-mode AGENTS.md is an instructions file for Codex, OpenCode from try-works/recursive-mode. It costs 1,719 tokens per session, scanned A, original, Apache-2.0.

A short bridge from a repository's agent instructions to recursive-mode, a system for running and tracking planned work across multiple steps.

In plain words
What is it for?
It guides starting or continuing recursive runs, bootstrapping the required files, and locating workflow records and durable notes.
Why use it?
It prevents conflicting instructions by identifying one main workflow document and explaining where runs and saved progress live.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions AGENTS.md; mentions Codex.

This is try-works/recursive-mode's own configuration. It tells Codex and OpenCode how to work on recursive-mode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything recursive-mode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to try-works/recursive-mode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/try-works/recursive-mode/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/try-works/recursive-mode

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 recursive-mode AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/try-works/recursive-mode/agents-md/github.svg)](https://agentmods.dev/instructions/try-works/recursive-mode/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/try-works/recursive-mode/agents-md"><img src="https://agentmods.dev/badge/instructions/try-works/recursive-mode/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for recursive-mode AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/try-works/recursive-mode/agents-md"><img src="https://agentmods.dev/badge/instructions/try-works/recursive-mode/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,719 This file is loaded in full into every session.
When invoked 1,719 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01719 $0.01719
Opus 5.5 $0.00688 $0.00688
Sonnet 5.5 $0.00344 $0.00344
Haiku 4.5 $0.00172 $0.00172

Measured 1mo ago against content hash 21901a6b8d10, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

recursive-mode 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 1mo 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.

AGENTS.md · 102 lines

How it starts

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

AGENTS.md

recursive-mode bridge

This repository uses recursive-mode.

The single canonical workflow spec lives in /.recursive/RECURSIVE.md. Read that file before starting or resuming any recursive-mode work.

For Codex, the primary AGENTS bridge target is /.codex/AGENTS.md. If the repo also carries other AGENTS.md files, they may mirror this same bridge block.

Bridge guidance only:

  • Treat this file as a harness adapter, not as a second workflow spec.
  • If this file conflicts with /.recursive/RECURSIVE.md, follow /.recursive/RECURSIVE.md.
  • Control-plane docs live under /.recursive/.
  • Runs live under /.recursive/run/<run-id>/.
  • Durable memory lives under /.recursive/memory/.
  • If recursive-mode is invoked in a repo that does not yet contain the /.recursive/ scaffold, bootstrap it automatically with the supported install script before continuing. Do not require the user to run a separate manual bootstrap step unless no supported runtime is available.

How users can invoke the skill:

  • Treat short prompts such as Implement the run, Implement run 75, Implement the plan, Create a new run based on the plan, and Start a recursive run as valid recursive-mode entry commands.
  • If a run id is given, use that run.
  • If no run id is given and exactly one active/incomplete run exists, resume that run.
  • If the user asks to implement/start based on a plan, create a new run only when a unique source plan or requirements artifact can be identified from repo docs or immediate task context.
  • If the command is ambiguous, ask for the run id or the repo path of the source plan/requirements artifact.
  • Prompts are still commands, not specifications: read the repo docs that define the run before proceeding.

Required recursive-mode audit behavior:

  • Audited phases must follow draft -> audit -> repair -> re-audit -> pass -> lock.
  • When subagents are unavailable, perform the same audit as self-audit; do not weaken or skip it.
  • Delegate audits only when you can provide the full context bundle:
    • phase name and artifact path
    • upstream artifact paths reread for the audit
    • diff basis from 00-worktree.md
    • changed file list and targeted code references
    • phase-specific audit questions/checklist
  • If the context bundle is incomplete, do not delegate; perform the audit yourself and record Audit Execution Mode: self-audit.
  • If subagents are available and the context bundle is complete, delegated audit/review is the default path.
  • If subagents are available but the controller still chooses self-audit, record a concrete Delegation Override Reason.
  • Do not set Coverage: PASS or Approval: PASS for an audited phase unless the artifact ends with Audit: PASS.
  • Record Subagent Capability Probe and Delegation Decision Basis in every audited phase.
  • If meaningful subagent work contributes to a phase, require a durable action record under /.recursive/run/<run-id>/subagents/ and verify it against actual files, actual recursive artifacts, and the actual diff before acceptance. For review/audit delegation, prefer a stable reviewed artifact for Current Artifact.
  • Store routed assistant output, raw transcripts, stdout/stderr captures, and invocation metadata under /.recursive/run/<run-id>/evidence/router/; cite them from action records rather than placing raw transcript Markdown directly under subagents/.
  • Store initial routed prompt bundles only under run-scoped paths such as /.recursive/run/<run-id>/router-prompts/; do not bootstrap top-level /.recursive/router-prompts/.
  • Treat success: false or any nonzero routed-assistant exit code as a failed attempt: preserve diagnostics, instruct the bounded routed role to repair owned issues when applicable, rerun the route, then verify the result before acceptance or record an explicit fallback.
  • If delegated work is accepted after main-agent checks reveal issues, record the concrete repair performed after verification; do not accept stale delegated context silently.
  • For Phase 3, declare TDD Mode: strict|pragmatic. Strict mode requires RED and GREEN evidence paths. Pragmatic mode requires an explicit exception rationale plus compensating evidence.
  • For Phase 5, declare QA Execution Mode: human|agent-operated|hybrid. Human and hybrid require user sign-off. Agent-operated and hybrid require execution metadata plus evidence paths.
  • For delegated review, prefer recursive-review-bundle and record Review Bundle Path in Phase 3.5 when review is delegated.
  • Treat addenda as authoritative effective inputs. If relevant addenda exist, list them in Inputs, re-read them, and reconcile them explicitly.
  • Review bundles should include relevant addenda automatically, and the written review should cite upstream artifacts, relevant addenda, prior recursive evidence, and changed files/code refs from that bundle in the review narrative.
  • Audited phases must include machine-checkable Requirement Completion Status entries for every in-scope R#; Traceability alone is not enough.
  • implemented and verified requirement dispositions must cite concrete Changed Files, and verified also requires distinct verification evidence.
  • 00-worktree.md is the source of truth for diff basis. Record baseline type/reference, comparison reference, normalized baseline/comparison, and normalized diff command; do not silently substitute a different basis later.
  • Diff audit ignores incidental runtime byproducts such as __pycache__/, *.pyc, .pytest_cache/, .mypy_cache/, and .ruff_cache/ unless the repo intentionally tracks them.
  • Treat Phase 6, Phase 7, and Phase 8 receipts as concise delta receipts that point to final control-plane docs instead of duplicating them.
  • Phase 8 should capture run-local skill usage and update skill memory under /.recursive/memory/skills/ when the run teaches the repo something durable about skill availability, skill fit, delegated-review quality, or skill-discovery outcomes.
  • If a run needs missing specialized capability, prefer the find-skills skill when available. Otherwise use the Skills CLI (npx skills find, npx skills add, npx skills check, npx skills update) and record the outcome when skill usage is relevant.
  • When working inside a reusable skill/workflow repo, do not leave committed run residue such as concrete /.recursive/run/<run-id>/ folders, evidence logs, review bundles, action records, or temp-path references unless they are intentional fixtures or examples.

Read the full file on GitHub · 102 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. 1mo ago First seen · 102 lines · 1,719 tokens per session scan A 21901a6b8d10

Subscribe to this mod's changes

recursive-mode AGENTS.md is an instructions file published in the GitHub repository try-works/recursive-mode (136 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 1,719 tokens to every session, about $0.0069 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens