Agent calls tools twice after permission approval, causing redundant executions

Resolved 💬 3 comments Opened Dec 13, 2025 by marc0der Closed Feb 14, 2026

Description

Claude Code incorrectly makes a second tool call after a user approves a permission-denied tool execution. This causes the tool to execute twice and produces confusing results.

Reproduction Steps

  1. Call any MCP tool that requires user permission (e.g., mcp__sdkman__install_sdkman)
  2. Receive "Permission denied" error
  3. Claude asks user to approve
  4. User approves the permission
  5. Bug: The original tool call executes automatically (correct), but then Claude makes a second redundant tool call
  6. This triggers another approval prompt for the same operation

Observed Behavior

When testing with the SDKMAN MCP server install tool:

  • First tool call → Permission denied (call is held)
  • User approves
  • Original call executes and installs SDKMAN successfully
  • Claude immediately makes a second call to the same tool
  • Second call triggers another approval prompt
  • If approved, the second call detects the fresh installation and returns "already installed" message
  • Result: User sees "already installed" even though the tool just performed a fresh installation

Expected Behavior

After a user approves a permission-denied tool call:

  1. The original held call should execute automatically
  2. Claude should wait for and process the result
  3. Claude should NOT make a redundant second call

Impact

  • Redundant executions: Tools execute twice, which may be costly or have unintended side effects
  • Confusing results: Users receive misleading responses (e.g., "already installed" immediately after installation)
  • Poor UX: Users face unexpected duplicate permission prompts
  • Potential issues with non-idempotent operations: If a tool has side effects, double execution could cause problems

Test Case

Tested with the SDKMAN MCP server (mcp__sdkman__install_sdkman tool):

  • Removed existing SDKMAN installation
  • Called install tool → Permission denied
  • Approved permission
  • Observed: Tool installed SDKMAN at 16:45, then Claude called tool again
  • Result message incorrectly stated "already installed" with the just-installed version numbers

Environment

  • Claude Code CLI
  • Model: claude-sonnet-4-5-20250929
  • Platform: Linux
  • MCP Server: sdkman-mcp-server (custom)

Suggested Fix

After requesting user approval for a permission-denied tool, Claude should wait for the original call to complete rather than making a new tool invocation.

View original on GitHub ↗

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