claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

`ide_opened_file` context not updating for files in folders with Svelte optional parameter syntax

Open JackNeto opened this issue 1 week ago • 1 comments

Preflight Checklist

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

What's Wrong?

The ide_opened_file context in Claude Code does not update when opening files inside folders that use Svelte optional parameter syntax with double square brackets (e.g., [[param_name]]).

The ide_opened_file context remains stuck on the previously opened file and does not update when switching to files in the [[job_post_id]] folder.

What Should Happen?

When opening a file in src/routes/sourcing/[[job_post_id]]/+page.svelte, the ide_opened_file context should update to reflect this file path.

Error Messages/Logs


Steps to Reproduce

  1. Open a Svelte project that has a route folder using optional parameter syntax: src/routes/sourcing/[[job_post_id]]/
  2. Open any file in a different folder (e.g., src/routes/admin/+page.svelte)
  3. Verify that Claude Code receives the correct ide_opened_file context
  4. Open a file inside the bracketed folder (e.g., src/routes/sourcing/[[job_post_id]]/+page.svelte)
  5. Observe that Claude Code's ide_opened_file context does not update - it shows the previously opened file instead

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.28 (Claude Code)

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • This issue is specific to folders with square brackets in the path
  • Opening files in other folders works correctly (e.g., src/routes/admin/+page.svelte updates context properly)
  • The single and double square brackets [[param_name]] are valid Svelte syntax for optional route parameters

JackNeto avatar Dec 12 '25 16:12 JackNeto


Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8451
  2. https://github.com/anthropics/claude-code/issues/8559
  3. https://github.com/anthropics/claude-code/issues/11317

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 12 '25 16:12 github-actions[bot]

This issue has been automatically closed as a duplicate of #8451.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 16 '25 09:12 github-actions[bot]