claude-code - 💡(How to fix) Fix [BUG] Context of selected lines doesn't gets attached for some file paths [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52792Fetched 2026-04-25 06:20:48
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

Error Messages/Logs

Code Example

I have attached a screenshot for reference.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

In claude code's vs code extension , while using nextjs as a framework, we often use [slug] pattern for dynamic routes. For any new file created inside that folder , if I select some lines , they are not being reflected as lines being selected in claude code extension.I even confirmed this by asking the model if it can see any lines selected.To which , it replied a clear no .

<img width="1918" height="1023" alt="Image" src="https://github.com/user-attachments/assets/44eff21f-b2fa-4db0-92e0-b2a782444a34" />

What Should Happen?

Lines selected should be reflected and passed to claude code.

Error Messages/Logs

I have attached a screenshot for reference.

Steps to Reproduce

Create a dynamic folder in nextjs framework with [slug] pattern. Create any new file inside it. Add some text and try to select that text and pass to claude code.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be mitigated by checking the Claude Code extension's configuration and ensuring it is properly integrated with the Next.js framework to reflect selected lines in dynamic routes.

Guidance

  • Verify that the Claude Code extension is correctly configured to handle dynamic routes with the [slug] pattern in Next.js.
  • Check the extension's documentation to see if there are any specific settings or workarounds for handling selected lines in dynamic routes.
  • Try selecting lines in a static route to see if the issue is specific to dynamic routes.
  • Test the extension with a different Next.js project to isolate if the issue is project-specific.

Notes

The issue may be related to how the Claude Code extension handles dynamic routes or selected lines, but more information is needed to determine the root cause.

Recommendation

Apply workaround: The user should try to configure the Claude Code extension to handle dynamic routes and selected lines, and if that doesn't work, try using a different approach to select and pass lines to the extension.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Context of selected lines doesn't gets attached for some file paths [1 participants]