Kontrol: Instructions file for Codex

AGENTS.md

Kontrol AGENTS.md is an instructions file for Codex, OpenCode from B-A-M-N/Kontrol. It costs 3,247 tokens per session, scanned A, original, MIT.

Project instructions for Kontrol, a system that lets AI assistants work with approved local development folders through MCP, a standard way for tools to connect to AI assistants.

In plain words
What is it for?
They are for AI-assisted development in Kontrol workspaces, including direct project work and bounded tasks assigned to a local coding agent.
Why use it?
They explain how to open a project workspace and use file, code-search, editing, and shell tools safely and consistently.

Instructions file for CodexOpenCode

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

This is B-A-M-N/Kontrol's own configuration. It tells Codex and OpenCode how to work on Kontrol 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 Kontrol configures →

Reuse

Borrowing it

Nothing to install: this file belongs to B-A-M-N/Kontrol. 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/B-A-M-N/Kontrol/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/B-A-M-N/Kontrol

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 Kontrol AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/b-a-m-n/kontrol/agents-md.svg)](https://agentmods.dev/instructions/b-a-m-n/kontrol/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/b-a-m-n/kontrol/agents-md"><img src="https://agentmods.dev/badge/instructions/b-a-m-n/kontrol/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,247 This file is loaded in full into every session.
When invoked 3,247 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.03247 $0.03247
Opus 5 $0.01623 $0.01623
Sonnet 5 $0.00649 $0.00649
Haiku 4.5 $0.00325 $0.00325

Measured today against content hash 3e4ab7935295, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

Kontrol 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 today.

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

How it starts

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

Kontrol

This project exposes local development workspaces over MCP so ChatGPT, Claude, or another MCP-capable host can operate on this machine's approved development directories. It supports two complementary workflows:

  • Direct MCP workspace operations, where the host calls tools that read files, edit files, search code, and run shell commands against an opened workspace.
  • Delegated ACP worker runs, where Kontrol dispatches a bounded task to a registered local coding agent and routes completion through a human-reviewed Ralph/Nelson loop.

Pi's SDK is currently used as the backend adapter for mature local coding primitives such as read, edit, write, grep, find, ls, and bash. Kontrol wraps those primitives behind a remote Streamable HTTP MCP interface, suitable for use through a Cloudflare Tunnel.

The model-facing workflow is workspace based. MCP clients should call open_workspace once per local project directory or worktree, then reuse the returned workspaceId for subsequent tool calls in that same folder. Do not call open_workspace again for the same folder unless the workspaceId is rejected as unknown, the client switches folders/worktrees or checkout/worktree mode, or the user explicitly asks to reopen. AGENTS.md files are returned automatically by open_workspace and by later tool calls when the requested path enters a directory with instructions that have not been loaded for that workspace.

ACP review workflow:

  • Reviewer tools and worker tools are separate. Workers must never approve their own work or operate on a work session they are not bound to.
  • Reviewer and delegation routing: the active WebUI model is the primary reviewer, orchestrator, and inspector. Review, audit, diagnosis, architecture, and code-edit work starts directly in the opened workspace. ACP workers are optional bounded assistance only; call discover_agents before delegation, dispatch only a currently dispatchable healthy role: agent peer, and when optional assistance is unavailable return to direct workspace work without trying an alternate ACP path. A normal review must not enter supervised work. Ordinary non-Git directories are valid checkout workspaces; Git is required only for managed worktrees.
  • Review checkpoints are backend-neutral: Git workspaces use immutable Git snapshots, while ordinary directories use content-addressed filesystem snapshots without initializing or mutating Git. Submissions, approval, and verification bind to snapshotKind plus snapshotRef; any patch is only a bounded presentation of that exact snapshot. Structured read-only read, grep, glob, and ls remain public even in codex tool mode.
  • submit_to_coding_agent and supervised mission tools create durable work sessions. A worker submits changes with submit_for_review, then blocks on await_review_feedback.
  • A reviewer provides approval, rejection, or structured change requests through the WebUI/MCP tools. Change requests create durable continuations; approval is bound to the exact submission hash, review epoch, and workspace snapshot.
  • begin_supervised_work, inspect_supervised_work, continue_supervised_work, and approve_supervised_work are the mission control plane for acceptance-criterion-driven work.
  • Cancellation is durable and must stop the logical work session, supersede pending continuations, and request cancellation from the remote worker. The record remains in cancelling until worker shutdown or a confirmed missing remote run, then becomes terminal; workspace leases stay fenced meanwhile.

Worktree and concurrency guidance:

  • A single checkout can run one modifying supervised work session at a time unless the user explicitly accepts shared-working-tree risk.
  • Prefer managed Git worktrees for parallel delegated work or long-running supervised missions.
  • Do not let one session's review checkpoint, continuation, or cancellation mutate another session's state.

Read the full file on GitHub · 251 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. today Changed · +177 lines · +2,477 tokens per session 3e4ab7935295
  2. 6d ago First seen · 74 lines · 770 tokens per session scan A 2f3abd70f803

Subscribe to this mod's changes

Kontrol AGENTS.md is an instructions file published in the GitHub repository B-A-M-N/Kontrol (0 stars, last pushed today), licensed MIT. It adds 3,247 tokens to every session, about $0.0162 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

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

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 · 6,785 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,296 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,469 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens