Claude Code v1.0.120 creates unwanted 'data' directory in CWD on every launch

Resolved 💬 3 comments Opened Sep 21, 2025 by shayonpal Closed Jan 8, 2026

Bug Description

Claude Code CLI creates an empty data directory in the current working directory every time it starts, even without any user interaction. This happens with the raw command, not caused by user configuration or aliases.

Reproduction Steps

  1. Navigate to any directory: cd /any/directory
  2. Run Claude: claude or even just pipe input: echo "test" | claude
  3. Observe that a data directory is immediately created

Expected Behavior

Claude should not create any directories in the current working directory without explicit user action or configuration.

Actual Behavior

  • An empty data directory is created in CWD on every launch
  • Sometimes also creates other files (e.g., test.txt) based on input

Environment

  • Claude Code version: 1.0.120
  • OS: macOS Darwin 25.0.0 (Darwin Kernel Version 24.0.0)
  • Platform: darwin (arm64)
  • Installation method: npm global (npm i -g @anthropic-ai/claude-code@latest)
  • Node version: Managed via nvm
  • First observed: September 10, 2025

Additional Context

  • Directory is always empty (no files inside)
  • Happens even with --dangerously-skip-permissions flag
  • Not caused by MCP servers or user configuration
  • Verified with raw command: /opt/homebrew/bin/claude
  • Issue persists across different directories
  • No public reports found for this specific issue

Debug Information

Running with --debug flag doesn't show any explicit directory creation logs, suggesting this might be an unintended side effect.

Impact

This bug pollutes the user's working directory with unwanted folders, which is particularly problematic in:

  • Git repositories (requires adding to .gitignore)
  • Clean project directories
  • Automated workflows

Tested Workarounds

Currently using shell alias workaround:

alias claude='claude "$@" && rmdir data 2>/dev/null'

But this should be fixed at the source.

View original on GitHub ↗

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