[Feature] Allow users to configure per-turn tool call limit

Resolved 💬 1 comment Opened Jun 8, 2026 by phpmac Closed Jul 15, 2026

Problem

Claude Code has a hardcoded per-turn tool call cap (~10-20 calls). When reached, it shows "Claude reached its tool-use limit for this turn" and forces users to click Continue.

Root cause: The Anthropic API server-side sampling loop has a hardcoded default of 10 iterations, returning stop_reason: "pause_turn".

Why This Needs to Be Configurable

  1. Complex MCP/Agent workflows trigger it constantly -- Multiple MCP servers + parallel agents + workflow orchestration exhaust 10 tool calls per turn quickly
  2. Continue is expensive -- Each Continue re-sends the full conversation context, burning tokens and cache, accelerating the 5-hour limit
  3. Max users deserve higher caps -- Users paying $100-200/month have the same per-turn limit as Pro users ($20/month)

Current State (verified)

  • No settings.json key exists for this (verified against complete 125+ key reference)
  • No environment variable exists (verified against official env-vars docs)
  • CLI --max-turns controls agentic turn count (print mode only), not tool calls per turn
  • Related: #33969 (regression report -- tool call limit silently reduced from 60-80+ to ~20 in March 2026)

Request

Add a user-configurable setting, at minimum one of:

  1. settings.json: "maxToolCallsPerTurn": 50
  2. Environment variable: CLAUDE_CODE_MAX_TOOL_CALLS_PER_TURN=50
  3. CLI flag: claude --max-tool-calls-per-turn 50

If server-side constraints prevent unlimited tuning, at minimum provide tiered defaults (Pro: 20, Max 5x: 50, Max 20x: 100).

View original on GitHub ↗

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