[BUG] [Cowork] present_files cards not rendered + overlayfs shadow blocks write to mounted folder
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?
Two bugs in Cowork mode (research preview):
Bug 1 — present_files cards not rendered in UI
mcp__cowork__present_files returns file paths successfully (no error), but no download/open card is rendered in the chat UI. The user has no way to access files created inside the sandbox through the intended UI mechanism.
Bug 2 — mkdir inside /sessions/.../mnt/ creates an overlayfs shadow that silently breaks writes to the user's mounted Mac folder
When Claude runs mkdir for a directory that matches the name of the user's selected workspace folder (e.g., [workdir]), it creates a local directory in the overlayfs upper layer that shadows the real Mac mount (lower layer). All subsequent bash/python writes go to the upper layer only and never reach the Mac filesystem — with no error or warning. The user sees files "disappear" and Claude falsely believes the write succeeded.
What Should Happen?
Bug 1: present_files should render interactive file cards in the Cowork chat UI so the user can open or save files directly.
Bug 2 (two options):
Option A: Prevent mkdir from creating directories that shadow active mount points inside /sessions/.../mnt/, or surface a clear warning when this happens.
Option B: Provide a mcp__filesystem__write_binary_file tool (or extend write_file to support binary/base64 content) so Claude can write .docx, .xlsx, .pptx and other binary files directly to the user's Mac folder via MCP — bypassing the overlayfs limitation entirely.
Error Messages/Logs
No explicit error shown. Both operations appeared to succeed:
present_files returned file paths without error
bash cp / Python shutil.copy2 reported success (File 1: 15865 bytes)
mcp__filesystem__list_directory on /Users/[username]/[workdir]/[vigilant-admiring-lamport] showed empty directory
mcp__filesystem__get_file_info returned ENOENT: no such file or directory
Steps to Reproduce
Open Cowork, select a Mac folder (e.g. /Users/[username]/[workdir]) as workspace
Ask Claude to create a .docx file and save it to the workspace folder
Claude runs mkdir /sessions/.../mnt/[workdir] — this creates a shadow directory
Claude writes files into the shadow directory — no error returned
Files do not appear in /Users/[username]/[workdir]/ on the Mac
Claude calls mcp__cowork__present_files with the file paths — no UI card appears
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
N/A
Claude Code Version
2.1.81 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Claude desktop app (not CLI) — no terminal involved on user side
Additional Information
Workaround applied: wrote a Node.js self-extracting script (restore.js) with base64-encoded .docx content to the Mac via mcp__filesystem__write_file (text-only). User must run node ~/출장/vigilant-admiring-lamport/restore.js manually in Terminal.
The overlayfs shadow was confirmed by listing the /sessions/.../mnt/ directory via Python (os.listdir), which showed the upper-layer directory hiding the real mount.
mcp__filesystem__write_file is text-only; no binary write tool is available to Claude as an alternative.
Session transcript available for reference.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗