Sandbox creates empty `.claude/.cc-writes/` dirs in nested subfolders when working directory changes
Description
With the sandbox enabled (macOS Seatbelt), Claude Code creates empty .claude/.cc-writes/ directories inside nested project subfolders. One repo ended up with 6+ of them, e.g.:
frontend/src/.claude/.cc-writesfrontend/src/<pkg>/pages/settings/<feature>/.claude/.cc-writesfrontend/src/<pkg>/pages/<feature>/details/.../.claude/.cc-writes
They seem to appear whenever the session's primary working directory moves (e.g. after a Bash command cds into a subfolder). The sandbox write-deny list contains matching <dir>/.claude/.cc-writes entries.
Steps to reproduce
- Enable the sandbox on macOS.
- Start Claude Code at a project root.
- Have it run a Bash command that
cds into a nested subfolder (the working directory moves). <subfolder>/.claude/.cc-writes/now exists.
Expected
No directories are created in project subfolders, or they are created only at the project root or in a session-scoped location (e.g. under ~/.claude).
Actual
Empty .claude/.cc-writes/ folders pile up across the source tree and clutter the IDE file tree. As far as I can find, no setting prevents or relocates them, and .cc-writes isn't documented.
Request
- Don't create
.cc-writesin nested directories, or - Add a setting to disable or relocate it, and
- Document what
.cc-writesis for.
Environment
- OS: macOS (Darwin 25.6.0)
- Sandbox: enabled (Seatbelt)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗