[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:
- Repetitive permission prompts for every read/write operation
- "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
- Permission granted once should apply to subsequent operations on the same file
- "Accept all edits" should work consistently for all pending edits
- Dynamic route syntax files should be treated like regular
.astrofiles
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
- Start Claude Code in an Astro project
- Request to read/modify
src/pages/writing/[...path].astro - Observe permission prompt for read operation
- Generate multiple edits
- Use "Accept all edits" → works for first edit only
- Remaining edits require individual acceptance
- Any subsequent operation on the same
[...path].astrofile → 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗