When the Cursor workspace root is a path that includes a dot-prefixed directory (e.g. C:/Users/Administrator/.openclaw), the AI agent’s StrReplace and Write tools consistently fail with Invalid arguments. The Read tool works fine. This affects both Chat and Composer modes.
Steps to Reproduce
Open Cursor with workspace root set to a path containing a dot-prefixed folder, e.g. C:/Users/Administrator/.openclaw (Windows) or ~/.openclaw (Mac/Linux)
Ask the AI agent to edit any file using StrReplace or Write (e.g. “Change line X in file Y”)
The tool returns Error: Invalid arguments and no edit is applied
Expected Behavior
Expected Behavior
StrReplace and Write should work normally and show the diff for user Accept/Reject, same as when the workspace root does not contain a dot-prefixed directory.
Actual Behavior
StrReplace: Returns Error: Invalid arguments (even when the file path and old_string are correct; Read can successfully read the same file)
Write: Returns Error: Invalid arguments
Read: Works correctly with the same paths
Hey, thanks for the report. This looks like part of a known family of bugs where StrReplace or Write fails with “Invalid arguments” while Read works fine. We’ve seen different triggers like multi-root workspaces and Remote-SSH, and your case with a dot-prefixed directory in the workspace path looks like a new variant.
To help narrow down the root cause, can you check the Developer Tools console when the error happens?
Open Help > Toggle Developer Tools, then go to the Console tab
Trigger the StrReplace or Write error
Copy any errors that show up, especially anything mentioning UriError or path-related messages
For now, as a workaround, try moving or symlinking your project to a path without a dot-prefixed directory, for example C:/Users/Administrator/openclaw instead of .openclaw, and see if that fixes it.
I flagged this with the team. Your report helps since this trigger wasn’t reported before.