claude-agent-acp: Instructions file for Codex

AGENTS.md

claude-agent-acp AGENTS.md is an instructions file for Codex, OpenCode from agentclientprotocol/claude-agent-acp. It costs 1,616 tokens per session, scanned A, original, Apache-2.0.

Contributor instructions for claude-agent-acp, a TypeScript coding agent that follows the Agent Client Protocol and runs on Node.js.

In plain words
What is it for?
Use them when building, testing, linting, formatting, opening pull requests, or preparing an automated release.
Why use it?
They define the checks, pull-request naming rules, and automated release process needed for changes to be accepted and released correctly.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code.

This is agentclientprotocol/claude-agent-acp's own configuration. It tells Codex and OpenCode how to work on claude-agent-acp 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 claude-agent-acp configures →

About the project

claude-agent-acp is an adapter that lets ACP-compatible clients use the Claude Agent SDK as an agent. It supports agent interactions such as tool calls, code editing, terminals, MCP servers, permissions, and nested subagents through the Agent Client Protocol. The catalogue entries provide instructions and commands for working with the adapter.

agentclientprotocol/claude-agent-acp · 2,730 stars · on GitHub

Reuse

Borrowing it

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

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 claude-agent-acp AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/agentclientprotocol/claude-agent-acp/agents-md"><img src="https://agentmods.dev/badge/instructions/agentclientprotocol/claude-agent-acp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,616 This file is loaded in full into every session.
When invoked 1,616 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.01616 $0.01616
Opus 5.5 $0.00646 $0.00646
Sonnet 5.5 $0.00323 $0.00323
Haiku 4.5 $0.00162 $0.00162

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

Security

Grade A, and why

claude-agent-acp 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.

AGENTS.md · 129 lines

How it starts

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

Agent guide

An ACP-compatible coding agent powered by the Claude Agent SDK. Source in src/, TypeScript, ESM, Node >= 22.

Commands

npm run build         # tsc
npm run test:run      # vitest, single pass
npm run check         # eslint + prettier --check
npm run lint:fix      # eslint --fix
npm run format        # prettier --write

CI runs format:check, lint, build and test:run. Run npm run check before opening a PR.

Coding guidelines

  • Keep edits consistent with the surrounding code's formatting, naming and idioms.
  • Keep comments concise and concrete. Name the actual state, call or failure instead of alluding to it, prefer a short example over an abstract description, and avoid vague phrases like "keeps it honest". A comment or doc must be true on every code path it describes, and a doc that lists what a result omits or rejects must name the actual cases.
  • When a request can't be served, throw a RequestError whose message says what happened and what to do (e.g. "Try again when the turn ends"). Don't drop the request silently.
  • Don't report success for work you start without awaiting it. If the detached call can still refuse and its .catch only logs, check the refusal condition first or report the failure to the client.
  • A result must not depend on what an earlier call happened to cache. A request right after a restart, with cold caches, must return the same thing as one after a warm-up.
  • If code relies on an ordering or call sequence that nothing enforces (e.g. an echo arriving before the result), say so in a short comment.

Architecture and design fit

  • Before coding, read the code the change plugs into and find the module that owns the state or concept. Build on that module, not beside it.
  • Don't add new features or components to acp-agent.ts. If no existing module fits the new code cleanly, create a dedicated one that owns the feature's state and logic, and keep the change in acp-agent.ts to the calls that wire it in.
  • Prefer extending an existing mechanism over adding a new one, even if it takes a small refactor (moving a helper, generalizing a function). Add a parallel path, special case or flag only when the existing structure can't support the change.
  • Before writing new logic, check whether it already exists in a sibling handler of the same flow or in a helper that works with the same data, and reuse it. Paths that handle the same input must apply the same rules through the same code: the live stream and the session/load replay, the command list and command dispatch, prompt and steer. Two copies of one check drift apart.
  • Put guards, filters and cleanup in the module that owns the state, so every caller gets them. If guards, flags or fallbacks pile up in one place, restructure instead of adding another.
  • If a result is meant to match another request's output, reuse that request's logic.
  • The adapter serves ACP v1 and v2. A change that is not meant for one protocol version only must work correctly in both. src/v2/ converts v2 requests to v1 and reuses the v1 logic; keep v2-only differences in the conversion.
  • A session runs one turn at a time. "Claude is working" means startTurn's check (an unsettled turn in turnQueue, or foregroundWork for the session); don't write a narrower one. Anything that sends session/update must go through the turn queue or be refused while the session is busy, or its output lands inside another turn. Keep the session marked busy across awaited network calls.
  • Don't branch on a local copy of state that Claude Code or a remote service owns: it goes stale when the other side changes. Have a command set the state the user asks for instead of toggling it.
  • A command or name the adapter adds must not shadow one that Claude Code or the user's own commands and skills already provide.
  • New optional request fields and _meta keys must not reject requests that were valid before.
  • If a workaround or new path is unavoidable (e.g. a Claude Code or SDK limitation), say why in a short code comment and in the PR description.

Read the full file on GitHub · 129 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 Changed · +72 lines · +1,064 tokens per session bbe4efc5ac38
  2. 29d ago Changed · +8 lines · +80 tokens per session 1357a1083dad
  3. 1mo ago Changed · +6 lines · +87 tokens per session c023f0b33860
  4. 2mo ago First seen · 43 lines · 385 tokens per session scan A c775c2213a80

Subscribe to this mod's changes

claude-agent-acp AGENTS.md is an instructions file published in the GitHub repository agentclientprotocol/claude-agent-acp (2,730 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,616 tokens to every session, about $0.0065 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

claude-agent-acp AGENTS.md compared with instructions from other repositories

claude-agent-acp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-agent-acp AGENTS.mdagentclientprotocol/claude-agent-acpInstructions file2.7kyesterdayApache-2.0A1,616Codex, 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