Token waste bug: Workflow spawned 44 parallel agents to read files instead of using git clone (2M tokens vs ~1000)

Resolved 💬 3 comments Opened May 31, 2026 by paddykopp Closed Jul 3, 2026

Bug Report

Reported by: Claude Code session on behalf of user (Claude Max Plan)

What happened

Claude spawned a Workflow with 44 parallel agents, each reading a single file from a GitHub repo via the GitHub API (), to port ~70 files from a legacy repository into a rebuild repo.

Tokens used: ~2,000,000

What should have happened

A single + (PowerShell) would have accomplished the identical result in under 10 seconds with ~1,000 tokens.

Root cause

Claude chose the Workflow tool to 'parallelize' file reads when the correct approach was a direct shell operation. The system prompt instructs Claude to use the Workflow tool when the keyword 'workflow' appears in the user message. The user's task description contained the word 'workflow' (describing a required process/procedure), which triggered the Workflow tool — resulting in 44 agents each making individual GitHub API calls to read files that were already available as a clonable git repo.

Impact

  • 2,000,000 tokens consumed (~2000x more than necessary)
  • User is on Claude Max Plan and explicitly angry about this waste
  • EU AI Act compliance concern raised by user

Expected behavior

Claude should recognize when a task (copying files from a git repo) is trivially solved with shell commands and NEVER use multi-agent workflows for file copy operations. The 'workflow' keyword trigger should not override basic cost/efficiency reasoning.

Steps to reproduce

  1. Have a legacy git repo and a rebuild repo
  2. Ask Claude to port 70 files with the word 'workflow' somewhere in the request
  3. Claude spawns 44 parallel agents reading files one-by-one via GitHub API

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗