Bug Report: Silent Failure of edit_file
Function in Hidden Directories
Issue Description
Cursor’s AI assistant fails silently when using the edit_file
function on files within hidden directories (directories starting with a dot in Unix systems). While the apply model acknowledges the edit request, it doesn’t properly write the content to the file.
Steps to Reproduce
- Start a conversation with Claude in Cursor
- Create a hidden directory using terminal:
mkdir -p .docs
- Use the
edit_file
function to create or edit a file in this directory - Verify the file exists but contains either no content or only a space character
Expected vs Actual Behavior
- Expected: File should be created with the content specified in the
code_edit
parameter - Actual: File is created but only contains a space character or is empty
Technical Analysis
The issue appears to be in how the apply model handles paths to hidden directories. The problem might be due to:
- Path interpretation issues with dot-prefixed directories
- Content application failure specific to hidden directories
- Hidden directory-specific permissions issues
This is not a general file permissions problem, as standard terminal commands can successfully create and modify files in these directories.
System Information
- OS: macOS 23.5.0
- AI Model: Claude 3.7 Sonnet
- Cursor Version: 0.46.9 (Universal)
- VSCode Version: 1.96.2
- Commit: 3395357a4ee2975d5d03595e7607ee84e3db0f20
- Date: 2025-03-05T08:27:47.713Z
- Electron: 32.2.6
- Chromium: 128.0.6613.186
- Node.js: 20.18.1
- V8: 12.8.374.38-electron.0
- OS: Darwin arm64 23.5.0
Impact
This bug prevents users from modifying configuration files and documentation in hidden directories, which is a common pattern in many projects (e.g., .github
, .vscode
, .config
).