pi-dispatch: Instructions file for Codex

AGENTS.md

pi-dispatch AGENTS.md is an instructions file for Codex, OpenCode from edgehero/pi-dispatch. It costs 10,205 tokens per session, scanned A, original, MIT.

A repository instruction guide for working on pi-dispatch, a service that runs coding-agent tasks in containers on schedules or code-forge events. It explains the project's structure, boundaries, and rules before changes are made.

In plain words
What is it for?
Use it when changing pi-dispatch behavior, deciding whether work belongs in the service or an agent workflow, and understanding its containers, triggers, history, and cost controls.
Why use it?
It gives an agent the project-specific context that is easy to miss when reading code alone. This helps avoid putting changes in the wrong part of the system or weakening its isolation and spending controls.

Instructions file for CodexOpenCode

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

This is edgehero/pi-dispatch's own configuration. It tells Codex and OpenCode how to work on pi-dispatch 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 pi-dispatch configures →

Reuse

Borrowing it

Nothing to install: this file belongs to edgehero/pi-dispatch. 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/edgehero/pi-dispatch/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/edgehero/pi-dispatch

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 pi-dispatch AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/edgehero/pi-dispatch/agents-md/github.svg)](https://agentmods.dev/instructions/edgehero/pi-dispatch/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/edgehero/pi-dispatch/agents-md"><img src="https://agentmods.dev/badge/instructions/edgehero/pi-dispatch/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 pi-dispatch AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/edgehero/pi-dispatch/agents-md"><img src="https://agentmods.dev/badge/instructions/edgehero/pi-dispatch/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10,205 This file is loaded in full into every session.
When invoked 10,205 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.10205 $0.10205
Opus 5.5 $0.04082 $0.04082
Sonnet 5.5 $0.02041 $0.02041
Haiku 4.5 $0.01021 $0.01021

Measured yesterday against content hash 5b4d5ede741a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pi-dispatch 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 yesterday.

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 · 432 lines

How it starts

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

Working on pi-dispatch

Notes for an AI agent working in this repository. Short on purpose: specs/ is the authority, and this file exists to stop you from having to discover the load-bearing parts by breaking them.

What this project is

pi-dispatch runs the pi coding agent as a service. It lives in the background and, on a cron schedule or a forge event (an issue, a comment, a pull request), opens a container that runs a flow against a repository, does the work, and shuts the container down. A panel shows the triggers, the history of every past run and the spend, and can turn the whole thing off.

pi has no queue, no concurrency control, no spend limit and, by its own README, no permission system. This project is exactly that missing operational layer and nothing else. When a change would make pi-dispatch smarter about what the agent does, it probably belongs in a skill or a flow, not here.

Two consequences worth internalising before you design anything:

  • The container is the boundary. Isolation is built by the worker's own docker run argv, so nothing an image contains can weaken it.
  • Money is the other boundary. Every gate that costs nothing runs before every gate that costs something, and a paid container starts only after all of them pass.

The shape

Path What it is
worker/ the queue consumer, the CLI (pi-dispatch), the forge hosts, doctor, service installer
receiver/ the always-on trigger edge (pi-dispatch-receiver): webhook routes and the poller
admin/ the operator console, a pi extension (/dispatch), TypeScript, bundled to dist/
gateway/ optional sandbox browser attachment, a separately hosted process with local terminal assets
image/ the job image and the in-container runner that implements the exit-code protocol
deploy/ service units, wrappers and the compose file; worker/deploy/ is the published mirror
specs/ constitution, requirements, design, interfaces, open questions. The source of truth
docs/ operator-facing reference, one file per feature or forge
design/ the console's design system (#737): system/ is the published cards, tokens and stylesheet; tools/ the Python generators that build them (design/README.md)
launch/ launch copy, the demo recording recipe and the film's recipe (launch/video/). Maintainer material, deliberately not in docs/

Read the full file on GitHub · 432 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. yesterday Changed · +1 lines · +26 tokens per session 5b4d5ede741a
  2. 2d ago Changed · +7 lines · +484 tokens per session cbf6197e1a30
  3. 3d ago Changed · +98 lines · +2,617 tokens per session 565ab5e68755
  4. 4d ago Changed · +29 lines · +857 tokens per session 186e2e92fb26
  5. 7d ago Changed · +5 lines · +112 tokens per session 6de86f81a513
  6. 9d ago Changed · +15 lines · +314 tokens per session 9140ef7a87b0
  7. 11d ago Changed · +1 lines · +19 tokens per session 4afb56eb06e5
  8. 12d ago First seen · 276 lines · 5,776 tokens per session scan A 7bf95226c25f

Subscribe to this mod's changes

pi-dispatch AGENTS.md is an instructions file published in the GitHub repository edgehero/pi-dispatch (191 stars, last pushed yesterday), licensed MIT. It adds 10,205 tokens to every session, about $0.0408 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-10-26.

Related

pi-dispatch AGENTS.md compared with instructions from other repositories

pi-dispatch AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pi-dispatch AGENTS.mdedgehero/pi-dispatchInstructions file191yesterdayMITA10,205Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode