[BUG] CLAUDE.md not loaded when modifying files in a different repo via absolute paths

Resolved 💬 2 comments Opened Apr 2, 2026 by Vtown121 Closed Apr 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When a session is rooted in repo A and modifies files in repo B via absolute paths, CLAUDE.md in repo B is never loaded or consulted. The model has no mechanism to detect it crossed a repo boundary and should check for new rule files.

This came up when working in a project worktree and modifying files in a separate plugin repo via absolute paths. The plugin repo has a CLAUDE.md with explicit instructions for registering new components in manifest files and updating documentation. None of those rules were followed because the CLAUDE.md was never loaded — the gap was only discovered after committing.

This is especially common with plugin development, where the plugin repo lives outside the main project directory.

What Should Happen?

When Claude modifies files in a directory that belongs to a different git repo, it should detect the repo boundary and load any CLAUDE.md files in that repo's root (and in the directories of the changed files). At minimum, the model should be prompted to check for rule files when it detects a .git directory in the path hierarchy that differs from the session's root.

Steps to Reproduce

  1. Have two repos, each with their own CLAUDE.md:
  • Repo A at /path/to/repo-a/ with CLAUDE.md saying "always run tests before committing"
  • Repo B at /path/to/repo-b/ with CLAUDE.md saying "update manifest.json when adding files"
  1. Start a Claude Code session in repo A
  2. Ask Claude to create a new file in repo B using an absolute path: "copy ./my-file.md to /path/to/repo-b/files/my-file.md and commit it"
  3. Claude will create the file and commit without following repo B's CLAUDE.md rules (e.g., won't update manifest.json)
  4. Repo B's CLAUDE.md was never loaded into the conversation context

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

1.0.33

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Terminal is Ghostty (not in dropdown). This edge case is particularly common when developing Claude Code plugins, since plugin repos typically live outside the main project directory (e.g., in ~/.claude/plugins/).

View original on GitHub ↗

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