ceo-loop

ceo-loop is a command for Claude Code from nxtg-ai/forge-plugin. It costs 82 tokens per session (1,200 once invoked), scanned B, original, MIT.

An automated decision-making loop for project governance. It repeatedly reviews pending decisions and project state, uses earlier decisions as context, makes or escalates decisions, and records the results.

In plain words
What is it for?
Use it to process pending project decisions, approve or modify them, escalate uncertain cases, and keep a journal of decisions and loop progress.
Why use it?
It provides a repeatable way to handle project decisions over multiple cycles instead of leaving them scattered or unattended.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Use it to process pending project decisions, approve or modify them, escalate uncertain cases, and keep a journal of decisions and loop progress.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nxtg-ai/forge-plugin/ceo-loop
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.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

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 ceo-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/nxtg-ai/forge-plugin/ceo-loop/github.svg)](https://agentmods.dev/commands/nxtg-ai/forge-plugin/ceo-loop)
Your own site
<a href="https://agentmods.dev/commands/nxtg-ai/forge-plugin/ceo-loop"><img src="https://agentmods.dev/badge/commands/nxtg-ai/forge-plugin/ceo-loop/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 ceo-loop

Your own site · 80×15
<a href="https://agentmods.dev/commands/nxtg-ai/forge-plugin/ceo-loop"><img src="https://agentmods.dev/badge/commands/nxtg-ai/forge-plugin/ceo-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,200 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00082 $0.01200
Opus 5.5 $0.00033 $0.00480
Sonnet 5.5 $0.00016 $0.00240
Haiku 4.5 $0.00008 $0.00120

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

Security

Grade B, and why

ceo-loop scanned grade B with 1 finding 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 12d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat .claude/ceo-decisions-pending.json 2>/dev/null | head -30
plugins/nxtg-forge/commands/ceo-loop.md · 135 lines

How it starts

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

/nxtg-forge:ceo-loop — Activate CEO Decision Loop (ORBIT Mode)

Initialise and start the CEO-LOOP ORBIT cycle for this project.

Usage

/nxtg-forge:ceo-loop [max-iterations] [time-limit-minutes]

Defaults: max-iterations=20, time-limit=30

Step 1 — Read current project state

Before initializing the loop, orient yourself:

# Check for pending decisions
cat .claude/ceo-decisions-pending.json 2>/dev/null | head -30

# Check existing decision journal (if resuming)
tail -5 .claude/ceo-loop-decisions.jsonl 2>/dev/null

# Check if a loop is already active (avoid double-starting)
cat .claude/ceo-loop-state.json 2>/dev/null | jq '.active'

# Check project governance state
cat .claude/governance.json 2>/dev/null | jq '{name: .project.name, phase: .current_phase}'

# Check git status for pending work context
git log --oneline -5 2>/dev/null
git status --short 2>/dev/null | head -10

If a loop is already active (active: true): Do NOT re-initialize. Report current state and ask if the user wants to cancel first (/nxtg-forge:ceo-loop-cancel).

Step 2 — Parse arguments

Parse $ARGUMENTS for:

  • First arg (integer): max_iterations (default: 20)
  • Second arg (integer): time_limit_minutes (default: 30)

Validate: max_iterations between 1-50, time_limit between 5-120.

Step 3 — Write state file

Create .claude/ceo-loop-state.json:

{
  "active": true,
  "iteration": 0,
  "max_iterations": <max_iterations>,
  "time_limit_minutes": <time_limit>,
  "started_at": "<ISO-8601 timestamp>",
  "trust_level": "standard",
  "depth_escalation_counter": 0,
  "correct_decisions": 0,
  "incorrect_decisions": 0
}
STARTED=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
cat > .claude/ceo-loop-state.json << EOF
{
  "active": true,
  "iteration": 0,
  "max_iterations": 20,
  "time_limit_minutes": 30,
  "started_at": "$STARTED",
  "trust_level": "standard",
  "depth_escalation_counter": 0,
  "correct_decisions": 0,
  "incorrect_decisions": 0
}
EOF

Read the full file on GitHub · 135 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. 12d ago Changed · +4 tokens per session c38091e99fca
  2. 1mo ago Changed · +27 lines · +78 tokens per session scan A → B a17faeb41349
  3. 1mo ago First seen · 108 lines · 0 tokens per session scan A 14c7a8c32c6d

Subscribe to this mod's changes

ceo-loop is a command published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 82 tokens to every session and 1,200 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.