[BUG] Routines struggle with MCP tools: excessive API calls, token waste, and stream timeout errors

Resolved 💬 1 comment Opened Apr 29, 2026 by mathwin78 Closed May 30, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using Claude Code routines that involve MCP servers (tested with Notion and Webflow), Claude Code fails to complete tasks efficiently. It makes multiple redundant API calls, fails to retrieve the expected data, wastes a large number of tokens, and ultimately hits:
API Error: Stream idle timeout - partial response received error — leaving the task incomplete.

In contrast, the same prompt executed directly in Claude.ai (with the same MCP connections) completes the task in under 1 minute with only 2–3 tool calls.

What Should Happen?

Claude Code should handle MCP tool calls within routines with the same efficiency as Claude.ai, resolving the task in a minimal number of calls without timeout errors.

Error Messages/Logs

API Error: Stream idle timeout - partial response received

Steps to Reproduce

  1. Connect any MCP servers in Claude Code (mine were Notion, Webflow)
  2. Create a routine that involves reading/writing data via these MCPs (e.g. fetch a Notion page, create a Webflow CMS item)
  3. Run the routine manually via Claude Code
  4. Observe: multiple failed or redundant MCP calls, high token usage, and eventual stream idle timeout error
  5. Run the exact same prompt in Claude.ai with the same MCP connections → task completes successfully in <1 min

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.114

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

<img width="918" height="532" alt="Image" src="https://github.com/user-attachments/assets/7cdca292-8462-4ece-a9aa-41fbb9f0b49b" />

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗