Symlinked rules files in ~/.claude/rules/ not loaded into context

Resolved 💬 3 comments Opened Feb 15, 2026 by maoertel Closed Feb 15, 2026

Bug Description

Rules files placed as symlinks in ~/.claude/rules/ are not loaded into the agent's context, even when the symlink target exists and the conditional paths frontmatter matches the files being worked on.

Steps to Reproduce

  1. Create a rules file at an external location, e.g. ~/Documents/Projekte/claude/rules/rust.md
  2. Symlink it into the user-level rules directory:

``bash
ln -s ~/Documents/Projekte/claude/rules/rust.md ~/.claude/rules/rust.md
``

  1. The file contains conditional paths frontmatter:

```markdown
---
paths:

  • "**/*.rs"
  • "**/Cargo.toml"
  • "**/Cargo.lock"

---

# Rust

## Error Handling

  • No panics in production code: Never use .unwrap() or .expect() in runtime/production code.

...
```

  1. Open a Rust project and start editing .rs / Cargo.toml files
  2. The rules from the symlinked file are not present in the agent's context

Expected Behavior

The symlinked rules file should be resolved and loaded into context when working with files matching the paths globs, as documented.

Actual Behavior

The rules file is not loaded. The agent is unaware of the rules (e.g. used .expect() in production code despite the rule explicitly prohibiting it).

Environment

  • OS: macOS (Darwin 25.2.0, aarch64)
  • Shell: zsh
  • Symlink: ~/.claude/rules/rust.md -> ~/Documents/Projekte/claude/rules/rust.md
  • Symlink target exists: yes
$ ls -la ~/.claude/rules/
lrwxr-xr-x  1 user  staff  60 Feb 14 07:38 rust.md -> /Users/user/Documents/Projekte/claude/rules/rust.md

View original on GitHub ↗

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