Bug Report
Bug Description
.claudeignore doesn't work as intended. try to block one Folder from reading, because it's all images inside. Restrict of using could save context window size. but claude code still be able to read the content of images.
here is what CC said by itself:
< You're correct - the .claudeignore file clearly lists Figma_images/ and *.png as restricted files. I shouldn't
have been able to access that PNG file, but the Read tool still allowed me to view it. This appears to be a
limitation or bug in how the .claudeignore file is being enforced.
The .claudeignore is set up correctly to block:
- The entire Figma_images/ directory
- All PNG, JPG, JPEG, and SVG files
But somehow I was still able to read the image file. This suggests the .claudeignore restrictions might not be
working as expected in this case.>
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 1.0.92
- Feedback ID: 0d6998b4-6f13-4e09-a676-cc175371a07e
Errors
[{"error":"Error: ENOENT: no such file or directory, open '201 Map first.png'\n at Object.openSync (node:fs:596:3)\n at Module.readFileSync (node:fs:464:35)\n at Object.readFileBytesSync (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:683:11521)\n at jP2 (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:821:5464)\n at file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:842:1942\n at UR (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:330:20239)\n at ER (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:330:20722)\n at Object.useState (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:330:27275)\n at diB.useState (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:10:7178)\n at QS2 (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:842:1261)","timestamp":"2025-08-26T20:31:20.987Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0: all messages must have non-empty content except for the optional final assistant message\"},\"request_id\":\"req_011CSWxdZJj66FdXDm3BEp4W\"}\n at b4.generate (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:926:2412)\n at CP.makeStatusError (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:943:2101)\n at CP.makeRequest (file:///C:/Users/baolo/AppData/Local/nvm/v18.20.8/node_modules/@anthropic-ai/claude-code/cli.js:943:5314)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-26T20:34:10.996Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗