escalation-subagents

escalation-subagents is a cursor rule for coding agents from AG-Dmitry/composer-enhanced. It costs 26 tokens per session (731 once invoked), scanned A, original, MIT.

A procedure for asking a read-only critic agent to review work when a task is unusually complex, repeatedly failing, security-sensitive, or hard to assess objectively. The critic looks for problems without changing the project.

In plain words
What is it for?
Escalate after repeated failed iterations, during complex design work, when self-review is uncertain, or before submitting security- or authentication-related changes. Give the critic the relevant diff and success criteria to review.
Why use it?
A single agent can miss defects after working in the same context for too long. A separate review can expose logic errors, missing cases, regressions, or security issues before submission.

Cursor rule

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 rules/ag-dmitry/composer-enhanced/escalation-subagents
Clone the repo
git clone --depth 1 https://github.com/AG-Dmitry/composer-enhanced

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 escalation-subagents

README.md
[![agentmods](https://agentmods.dev/badge/rules/ag-dmitry/composer-enhanced/escalation-subagents.svg)](https://agentmods.dev/rules/ag-dmitry/composer-enhanced/escalation-subagents)
Your own site
<a href="https://agentmods.dev/rules/ag-dmitry/composer-enhanced/escalation-subagents"><img src="https://agentmods.dev/badge/rules/ag-dmitry/composer-enhanced/escalation-subagents.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 731 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.00731
Opus 5 $0.00013 $0.00365
Sonnet 5 $0.00005 $0.00146
Haiku 4.5 $0.00003 $0.00073

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

Security

Grade A, and why

escalation-subagents 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.

agent-protocols/escalation-subagents.mdc · 85 lines

How it starts

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

Escalation & Subagents

Use subagents when the main model has been in the same context too long and has lost the objectivity needed to find real bugs, or when an architectural question requires deeper reasoning than the main model can reliably provide in a single pass.

When to escalate

Trigger Recommended subagent type
Iteration-3 checkpoint: still failing Critic subagent (readonly)
Phase 03 on a high-complexity/ambiguous task Design consultant subagent
Phase 05 when confidence in self-critique is low Critic subagent (readonly)
Pre-submit: security/auth-sensitive change Security critic subagent

Do not escalate for medium tasks or as a substitute for doing the work in phases 01-05.

Critic subagent (phase 05 escalation, iteration-3 checkpoint)

Task(
  description: "Critic review",
  subagent_type: "generalPurpose",
  readonly: true,
  model: "gemini-3.1-pro",
  prompt: "Review the following diff and implementation against these success
           criteria: [paste from working memory].
           Assume bugs exist. Hunt for: logic errors, missing nulls, unhandled
           async paths, requirement drift, regressions, hidden stubs.
           Return a concrete list of suspected issues (file:line + description).
           Do NOT implement fixes — findings only."
)

Model selection: gemini-3.1-pro is suited for checklist-driven review at lower cost. For security-sensitive or highly ambiguous architectural critique, you may substitute claude-4.6-sonnet-medium-thinking.

Design consultant subagent (phase 03 optional)

Task(
  description: "Design consultant",
  subagent_type: "generalPurpose",
  readonly: true,
  model: "claude-4.6-sonnet-medium-thinking",
  prompt: "Given this goal and constraints [paste from working memory], propose
           and compare two architectures. Return trade-offs and a recommendation.
           Do not implement — design only."
)

Read the full file on GitHub · 85 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 First seen · 85 lines · 26 tokens per session scan A fa382721bb9a

Subscribe to this mod's changes

escalation-subagents is a cursor rule published in the GitHub repository AG-Dmitry/composer-enhanced (3 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 731 once invoked, about $0.0001 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.