[BUG] IDE detection incorrectly warns when IDE is open in subdirectory of workspace

Resolved 💬 3 comments Opened Aug 1, 2025 by haggbart Closed Aug 15, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • Claude CLI version: v1.0.65
  • Operating System: macOS
  • Terminal: any

Bug Description

When using Claude Code in a workspace where an IDE (WebStorm, Rider, etc.) is open in a subdirectory, it incorrectly warns that the IDE's workspace/project directory doesn't match the current working directory. This warning is overly restrictive for common development workflows like monorepos or projects with subdirectory-specific IDE instances.

Steps to Reproduce

  1. Open a project with subdirectories (e.g., a monorepo with /web and /api folders)
  2. Open WebStorm or another IDE in a subdirectory (e.g., cd web && webstorm .)
  3. From the project root, run claude and /ide
  4. Observe the warning: "Found 1 other running IDE(s). However, their workspace/project directories do not match the current cwd."

Expected Behavior

Claude Code should recognize that an IDE open in a subdirectory of the current workspace is related and not show a warning. The warning should only appear for IDEs open in completely unrelated directories.

Actual Behavior

Claude Code warns about any IDE whose working directory doesn't exactly match the current working directory, even when the IDE is working on a subdirectory within the same project.

Additional Context

This affects common development patterns:

  • Monorepos: Different IDEs for different packages (e.g., Nuxt app in /web, API in /api)
  • Performance: Opening only relevant subdirectories in IDEs for better performance
  • Multi-IDE workflows: Using specialized IDEs for different parts of a project

Example structure where this issue occurs:

my-project/
├── web/          # Nuxt app - WebStorm opened here
├── api/          # Backend API
└── shared/       # Running claude from project root

The IDE detection should allow:

  1. IDEs in subdirectories of the current directory
  2. IDEs in parent directories containing the current directory
  3. Only warn for truly unrelated directories

View original on GitHub ↗

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