Claude Code accessing files in another project directory

Can Claude Code Read Other Project Files? How to Grant Access Safely

Quick answer

  • Yes—Claude Code can read files from another project, but it normally starts with the directory where it was launched. Add or grant the other project directory explicitly, such as with –add-dir, and then reference the files.
  • Launch Claude Code from a parent directory containing both projects, where appropriate.
  • Use the –add-dir option to add the other project directory to the session.
  • Explicitly tell Claude Code which files or directory to inspect after access has been granted.
  • Use project-level settings only when the relevant Claude Code version/documentation supports that configuration.

Yes—Claude Code can read another project’s files, but it starts with its launch directory. Explicitly add or grant the other directory, such as with --add-dir.

After access is granted, reference the specific external file or folder you want Claude Code to inspect. It does not automatically scan every project or local file on your computer.


How Claude Code’s File Access Works

Claude Code normally begins with the project or working directory associated with the session. Files within that available scope can be read when you identify them in your request.

A separate project requires explicit access. The other directory must be added, referenced, mounted, configured, or otherwise permitted for the current session. Simply having the project on the same computer is not enough. For a focused explanation of when Claude Code can access files beyond the current project, see access files outside your project.


How to Add Another Project

1. Launch from a Suitable Parent Directory

If both projects are inside one suitable parent directory, you can launch Claude Code from that parent when the broader scope is appropriate. This can make both folders available within one working-directory context, but it also exposes a wider scope than using one project alone.

2. Add the External Directory

For a project in a separate location, use the external-directory method supported by your installed version of Claude Code. The commonly used option is --add-dir; verify its current syntax and behavior in the official documentation for your version.

claude --add-dir /absolute/path/to/other-project

This is a version-qualified setup pattern, not a universal command guarantee. Project-level settings may also be available when documented for your installation.

3. Request the Specific File

Once the directory is available, tell Claude Code which project and file to inspect. For example, identify the external project path and name the file or subfolder you need.

Use an explicit or absolute path when the supported workflow allows it. A specific file request is clearer and safer than asking Claude Code to search broadly across your computer.


CLAUDE.md Does Not Grant Filesystem Access

CLAUDE.md files provide project instructions and context. They can explain how a project should be handled, but instruction loading is separate from filesystem access.

A CLAUDE.md file does not, by itself, give Claude Code arbitrary access to another project directory. If it mentions an external path, that path still must be available through the relevant directory, configuration, reference, mount, or permission mechanism.

Instruction-file behavior can depend on the installed version and setup. Do not treat the presence of CLAUDE.md as permission to read unrelated folders.


Permissions and Safer Access

Making a directory available does not automatically define every operation Claude Code can perform. Reading, creating, editing, moving, or deleting files depends on the configured tools, permissions, and approvals.

  • Read: grant access only to the project or folder containing the files you need.
  • Edit or create: allow modification only when the task requires it.
  • Move or delete: verify the session’s permissions and approvals before allowing higher-impact operations.

Prefer the narrowest available scope, and use read-only access when modification is unnecessary. Avoid adding an entire drive or user directory, especially when it contains credentials, environment files, private keys, or other sensitive data. For a broader guide to permitted files, scopes, and operations, see the Claude Code file access guide.


Keep Two-Project Workflows Clear

Keep the projects in separate directories and state which project Claude Code should inspect. Where practical, use one project per session or separate sessions for unrelated work. This helps avoid confusion between project instructions, similarly named files, and different codebases.

Claude Desktop, Cowork, and MCP-based filesystem tools use separate access mechanisms. Their folder, connection, or permission settings do not automatically apply to Claude Code. If the filesystem access comes through a local MCP tool, review how to secure local MCP servers.


Troubleshooting External Project Access

  • Confirm that the external project path is correct and has not been moved or renamed.
  • Use an absolute path when the installed workflow supports it.
  • Check that the directory was actually added, configured, mounted, or permitted for the current session.
  • Ask for a specific file or folder instead of a broad computer-wide search.
  • Verify your Claude Code version and the current official documentation before relying on --add-dir or settings-based configuration.

Bottom Line

Claude Code can read files from another project, but the other directory must be explicitly made available. It does not automatically read every project on your computer, and CLAUDE.md supplies instructions or context rather than arbitrary filesystem permission. Add only the scope you need, then reference the specific external file or folder.