codex-loop-orchestra AGENTS.md

Instructions for coordinating coding-agent tasks through a disciplined loop of planning, dispatching, and adjudication.

In plain words
What is it for?
Use them to create task packets and a dependency graph, enforce non-overlapping work areas, coordinate subagents, and process dead letters, escalations, or final wave results.
Why use it?
They define how to split work into independent packets, avoid unnecessary polling, and handle conflicts or failed tasks consistently.

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/leo001020/codex-loop-orchestra/agents-md
Clone the repo
git clone --depth 1 https://github.com/LEO001020/codex-loop-orchestra

Made for: Codex, OpenCode.

Per session 2,161 This file is loaded in full into every session.
When invoked 2,161 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.02161 $0.02161
Opus 5 $0.01081 $0.01081
Sonnet 5 $0.00432 $0.00432
Haiku 4.5 $0.00216 $0.00216

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

Security

Grade A, and why

codex-loop-orchestra 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 2d 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 · 156 lines

How it starts

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

LOOP Discipline

1. Decomposition discipline (single-pass Plan-and-Solve)

  • Planning is a SINGLE PASS: read the task, then emit the complete decomposition in one planning event — packets/*.json (exactly 4 fields: goal, authorized_paths, acceptance, constraints, plus packet_id) and dag.json.
  • No incremental re-planning mid-wave. Plans change only at an adjudication event (dead-letter, merge conflict, L3 escalation, wave finale).
  • Each packet must be self-contained: an Executor with only the 4 fields and its worktree can finish it. If a packet needs "context from the main thread", the decomposition is wrong — split or rewrite it.
  • Intra-wave packets must have non-intersecting authorized_paths; the DAG assertion enforces this before any dispatch.
  • No 5th required packet field. No idempotency_key, no embedded runtime_resources.

2. Anti-polling negative discipline (what Sol rounds are NOT for)

Sol is invoked on exactly two event types: planning and adjudication. Sol rounds are NEVER used for:

  • Waiting — native wait-all blocks without producing rounds.
  • Polling — status lives in data/events.ndjson; scripts consume it.
  • Tallying — report counting is the missing-item check script's job.
  • Retry decisionsconfig/retry_classes.yaml + retry script decide.
  • State recap — the state machine holds state; never ask Sol "where were we".

Any transition decidable by if/else, exit code, or a state machine does not go through an LLM. Sol's ideal round count per task approaches 2 + anomaly count (one planning round, one finale round, plus one per genuine anomaly). If a run uses more, find which of the five forbidden uses leaked back in.

Read the full file on GitHub · 156 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. 2d ago First seen · 156 lines · 2,161 tokens per session scan A 1eb5d4f5c6ce

Subscribe to this mod's changes

codex-loop-orchestra AGENTS.md is an instructions file published in the GitHub repository LEO001020/codex-loop-orchestra (6 stars, last pushed 9d ago), licensed MIT. It adds 2,161 tokens to every session, about $0.0108 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-31.

Related

Other instructions, from other repositories

dashi-taskboard AGENTS.md

AGENTS.md instructions for chuspeeism/dashi-taskboard, covering project development rules, taskboard delivery workflow, 1. read and claim work, 2. route for efficiency and work-in-progress limits and execution lanes.

chuspeeism/dashi-taskboard · 4,315 tokens

codex-provider-sync AGENTS.md

Instructions for Dailin521/codex-provider-sync, covering ai / agent operator guide, vnext architecture baseline, goal, choose the interface and safe operating flow.

Dailin521/codex-provider-sync · 1,480 tokens

ai-code-interface.el AGENTS.md

Instructions for tninja/ai-code-interface.el, covering agents.md, common development commands, byte compilation, running tests and run a specific test file.

tninja/ai-code-interface.el · 2,539 tokens

ai-code-interface.el copilot-instructions.md

Instructions for tninja/ai-code-interface.el, covering github copilot instructions for ai-code-interface.el, project overview, language and technology, code style and conventions and file naming.

tninja/ai-code-interface.el · 1,289 tokens

codex-command-center AGENTS.md

Instructions for sevensir888/codex-command-center, a project described as: A local desktop control center for organizing Codex projects, engineering tasks, sessions, Git changes, Skills, and MCP configuration.

sevensir888/codex-command-center · 556 tokens

codex-usage-widget AGENTS.md

Instructions for ognjeeen/codex-usage-widget, covering agents.md, project, scope and decision discipline, authorization and repository safety and architecture boundaries.

ognjeeen/codex-usage-widget · 1,218 tokens