itsamruth/subagent-reuse

5 stars · Last commit 2026-03-11

MCP server for Claude Code that stops subagents from repeating each other's work.

README preview

# subagent-reuse

MCP server for Claude Code that stops subagents from wasting tokens on work that's already been done.

## The Problem

Claude Code spawns subagents — Plan agents to research, Explore agents to search, general agents to implement. Each one starts from zero. It reads files, builds understanding, does the work.

Then the next subagent comes along for a related task. It reads the same files. Rebuilds the same understanding. Burns the same tokens.

Across a single session, this adds up. Across multiple sessions, it compounds. A planning agent reads 7 files, an implementation agent re-reads all 7, a follow-up bug fix agent re-reads them again. That's 21 file reads for context that could have been carried over.

## What This Does

Sits between Claude Code and its subagents. Before a new agent is spawned, `route_task` checks if an existing agent already has the relevant files loaded.

```
You: "Fix the auth redirect bug"
→ route_task(task, files=["src/auth/callback.ts", "src/middleware/session.ts"])
→ CREATE_NEW (no agent knows these files)

View full repository on GitHub →