decompose

decompose is a command for coding agents from joseairosa/recall. It costs 16 tokens per session (716 once invoked), scanned A, original, MIT.

A command for breaking an RLM execution chain into smaller tasks. An execution chain is a recorded sequence of work, and the command can split it by filters, fixed chunks, nested steps or source aggregation.

In plain words
What is it for?
Use it with a chain ID to create a subtask list, optionally process every subtask automatically, or choose a decomposition strategy such as regex filtering or document chunking.
Why use it?
It makes a long or complex analysis easier to inspect and process in manageable parts.

Command

Part of the claude-plugin plugin — 7 commands, 3 agents, 5 hooks shipped together

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 commands/joseairosa/recall/decompose
Clone the repo
git clone --depth 1 https://github.com/joseairosa/recall

Or install claude-plugin, the plugin that ships this one along with the rest of its 7 commands, 3 agents, 5 hooks.

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 decompose

README.md
[![agentmods](https://agentmods.dev/badge/commands/joseairosa/recall/decompose.svg)](https://agentmods.dev/commands/joseairosa/recall/decompose)
Your own site
<a href="https://agentmods.dev/commands/joseairosa/recall/decompose"><img src="https://agentmods.dev/badge/commands/joseairosa/recall/decompose.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 716 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.00016 $0.00716
Opus 5 $0.00008 $0.00358
Sonnet 5 $0.00003 $0.00143
Haiku 4.5 $0.00002 $0.00072

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

Security

Grade A, and why

decompose 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.

claude-plugin/commands/decompose.md · 115 lines

How it starts

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

/decompose Command

Break down an RLM execution chain into subtasks and optionally process them automatically.

Usage

/decompose <chain_id> [strategy] [--auto]

Arguments

Argument Required Description
chain_id Yes The execution chain ID from /load-context
strategy No Override decomposition strategy
--auto No Automatically process all subtasks

Strategies

Strategy Description Best For
filter Extract by regex patterns Log analysis, error finding
chunk Sequential fixed-size pieces Document reading
recursive Nested decomposition Complex analysis
aggregate Combine multiple sources Synthesis tasks

Examples

# Use recommended strategy
/decompose 01HXYZ12345

# Override with filter strategy
/decompose 01HXYZ12345 filter

# Auto-process all subtasks
/decompose 01HXYZ12345 --auto

# Filter strategy with auto-process
/decompose 01HXYZ12345 filter --auto

Behavior

Manual Mode (default)

  1. Decompose task into subtasks
  2. Display subtask list with descriptions
  3. Wait for user to process each subtask manually

Auto Mode (--auto)

  1. Decompose task into subtasks
  2. For each subtask:
    • Extract relevant context snippet
    • Analyze the snippet
    • Record the result
  3. Report progress after each subtask
  4. Suggest merging when complete

Output

Task Decomposed
---------------
Chain ID: 01HXYZ12345
Strategy: filter
Subtasks: 5

1. [pending] Find ERROR level messages (query: ERROR|FATAL)
2. [pending] Find WARNING level messages (query: WARN|WARNING)
3. [pending] Find exception stack traces (query: Exception|Traceback)
4. [pending] Find failure indicators (query: failed|failure|crash)
5. [pending] Summarize error patterns (query: ERROR)

Next steps:
- Process each subtask with inject_context_snippet
- Or run /decompose 01HXYZ12345 --auto to auto-process

Auto Mode Progress

Processing subtask 1/5: Find ERROR level messages
- Extracted 1,234 tokens (92% relevance)
- Found 47 error messages
- Result recorded

Processing subtask 2/5: Find WARNING level messages
...

All subtasks complete!
Run /rlm-status 01HXYZ12345 to see summary
Or call merge_results to aggregate findings

Read the full file on GitHub · 115 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 · 115 lines · 16 tokens per session scan A ac70a8fdb90a

Subscribe to this mod's changes

decompose is a command published in the GitHub repository joseairosa/recall (175 stars, last pushed 4d ago), licensed MIT. It adds 16 tokens to every session and 716 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-30.