[DOCS] @-mention anchor fragment syntax (`@file.md#section`) is undocumented

Open 💬 7 comments Opened Feb 13, 2026 by coygeek

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:

Use Option+K / Alt+K to 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:

  1. Line ranges (IDE): @file.ts#5-10 — documented
  2. Section/heading anchors (terminal + IDE): @file.md#installationnot 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

  1. 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.
  1. Update the interactive-mode.md quick commands table to note both uses:
| @ | File path mention | Trigger file path autocomplete. Supports #line-range and #heading-anchor suffixes |
  1. 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#section is intentionally supported, not accidental
  • PDF page ranges are documented in vs-code.md as another # suffix variant, further suggesting this family of syntax should be comprehensively documented

View original on GitHub ↗

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