9c573f1e3c
Decisions, environment quirks and pitfalls learned while working on AgentHub (docs/claude-memory/, indexed by MEMORY.md). Notes holding personal account details are left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
812 B
Markdown
11 lines
812 B
Markdown
---
|
|
name: claude-code-line-mention-syntax
|
|
description: Claude Code CLI attaches a line range only for @path#L<a>-<b>; @path#a-b silently attaches the whole file
|
|
metadata:
|
|
type: reference
|
|
---
|
|
|
|
Verified in the 2.1.293 binary on 2026-10-08. The parser is `^([^#]+)(?:#L(\d+)(?:-(\d+))?)?(?:#[^#]*)?$`, and Claude Code's own IDE builder emits `@path#L5-10 ` (with a leading space if the previous character is not whitespace). A `#5-10` fragment without the `L` is ignored, so the whole file is read. The VS Code docs show `@app.ts#5-10`, but that is only the extension's chat panel. The `@` must start the prompt or follow whitespace, and a path with spaces needs `@"path#L1-2"`. Codex treats `@path` as plain text.
|
|
|
|
AgentHub's Add to Chat (`LaneChangesPanel.tsx`) was fixed on 2026-10-08 to paste ` @path#La-b `.
|