[Critical] /init command causes Explore agent to read files from unrelated project directories

Resolved 💬 1 comment Opened May 22, 2026 by cho68518 Closed Jun 22, 2026

Bug Description

When running /init in an empty project directory, the Explore subagent autonomously navigated to a completely unrelated sibling project directory and read its source files without any authorization or user consent.

Steps to Reproduce

  1. Open Claude Code in an empty project directory (e.g., C:\Work\LogisticManagerWeb)
  2. Run /init
  3. Observe that the Explore agent, finding the target directory empty, traverses the parent directory (C:\Work\) and begins reading files from an unrelated sibling project (C:\Work\LogisticManager4)

Expected Behavior

The /init command should recognize the directory is empty and either:

  • Report "no files to analyze" and stop, or
  • Ask the user what kind of project they want to create

Actual Behavior

The Explore agent reads source code files from an entirely different, unrelated project on the same machine without user consent or authorization.

Why This Is Critical

  • Cross-project data leakage: Code from one project is exposed to a session opened in a different project context.
  • No user authorization: The agent autonomously accessed files the user never indicated it should read.
  • Privacy/security violation: In a professional environment, different projects may belong to different clients or contain proprietary code. This behavior violates project isolation.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Claude Code (claude-sonnet-4-6)
  • Working directory: empty folder (C:\Work\LogisticManagerWeb)
  • Unauthorized access to: sibling directory with existing project (C:\Work\LogisticManager4)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗