StrReplace / Write tools fail with "Invalid arguments" when workspace root path contains dot-prefixed directory (e.g. .openclaw)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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

Operating System

Windows 10/11

Version Information

Version: 2.6.20 (user setup)
VSCode Version: 1.105.1
Commit: b29eb4ee5f9f6d1cb2afbc09070198d3ea6ad760
Date: 2026-03-17T01:50:02.404Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.19045

Does this stop you from using Cursor

No - Cursor works, but with this issue

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.