[Bug] Dynamic route files in Astro projects

Resolved 💬 2 comments Opened Nov 10, 2025 by 0xtlt Closed Nov 10, 2025

Description

Files with dynamic route segments (e.g., [...path].astro) cause two major issues in Claude Code:

  1. Repetitive permission prompts for every read/write operation
  2. "Accept all edits" functionality breaks after first edit

Issues Observed

1. Repeated permission prompts

Every interaction with files containing square brackets requires individual confirmation:

  • Read operations: Read(src/pages/writing/[...path].astro) → permission prompt
  • Write operations: Same file, same prompt every time
  • No persistence of permissions across operations in the same session
2. "Accept all edits" breaks after first use
  • First edit: "Accept all edits" works
  • Subsequent edits: Button/command becomes non-functional
  • Must accept each remaining edit individually

Expected Behavior

  1. Permission granted once should apply to subsequent operations on the same file
  2. "Accept all edits" should work consistently for all pending edits
  3. Dynamic route syntax files should be treated like regular .astro files

Actual Behavior

  • Each file operation requires a new permission approval
  • "Accept all edits" only works once, then fails
  • Workflow severely disrupted when working with Astro dynamic routes

Steps to Reproduce

  1. Start Claude Code in an Astro project
  2. Request to read/modify src/pages/writing/[...path].astro
  3. Observe permission prompt for read operation
  4. Generate multiple edits
  5. Use "Accept all edits" → works for first edit only
  6. Remaining edits require individual acceptance
  7. Any subsequent operation on the same [...path].astro file → new permission prompt

Environment

  • Platform: macOS (darwin)
  • Terminal: Ghostty
  • Claude Code Version: 2.0.36
  • Feedback ID: 3203dae7-eb37-4ef9-9120-9c14dcffa296

Hypothesis

Square brackets [ ] in filenames may be:

  • Triggering glob pattern matching in file permission system
  • Escaping incorrectly in file path comparisons
  • Breaking the "remembered permissions" cache key matching

Impact

  • Severity: High for Astro projects
  • Dynamic routes are fundamental to Astro (and Next.js, SvelteKit, etc.)
  • Makes Claude Code nearly unusable for modern meta-frameworks
  • Forces constant manual intervention, defeating the purpose of autonomous coding

Workaround

None currently - must manually approve every operation

View original on GitHub ↗

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