Skip to content

[Bug] 106 agent definitions ship by default β€” ~300K tokens of context bloat, most agents are non-functionalΒ #1504

@roman-rr

Description

@roman-rr

Summary

Ruflo ships 106 agent definition files (1.19MB / ~300K tokens) in .claude/agents/. The majority of these agents reference MCP servers that don't exist in a standard installation, making them dead weight that inflates every conversation's context window.

When you try to use one of these agents (e.g. frontend-design), you get:

Error: Agent type 'frontend-design' not found. Available agents: general-purpose, statusline-setup, Explore, Plan, ...

...followed by a wall of 90+ agent names dumped into the error message and into the system prompt. This list alone costs significant tokens on every single interaction.

The Numbers

Category Files Size Actually functional?
v3/ 16 238KB Partially β€” references internal v3 architecture
github/ 13 186KB Some work (pr-manager, issue-tracker)
consensus/ 7 107KB References non-existent MCP servers
optimization/ 5 95KB Generic, no project-specific value
swarm/ 3 88KB Partially useful
sparc/ 4 70KB SPARC methodology β€” niche
core/ 5 70KB Actually useful (coder, reviewer, tester, planner, researcher)
sublinear/ 5 55KB 100% non-functional β€” requires sublinear-time-solver MCP (not installed)
flow-nexus/ 9 32KB 100% non-functional β€” requires flow-nexus MCP (not installed)
hive-mind/ 5 25KB Partially useful with ruflo MCP
payments/ 1 5KB 100% non-functional β€” requires agentic-payments MCP (not installed)
templates/ 9 59KB Template files, rarely used
Others 24 ~84KB Mixed β€” duplicates, niche specialists

Total: 1,194,421 bytes (~300K tokens) loaded or indexed per session.

Specific Problems

1. Agents reference MCP servers that don't ship with Ruflo

These 15+ agents call tools from MCP servers that are never installed in a standard npx @claude-flow/cli@latest setup:

  • flow-nexus/* (9 agents) β€” call mcp__flow-nexus__* tools. Flow Nexus is a separate SaaS platform. These agents are useless without it.
  • sublinear/* (5 agents) β€” call mcp__sublinear-time-solver__* tools. This MCP server doesn't exist in any standard install.
  • payments/agentic-payments β€” calls mcp__agentic-payments__* tools. Not installed.

These agents will always fail when spawned. They're marketing material, not functional agents.

2. 7 duplicate agent files

Several agents exist twice β€” once at the category root and once in a nested subdirectory:

analysis/analyze-code-quality.md          ← duplicate
analysis/code-review/analyze-code-quality.md  ← duplicate
architecture/arch-system-design.md
architecture/system-design/arch-system-design.md
development/dev-backend-api.md
development/backend/dev-backend-api.md
devops/ops-cicd-github.md
devops/ci-cd/ops-cicd-github.md
documentation/docs-api-openapi.md
documentation/api-docs/docs-api-openapi.md
specialized/spec-mobile-react-native.md
specialized/mobile/spec-mobile-react-native.md
data/data-ml-model.md
data/ml/data-ml-model.md

3. The agent list bloats every error message and system prompt

When Claude Code lists available agents (on error, or in the system prompt), it dumps all 90+ names. This is pure token waste on every single message in a conversation.

4. Many "agents" are just verbose prompt templates with no differentiation

Agents like trading-predictor (claims to "execute trades before market data physically arrives" via "temporal advantage") and pagerank-analyzer are marketing copy, not useful tooling. A coder agent with a good system prompt can do everything these claim to do.

What's Actually Useful (from real-world usage)

From the 106 agents, roughly 10-15 are genuinely useful for day-to-day development:

  • Core: coder, reviewer, tester, planner, researcher
  • GitHub: pr-manager, issue-tracker (maybe code-review-swarm)
  • Swarm: hierarchical-coordinator
  • V3: security-auditor, memory-specialist (if you use AgentDB)
  • Misc: sparc-coder, task-orchestrator

Everything else is either non-functional (missing MCP dependencies), duplicated, or a verbose wrapper around a basic prompt that the coder or planner agent could handle.

Proposed Solutions

Option A: Ship a minimal core set (recommended)

Ship only the ~15 agents that work out of the box. Move everything else to an opt-in registry:

ruflo agents install flow-nexus    # only if you have Flow Nexus configured
ruflo agents install sublinear     # only if you have sublinear-time-solver
ruflo agents install github-full   # extended GitHub agents beyond pr-manager

Option B: Lazy loading

Don't register agents in the system prompt until they're first used. Only load the full agent definition when Agent(subagent_type="X") is called.

Option C: At minimum, remove non-functional agents

Delete agents that reference MCP servers not included in the standard install. This alone would remove 15+ agents and ~90KB of dead definitions.

Option D: Deduplication + size audit

  1. Remove the 7 duplicate files
  2. Trim agent definitions to <2KB each (most are 15-35KB of verbose prompts)
  3. Move detailed instructions into the agent's runtime prompt, not the static definition

Environment

  • Ruflo v3.5.x (via npx @claude-flow/cli@latest)
  • Claude Code (Opus 4.6)
  • macOS / Ubuntu 24.04

Impact

Every conversation pays the token tax of 106 agent definitions whether or not you use agents. At ~$0.015/1K input tokens on Opus, that's roughly $4.50 per conversation just for agent definitions that are mostly non-functional. Over a workday of 20 conversations, that's ~$90 in wasted input tokens on agent bloat alone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions