[BUG] File paths with parentheses (Next.js route groups) break terminal clickability in diff/edit output
Resolved 💬 3 comments Opened Mar 12, 2026 by cherijs Closed Apr 10, 2026
Description
When working with Next.js App Router projects that use route groups (e.g., (dashboard)), file paths displayed in Claude Code's diff/edit output break terminal link detection. The parentheses cause terminals to truncate the clickable path at the ( character.
Steps to Reproduce
- Have a Next.js project with route groups like
src/app/(dashboard)/ - Edit any file inside the route group
- Observe the file path shown in the diff output
Expected Behavior
The full file path should be clickable in the terminal, e.g.:
frontend/apps/dashboard/src/app/(dashboard)/invoices/new/invoice-create-form.tsx
Actual Behavior
The terminal interprets ( as the end of the clickable region. The path breaks visually and functionally — clicking opens nothing or only the partial path up to (dashboard.
Environment
- macOS (Darwin 25.3.0)
- Terminal: standard macOS terminal / iTerm2
- Next.js App Router with
(dashboard)route group
Suggested Fix
Escape or encode parentheses in file paths when rendering output, or use OSC 8 hyperlinks (ref #13008) with properly escaped file:// URIs where ( → %28 and ) → %29.
Related Issues
- #1791 — Route group autocomplete
- #5204 — File indexing with special characters
- #13008 — OSC 8 hyperlinks feature request
- #20823 — Long URLs unclickable when wrapped
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗