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:
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.
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)
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.
Steps to Reproduce
Environment Setup:
Cursor IDE
Claude 3.5 Sonnet AI Assistant
Any workspace
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
Expected Behavior:
Tool should accept parameters and create/edit file
Should return success message
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
Error Messages:
Initial: “Missing/invalid required arguments”
With all parameters: “Invalid JSON args passed in”