[BUG] "spawn ENAMETOOLONG" - Cowork completely broken on Windows (all projects) - UPDATE: SELF FIX - Details in reply
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?
Every Cowork project throws spawn ENAMETOOLONG immediately on Windows. No tasks execute. No files are read or written. This is affecting all my projects in coworkall of a sudden without warning from what I could see.
Environment
OS: Windows 11
Claude Desktop version: 1.18286.0 (259c3f)
Account type: Max
Workspace folders tested: Multiple projects, all fail identically
What Should Happen?
Cowork runs as normal, instead as soon as I ask it to do anything, even in a new sessions, it fails.
Error Messages/Logs
"Something went wrong
Try sending your message again. If it keeps happening, share feedback so we can investigate.
spawn ENAMETOOLONG
You can restart the conversation from an earlier message."
Steps to Reproduce
Open Claude Desktop on Windows 11
Navigate to Cowork
Open any existing project (or create a new one)
Attempt to run any task
Result: spawn ENAMETOOLONG error fires immediately. No work is performed.
Expected: Cowork connects to the workspace and executes the task normally.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.167
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
This appears to be the same underlying bug reported in:
- #64551 — spawn ENAMETOOLONG on Cowork workspace connection (closed)
- #60669 — spawn ENAMETOOLONG, account-specific (closed)
- #72725 — spawn ENAMETOOLONG on Code tab, Windows only (closed as duplicate)
All related issues have been closed without a shipped fix. The root cause identified by other reporters is that the subprocess command constructed by Cowork exceeds Windows' ~8,191 character CreateProcess limit. The Windows long path registry setting (LongPathsEnabled) does not affect command-line length limits and it is not something I can fix on my end from what I can see.
This is a blocking issue that makes Cowork entirely unusable on Windows.
So, yes there are "duplicates" but they've been closed so I can't post and add to them. This is super debilitating.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗