"Image Upload Failure on macOS with Screenshot Filename Format"
Bug Description The issue I encountered is claude code cannot read image from my macos. Basically I drap drop an image file from my screenshorts folder, it just cannot read it. Macos screenshot has its own special name format something like "Screenshot 2025-06-16 at 7.24.08 pm". After a few debugging, I found the solution is to use 24-hour system format. Not entirely sure if you can fix this in code level.
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 1.0.24
- Feedback ID: ec7c1fd0-ab5e-4b2a-b2a7-50220c301e88
Errors
Error: File does not exist.
it seems the space between 08 and pm a little special.
it's true that that space is "special" in an annoying way, but we have mitigation for this. can you confirm you are on a recent version?
I have upgraded to the latest version (1.0.27). it seems the issue still there. Here is the screenshot
happy to provide more context if required
renaming it to a more "normal" file name works, but i would like to know the fix as well
yep, I have changed my system time to 24h. It worked
Not a fix but an explanation for why 24 hour system time works.
In macOS Sonoma (14.0 and above), the standard screenshot tool uses a U+202F character instead of a regular space between the time and "AM/PM" in the filename, for instance, "Screen Shot 2025-05-13 at 11.56.52 AM.png".
When Claude calls the Read tool, it sometimes converts the whitespace automatically, e.g.
Last 100 bytes as array: Read '/Users/dickson/Screenshots/Screenshot 2025-05-13 at 11.56.52 AM.png' [
82, 101, 97, 100, 32, 39, 47, 85, 115, 101, 114, 115,
47, 100, 105, 99, 107, 115, 111, 110, 47, 83, 99, 114,
101, 101, 110, 115, 104, 111, 116, 115, 47, 83, 99, 114,
101, 101, 110, 115, 104, 111, 116, 32, 50, 48, 50, 53,
45, 48, 53, 45, 49, 51, 32, 97, 116, 32, 49, 49,
46, 53, 54, 46, 53, 50, 32, 65, 77, 46, 112, 110,
103, 39
]
> Read '/Users/dickson/Screenshots/Screenshot 2025-05-13 at 11.56.52 AM.png'
⏺ Read(../../Screenshots/Screenshot 2025-05-13 at 11.56.52 AM.png)
⏺ I'll read the screenshot for you.
Bytes as array: /Users/dickson/Screenshots/Screenshot 2025-05-13 at 11.56.52 AM.png [
47, 85, 115, 101, 114, 115, 47, 100, 105, 99, 107, 115,
111, 110, 47, 83, 99, 114, 101, 101, 110, 115, 104, 111,
116, 115, 47, 83, 99, 114, 101, 101, 110, 115, 104, 111,
116, 32, 50, 48, 50, 53, 45, 48, 53, 45, 49, 51,
32, 97, 116, 32, 49, 49, 46, 53, 54, 46, 53, 50,
226, 128, 175, 65, 77, 46, 112, 110, 103
]
However, it seems like Claude did not do so in your screenshot.
Until we identify a fix, consider sticking with your 24-hour system time workaround or updating Apple's default screenshot path to exclude the AM/PM part.