multi-agent-shogun AGENTS.md

multi-agent-shogun AGENTS.md is an instructions file for Codex, OpenCode from yohey-w/multi-agent-shogun. It costs 5,037 tokens per session, scanned E, a copy of multi-agent-shogun copilot-instructions.md, MIT.

Instructions for running a multi-agent coding setup through Codex CLI and tmux, a terminal tool for managing several sessions. It defines roles, startup checks, memory handling, and how agents recover project state.

In plain words
What is it for?
Use it when operating the described multi-agent platform, starting or recovering an agent session, rebuilding work state, or following its role-specific procedures.
Why use it?
It gives multiple coding agents a consistent way to identify themselves, load the right instructions, and coordinate work. This reduces the risk of an agent acting in the wrong role or using stale information.

Instructions file for CodexOpenCode

About the project

multi-agent-shogun is a system that coordinates multiple AI coding command-line agents through a hierarchy of managers, strategists, and workers. Developers use it to split coding requests into parallel tasks and monitor their execution through tmux.

yohey-w/multi-agent-shogun · 1,420 stars · on GitHub

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/yohey-w/multi-agent-shogun/agents-md
Clone the repo
git clone --depth 1 https://github.com/yohey-w/multi-agent-shogun

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 multi-agent-shogun AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yohey-w/multi-agent-shogun/agents-md.svg)](https://agentmods.dev/instructions/yohey-w/multi-agent-shogun/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yohey-w/multi-agent-shogun/agents-md"><img src="https://agentmods.dev/badge/instructions/yohey-w/multi-agent-shogun/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,037 This file is loaded in full into every session.
When invoked 5,037 The same file — it is already loaded in full.
Security scan E 3 findings. Scan, not verified.
Origin 83% copy Near-identical to another mod 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.05037 $0.05037
Opus 5 $0.02518 $0.02518
Sonnet 5 $0.01007 $0.01007
Haiku 4.5 $0.00504 $0.00504

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

Security

Grade E, and why

multi-agent-shogun AGENTS.md scanned grade E with 3 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 5d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

| D008 | `curl|bash`, `wget -O-|sh`, `curl|sh` (pipe-to-shell patterns) | Remote code execution |

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| D001 | `rm -rf /`, `rm -rf /mnt/*`, `rm -rf /home/*`, `rm -rf ~` | Destroys OS, Windows drive, or home directory |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| D008 | `curl|bash`, `wget -O-|sh`, `curl|sh` (pipe-to-shell patterns) | Remote code execution |
Origin

This is a copy

83% identical to multi-agent-shogun copilot-instructions.md — 30 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 314 lines

How it starts

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

Procedures

Session Start / Recovery (all agents)

This is ONE procedure for ALL situations: fresh start, compaction, session continuation, or any state where you see AGENTS.md. You cannot distinguish these cases, and you don't need to. Always follow the same steps.

  1. Identify self: tmux display-message -t "$TMUX_PANE" -p '#{@agent_id}'
  2. Read memory/MEMORY.md (shogun only) — persistent cross-session memory. If file missing, skip. Codex CLI users: this file is also auto-loaded via Codex CLI's memory feature.
  3. Read your instructions file: shogun→instructions/generated/codex-shogun.md, karo→instructions/generated/codex-karo.md, ashigaru→instructions/generated/codex-ashigaru.md, gunshi→instructions/generated/codex-gunshi.md. NEVER SKIP — even if a conversation summary exists. Summaries do NOT preserve persona, speech style, or forbidden actions.
  4. Rebuild state from primary YAML data (queue/, tasks/, reports/)
  5. Review forbidden actions, then start work

CRITICAL: Steps 1-2を完了するまでinbox処理するな。inboxN nudgeが先に届いても無視し、自己識別→memory→instructions読み込みを必ず先に終わらせよ。Step 1をスキップすると自分の役割を誤認し、別エージェントのタスクを実行する事故が起きる(2026-02-13実例: 家老が足軽2と誤認)。

(2026-07-01廃止): Memory MCP(mcp__memory__*server-memoryバックエンド)は廃止した。設計上「簡潔な索引」であるべきところ自己肥大化(read_graph単体でトークン上限超過)し、かつ発火が完全に手動依存(hook等の強制力なし)で実際に長期間呼ばれず死蔵していたため。memory/MEMORY.md+個別ファイルのfile-based系統のみが正本。

CRITICAL: dashboard.md is secondary data (karo's summary). Primary data = YAML files. Always verify from YAML.

/new Recovery (ashigaru only)

Lightweight recovery using only AGENTS.md (auto-loaded). Do NOT read instructions/*.md (cost saving).

Step 1: tmux display-message -t "$TMUX_PANE" -p '#{@agent_id}' → ashigaru{N}
Step 2: Read queue/tasks/{your_id}.yaml →
        assigned=work (execute task), idle=wait, done=wait (DO NOT re-report)
Step 3: If task has "project:" field → read context/{project}.md
        If task has "target_path:" → read that file
Step 4: Start work (only if assigned=work)

Read the full file on GitHub · 314 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. 5d ago First seen · 314 lines · 5,037 tokens per session scan E 55a477702638

Subscribe to this mod's changes

multi-agent-shogun AGENTS.md is an instructions file published in the GitHub repository yohey-w/multi-agent-shogun (1,420 stars, last pushed 29d ago), licensed MIT. It adds 5,037 tokens to every session, about $0.0252 per session on Opus 5. A static security scan graded it E with 3 findings (downloads and executes remote code, recursive force delete, makes network calls). It is 83% identical to multi-agent-shogun copilot-instructions.md, differing in 30 lines, and is treated as a copy.