[BUG] Cowork: New project with name matching selected context folder silently creates empty nested subfolder and mounts it instead of the context folder

Resolved 💬 3 comments Opened Apr 15, 2026 by sudslogrithm Closed Jun 12, 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?

Cowork: New project with name matching selected context folder silently creates empty nested subfolder and mounts it instead of the context folder

Reproduction:

Have an existing folder /Users/me/Projects/MyVault containing real content (e.g. an Obsidian vault with .obsidian/, claude.md, populated subdirectories).
Create a new Cowork project. Name it "MyVault" (matching the folder name).
When prompted for a folder, select /Users/me/Projects/MyVault.
Start a new session.

Expected:

  • Session mounts /Users/me/Projects/MyVault and Claude sees the real vault contents.

Actual:

  • Cowork creates (or uses) an empty subfolder /Users/me/Projects/MyVault/MyVault/ and mounts that. Claude reports the folder is empty.

Workaround:

  • In-session, call request_cowork_directory with the real vault path — works for that session only. Deleting the nested subfolder does not stick; it's recreated on next session launch.

Impact:

  • Silent data-placement bug. Users who don't notice the empty mount may write files into the nested subfolder, effectively "losing" work inside their own vault.

Hypothesis:

  • Cowork treats project name + context folder independently, and when the project save directory defaults to {context_folder}/{project_name}/ while the project name matches the context folder's basename, a nested duplicate is created.

Suggested fix:

  • When the selected context folder's basename matches the project name, either warn the user or use the context folder directly as the project save directory.

What Should Happen?

Expected:

  • Session mounts /Users/me/Projects/MyVault and Claude sees the real vault contents.

Error Messages/Logs

Steps to Reproduce

Reproduction:

  • Have an existing folder /Users/me/Projects/MyVault containing real content (e.g. an Obsidian vault with .obsidian/, claude.md, populated subdirectories).
  • Create a new Cowork project. Name it "MyVault" (matching the folder name).
  • When prompted for a folder, select /Users/me/Projects/MyVault.
  • Start a new session.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude 1.2773.0 (884b37) 2026-04-15T14:32:09.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗