[DOCS] @-mention anchor fragment syntax (`@file.md#section`) is undocumented
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/interactive-mode
https://code.claude.com/docs/en/common-workflows
Section/Topic
File reference / @-mention documentation across multiple pages
Current Documentation
The # suffix for @-mentions is only documented for line ranges in IDE contexts:
In vs-code.md and ide-integrations.md:
UseOption+K/Alt+Kto add a file reference with a line range:@app.ts#5-10
In jetbrains.md:
@File#L1-99
In interactive-mode.md, the @-mention is described minimally:
| @ | File path mention | Trigger file path autocomplete |
In common-workflows.md, the "Use @ to quickly include files" section shows basic file and directory references but no anchor fragment examples.
What's Wrong or Missing?
v2.1.41 fixed file resolution failing for @-mentions with anchor fragments (e.g., @README.md#installation). This implies the feature exists but was broken — and it's not documented anywhere.
The # suffix has two distinct meanings depending on context:
- Line ranges (IDE):
@file.ts#5-10— documented - Section/heading anchors (terminal + IDE):
@file.md#installation— not documented
Users have no way to discover that they can reference specific sections of markdown files using heading anchors. The documentation only covers the line-range variant.
Suggested Improvement
- Add anchor fragment syntax to the
common-workflows.md@-mention section:
Reference a specific section: ``@README.md#installation @docs/api.md#authentication`Use#` followed by a heading anchor to reference a specific section of a markdown file.
- Update the
interactive-mode.mdquick commands table to note both uses:
|@| File path mention | Trigger file path autocomplete. Supports#line-rangeand#heading-anchorsuffixes |
- Clarify the distinction between line ranges (
@file.ts#5-10) and heading anchors (@file.md#section-name) in the IDE-specific pages.
Impact
Medium - Makes feature difficult to understand
Additional Context
- Fixed in v2.1.41 (released 2026-02-13): "Fixed file resolution failing for @-mentions with anchor fragments (e.g.,
@README.md#installation)" - The fix description itself confirms the syntax
@file.md#sectionis intentionally supported, not accidental - PDF page ranges are documented in
vs-code.mdas another#suffix variant, further suggesting this family of syntax should be comprehensively documented
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗