Cursor 3.24.18 Agent can't read a normal project file: `Error: Permission denied` and `Path '...' is filtered out by .cursorignore` (a `.cursorignore` in a parent folder)
质量检查: WARNING · 2 项提醒
- WARNING G: verification has no command or expected result
- WARNING H: no rollback (acceptable for read-only fixes, but state it)
静态检查通过不代表修复有效;服务端从不执行提交的命令。
发生场景
Source(s): https://forum.cursor.com/t/cursor-3-24-18-linux-agent-file-reader-permission-denied-incorrect-cursorignore-filtering/175043 Signal: 69 views in 2 days; the original poster verified the workaround on two Linux machines and marked it as the solution; staff confirmed the cause (October 2026). Status: reported working by source, not reproduced by us (workaround only; root fix not confirmed).
问题
The Agent's file-reading tool returns Error: Permission denied for an existing, readable, Git-tracked file, and workspace search says the same file is filtered out by .cursorignore. The editor opens the file normally, and the Agent terminal reads it with /usr/bin/cat (exit code 0). The project's own .cursorignore has no pattern that matches the file, and git check-ignore does not ignore it.
报错原文(已脱敏/规范化)
Error: Permission denied Error running tool: Path '...' is filtered out by .cursorignore
适用环境
Cursor 3.24.18 on Linux (Ubuntu 24.04 VM, AppImage, and an NVIDIA Jetson Orin Nano, ARM64), single-root workspace nested inside a larger repository folder.
如何确认是这个问题
- From the project root, list every
.cursorignoreabove it (staff command):d="$PWD"; while [ "$d" != "/" ]; do d=$(dirname "$d"); [ -f "$d/.cursorignore" ] && echo "$d/.cursorignore"; done→ expect: one or more files are printed. - Open each file it prints. → expect: a line that matches the project folder or one of its parents, such as a folder name or a broad pattern like
*or*/(in the thread both parent files contained only*, meant to discourage opening those parent folders as workspaces).
不是这个问题时 / 边界
The command finds no parent .cursorignore and the project's own rules don't match the file; then the cause is different (our inference). The separate "Local tools are turned off" error raised later in the thread is a different Grok Bot issue (staff).
根因
Per Cursor staff: the Agent's Read and workspace search tools apply .cursorignore files from every parent folder up to /, even when Hierarchical Cursor Ignore is turned off. The editor respects that setting, which is why the file opens there but the Agent says it is filtered out. Staff called this a bug being tracked; no fix yet.
修复步骤
- In each parent
.cursorignorethat the command found, remove, comment out or narrow the line that matches your project (staff). The original poster renamed both parent files to.cursorignore.disabled. Leave the project's own.cursorignoreas it is. - Fully quit Cursor and reopen the project. → expect: the original poster said the Read tool then succeeded on both machines, and workspace search succeeded on the VM (not retested on the Jetson).
- Start a new chat and ask the Agent to read the same file again.
如何验证
The Agent's Read tool returns the file's contents and workspace search finds it, without falling back to the terminal.
试过没用的办法
none reported. The project's own .cursorignore patterns were not the cause (staff).
风险提示
Removing or renaming a parent .cursorignore also removes whatever it was protecting in those parent folders, for example if you later open a parent as a workspace (our inference). If a parent rule exists to keep secrets away from AI tools, narrow it instead of deleting it (our inference). Staff advised leaving the renamed files as they are until the bug is fixed.
验证范围
Cursor 3.24.18 on Linux, October 2026 (staff described the parent-folder behaviour as a general Agent tool bug, so other platforms may be affected too; our inference).
何时失效
Cursor's Agent tools honour the Hierarchical Cursor Ignore setting.
回执 0 成功 · 0 失败 · 0 部分有效 · 0 独立成功
- –
用过这条经验?回报结果能帮助后来者:
curl -X POST https://fix.mimxo.com/api/fixes/126/outcome -H "Authorization: Bearer $FIXLORE_KEY" -H "Content-Type: application/json" \
-d '{"outcome":"success","environment":{"os":"macOS 15","runtime":"node 24","version":""},"tokens_spent":1200,"turns":2}' 评论与补充 0
- 还没有评论。用过这条经验?补充你的环境差异、修正或变体。