Cursor CLI Unable to Access Filesystem

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Cursor CLI doesn’t seem to be able to use the read and write tools to access the filesystem. Eventually it gives up and just uses the command line.

Steps to Reproduce

Run with prompt: Create a test.txt file with the content “text”.

Expected Behavior

Use the read and write file tool to create the file, instead of command line tools.

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version is 2025.08.25-896bbe1

Additional Information

Everything works with 2025.08.22-82fb571, the issue started with: 2025.08.25-896bbe1

I got a “Workspace Trust Required” dialog at the start which I accepted. I am guessing the bug is related to that since it is new.

Example session below:

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ ⬢ Welcome to Cursor Agent Beta                                                                                                                                                                                                                                                                                             │
 │                                                                                                                                                                                                                                                                                                                            │
 │ Cursor Agent CLI is in beta. Security safeguards are still evolving. It can read, modify, and delete files, and execute shell commands you approve. Use at your own risk and only in trusted environments.                                                                                                                 │
 │                                                                                                                                                                                                                                                                                                                            │
 │ Please read about our security at https://cursor.com/security.                                                                                                                                                                                                                                                             │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘


  Cursor Agent
  ~/code/test · master

 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Create a test.txt file with the content "test".                                                                                                                                                                                                                                                                            │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  I'll create a test.txt file with the content "test" for you.

 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Writing test.txt                                                                                                                                                                                                                                                                                                           │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  Let me check the current directory structure to understand the issue and then create the file:

  ⬢ Listed . 0 files, 0 directories

  The directory is empty. Let me try creating the file again with a full path:

 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Writing test.txt                                                                                                                                                                                                                                                                                                           │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  Let me try using a relative path without the absolute path:

 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Writing test.txt                                                                                                                                                                                                                                                                                                           │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  Let me try using the shell command to create the file:

 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ $ echo "test" > test.txt 14ms in current dir     

Another session, this time with an error message.

     Cursor Agent
  ~/code · master

 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Create a file called test.txt with the content 'test'                                                                                                                                                                                                                                                                      │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  I'll create a file called test.txt with the content 'test' for you.

 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Writing test.txt                                                                                                                                                                                                                                                                                                           │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  Let me try checking the current directory structure first and then create the file:

  ⬡ Listing .
    Error: Could not resolve directory: ConnectError: [invalid_argument] Error

  It seems there might be an issue with the file system access. Let me try using the shell to create the file instead:



 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ $ echo 'test' > test.txt in .                                                                                                                                                                                                                                                                                              │
 └───────────────────────────────────

Does this stop you from using Cursor

Yes - Cursor is unusable

hi @Michael_Ratliff and thank you for your bug report.

I have sent it to our team.

I am also experiencing this issue with the latest version and its currently making the CLI essentially unusable for me. For anyone wanting to downgrade, remove the the binary and install the old version:

which cursor-agent | xargs rm
curl https://cursor.com/install -fsS | sed 's/2025.08.25-896bbe1/2025.08.22-82fb571/g' | bash

Having the same issue on Mac Arm. Downgrading to 2025.08.22-82fb571 solves issue for now

This is also happening for me on Mac Arm as well. Current version: 2025.08.27-24c29c1

Downgrading to 2025.08.22-82fb571 solves the issue for me, but I keep getting auto-upgraded to the latest version. Is there a way to turn off upgrades for cursor-agent ?

Same here, also on a apple silicon mac

I am also having this issue. Is there any ETA for a fix?

I’ve tried downgrading as described above but the downgraded cursor-agent simply exits with no error.

Hey, is this happening in the latest version? Also, let me know your OS.

Yes, this is my current version: 2025.08.27-24c29c1

I’m using Ubuntu 22.04.5 LTS on WSL2.

Thanks.

Same issue for me here

Cursor CLI Version: 2025.08.27-24c29c1
Arm MacBook Air (M2)
MacOS: 15.6.1 (24G90)

I updated this morning to 2025.09.03-e077a54 and I’m still seeing the same error:

I asked Cursor to perform a self diagnostic on the globbing functionality to help determine a root cause. It produced the following summary:

I've completed a comprehensive test of the Cursor agent's file globbing functionality and found several critical issues:

  ❌ **Issues Found:**

  1. `glob_file_search` Tool Completely Non-Functional
    • All glob patterns tested returned no results or "didn't return the result"
    • Tested patterns include:
      • Basic patterns: *.rs, *.toml, *.md
      • Recursive patterns: **/*.rs, **/*.toml
      • Directory-specific patterns: src/**/*.rs, src/utils/*.rs
      • Complex patterns: **/*.{rs,toml,md}
      • Edge cases: **/*, ., src
  2. `list_dir` Tool with Ignore Patterns Failing
    • Returns ConnectError: [invalid_argument] Error when using ignore patterns
    • Tested with patterns like ['target/**', '.git/**']
  3. `grep` Tool with Glob Patterns Failing
    • Returns [invalid_argument] Error when using glob patterns
    • Tested with patterns like *.rs and directory-specific searches

  ✅ **Working Functionality:**

  1. Terminal Commands Work Correctly
    • find command successfully locates files with patterns
    • ls command works for directory listing
    • Basic file system operations are functional
  2. Basic `list_dir` Without Ignore Patterns
    • Some basic directory listing functionality appears to work (though I encountered errors in this test)

I’m using version 2025.09.03-e077a54.

I noticed that in a brand new project that this was working correctly. The main difference between the brand new project and an existing project is that the new project is not yet in Git and has no .git file.

On a hunch, I deleted the .git file from the old project and started cursor-agent again. Lo and behold, these tools now work. It would appear the problem is in some way related to Git functionality or the .gitdirectory?

I can confirm that wiping the .git directory or temporarily moving it out of the project solves the issues for me.

Same bug here.

Moving .git is interesting, I can confirm that works for me, and moving .git back to its normal place causes the problem again, wherein any file tool call returns ConnectError invalid_argument only when .git exists. This had only happened intermittently for me before a week or two ago, now it happens consistently.

One more thing I tried was using a git worktree to see if that had any effect, but the same error occurs in worktrees.

I’m also on version 2025.09.03-e077a54 on an M4 Macbook Pro.

It works okay to have Cursor use commands like sed instead, but it appears to be much less efficient in tokens.

It’s important to note that the bug only happens when the .git directory is present at startup of the cursor-agent. For example, starting with an empty directory and having the agent call git init will not cause failures. Restarting the agent afterwards does fail subsequent globs.

The problem is specifically about a .git directory. Renaming it to .git2 or whatever else also resolves the issue.

I just found the same thing! If I do a mv .git .git.bak, then start cursor-agent, then the first thing I do inside the agent is use ! to run mv .git.bak .git, then everything seems to work. Plus this allows normal usage of git. Though around a quarter of the time this still doesn’t work.

Conversely, if I start cursor-agent without having moved .git, and then use ! to mv .git .git.bak, then the errors always happens. It does seem specific to startup.

Cursor is acting up, when can we expect a fix for this bug?

I’m using version 2025.09.04-fc40cd1

Seeing this issue frequently in cursor-cli, when trying to execute “pwd && ls -a”

I have also seen this in the GUI cursor very frequently. When the above fails, it tries to run a “find” and encounters similar issues.