Model failed to call the tool with the correct arguments

Just updated to 0.45.3

Version: 0.45.3
VSCode Version: 1.96.2
Commit: 92081828ae09de344d8673d063f4f5c55c81c9a0
Date: 2025-01-24T20:11:05.745Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

After some planning with the agent on both claude-3-5-sonnet and claude-3-5-sonnet-20241022 it seems unable to make any edits, these two different composer conversations with two different claude models:

2 Likes

bug report filled in by the agent:

:bookmark: Description

The edit_file tool in Cursor is failing with “Invalid JSON args passed in” error when attempting to create or edit files, even when providing all required parameters according to the schema.

:butterfly: Expected Result

The edit_file tool should accept the following required parameters and successfully create/edit files:

  • target_file (string)

  • instructions (string)

  • code_edit (string)

  • blocking (boolean)

:floppy_disk: :bug: Actual Result

Tool calls fail with error: “Error calling tool: Invalid JSON args passed in” even when providing all required parameters in the correct format.

:mag_right: Steps to Reproduce

  1. Environment Setup:

    • Cursor IDE
    • Claude 3.5 Sonnet AI Assistant
    • Any workspace
  2. Reproduction Steps:
    a. Ask AI to create or edit any file using edit_file tool
    b. AI will attempt to use the tool with required parameters:

    • target_file
    • instructions
    • code_edit
    • blocking
  3. Expected Behavior:

    • Tool should accept parameters and create/edit file
    • Should return success message
  4. Actual Behavior:

    • First attempts show missing parameters error
    • Complete parameter attempts show “Invalid JSON args passed in”
    • Inconsistent: Sometimes file is modified despite error
    • Error persists across different files/content
  5. Error Messages:

    • Initial: “Missing/invalid required arguments”
    • With all parameters: “Invalid JSON args passed in”
1 Like

Same issue! It seems like a bug at the cursor side. Please fix it cursor

same issue here

Same issue here.

Still happening with Gemini 2.5 Pro Experimental 03-25 and Cursor 0.48.8

same issue here,Cursor 0.48.8