[BUG] .py file downloads fail with "Unable to open file" (other file types work fine)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment:
- OS: Windows 11 Pro
- App: Claude Desktop / Cowork
- App version: [fill in — Settings → General or Help → About]
- Antivirus/security: Windows Defender only (Controlled Folder Access: off;
Protection history: no relevant entries). Acronis was suspected but is not
installed on this system.
Description:
Downloading a .py file from a Claude chat consistently fails with an
"Unable to open file." toast at the bottom of the Claude window. Other file
types (tested: .wl, .txt, .zip) download successfully to the default
Downloads folder with no issue.
Steps to reproduce:
- In a Claude chat, have Claude create/attach a .py file (tested with a
simple "print("Hello, World!")" script).
- Click the "v" (chevron) on the file card.
- Select "Download".
What Should Happen?
Expected: File saves to the default Downloads directory.
Actual: Toast reads "Unable to open file." No file — not even a temporary
or partial one — ever appears in the Downloads directory.
Error Messages/Logs
Description:
Downloading a .py file from a Claude chat consistently fails with an
"Unable to open file." toast at the bottom of the Claude window. Other file
types (tested: .wl, .txt, .zip) download successfully to the default
Downloads folder with no issue.
Steps to Reproduce
Steps to reproduce:
- In a Claude chat, have Claude create/attach a .py file (tested with a
simple "print("Hello, World!")" script).
- Click the "v" (chevron) on the file card.
- Select "Download".
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
- App version: 1.30096.1.0 (installed/updated 8/13/2026)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Expected: File saves to the default Downloads directory.
Actual: Toast reads "Unable to open file." No file — not even a temporary
or partial one — ever appears in the Downloads directory.
Additional testing performed:
- Selecting "Download and open" instead of "Download" produces the same
failure.
- Double-clicking the file card does NOT attempt a download at all — it
opens the file's contents in Claude's side preview panel, where the code
is viewable and copyable. This works correctly.
- The identical "Hello World" content, delivered as .txt and as .zip
(containing the same .py file), downloads successfully with no error.
- Windows Defender Controlled Folder Access is off; Protection history
shows nothing relevant around the failed attempts — ruled out as cause.
- No temp/partial/zero-byte file ever appears during a failed .py download,
suggesting the failure happens client-side in the app before any file
write is attempted, rather than being blocked by Windows or security
software.
Workaround: Wrapping the .py file in a .zip before downloading succeeds.
The code can also be retrieved via double-click → copy from the preview
panel.
You can drop that straight into a new issue at github.com/anthropics/claude-code/issues, or use it as the details behind an in-app thumbs-down if you'd rather skip GitHub entirely.