-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
What happened?
When using Cline with VSCode LM API and Claude Sonnet 4, Cline attempts to use a tool called str_replace_editor
instead of the built-in replace_in_file
tool for file editing operations. This tool doesn't exist in Cline's codebase. Even when prompted to use the correct Cline tools or when .clinerules specify to use Cline tools, the behavior is inconsistent - sometimes it uses the correct tool, sometimes it doesn't. After the 3.17.9 update, when prompted to use the advised tool, Cline pretends to use the tool but doesn't actually perform the file write operation, suggesting an interface problem between Cline and the LM API.
Steps to reproduce
- Use Cline with VSCode LM API and Claude Sonnet 4
- Give Cline a task that requires file editing
- Observe that Cline attempts to use
str_replace_editor
instead ofreplace_in_file
- Try prompting Cline to use the correct Cline tools
- Notice inconsistent behavior - sometimes works, sometimes doesn't
- After version 3.17.9, when prompted to use the advised tool, observe that Cline appears to use the tool but file changes are not actually applied
Relevant API REQUEST output
N/A
Provider/Model
vscode-lm / claude-sonnet-4
Operating System
linux 6.12.10-76061203-generic
System Info
VSCode: 1.100.3, Node.js: v20.19.0, Architecture: x64
Cline Version
3.17.9
Additional context
The user has verified that str_replace_editor
doesn't exist in Cline's codebase and has added instructions in .clinerules to use Cline tools specifically. The issue appears to be related to how Cline interfaces with the VSCode LM API when using Claude Sonnet 4. The problem has worsened after version 3.17.9, where tool calls appear to execute but don't actually perform the intended file operations.