[BUG] DOCX files created with Node.js docx library are corrupted/unreadable
Resolved 💬 6 comments Opened Oct 11, 2025 by PatrickRutledge Closed Jan 10, 2026
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?
Result: File is corrupted and cannot be opened
Describe the bug
When Claude creates .docx files using the Node.js docx library in the computer use environment, the files appear to be created successfully but become corrupted when users attempt to download and open them. Files can only be previewed in the Claude interface but cannot be opened in Microsoft Word, LibreOffice, or other document processors.
Actual behavior
- Files appear created successfully (no errors, reasonable file size)
- Files can be previewed in Claude interface
- Files become corrupted when downloaded
- Cannot be opened in any document processor
- Error messages vary: "file is corrupted", "cannot open", "invalid format"
What Should Happen?
Expected behavior
.docxfiles should be valid Office Open XML documents- Files should be downloadable and openable in Microsoft Word, LibreOffice, and compatible applications
- Formatting, structure, and content should be preserved
Error Messages/Logs
## Screenshots/Logs
# Typical successful execution log:
Document created successfully
# File appears in directory:
-rw-r--r-- 1 claude claude 15234 Oct 10 17:17 report.docx
# But file is corrupted when user downloads
Steps to Reproduce
To Reproduce
Steps to reproduce the behavior:
- Request Claude to create a Word document: "Create a comprehensive report as a docx file"
- Claude reads
/mnt/skills/public/docx/SKILL.mdand follows best practices - Claude creates Node.js script using
docxnpm library - Script executes successfully:
console.log("Document created successfully") - File appears in
/mnt/user-data/outputs/with reasonable size (e.g., 15KB) - Claude provides download link:
computer:///mnt/user-data/outputs/filename.docx - User downloads file
- User attempts to open file in Word/LibreOffice
Result: File is corrupted and cannot be opened
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
claude-sonnet-4-5-20250929
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗