[Bug] Path Handling: Tilde Expansion and Inconsistent Path Resolution
Resolved 💬 6 comments Opened Sep 14, 2025 by JDIVE Closed Jan 9, 2026
Bug Description
Bug Report: Path Display Inconsistency and Missing Tilde Expansion
Title: UI displays tilde paths while tools use absolute paths, plus tools lack tilde expansion support
Description:
Claude Code has two related path handling issues:
- The UI shows tilde paths (e.g., ~/.claude/context/CLAUDE.md) but tools actually use absolute paths (/Users/username/.claude/context/CLAUDE.md) behind the scenes
- The tools themselves (Read, Write, Edit, etc.) cannot expand tilde paths, requiring hardcoded absolute paths
Steps to Reproduce:
- Use Read tool with a tilde path like ~/.claude/context/CLAUDE.md
- Observe the UI display shows the tilde path
- Check that the read actually succeeds (due to behind-the-scenes expansion)
- Try to use tilde paths directly in tool calls - they fail
- Note the disconnect between displayed paths and execution requirements
Expected Behavior:
- Tools should natively support tilde expansion (~ → /Users/username on Mac, /home/username on Linux)
- UI should accurately reflect the paths being used
- Cross-platform compatibility should be maintained
Actual Behavior:
- UI displays: Read(~/.claude/context/CLAUDE.md)
- Tool actually requires: /Users/username/.claude/context/CLAUDE.md
- Tools fail if given actual tilde paths
- Forces hardcoding platform-specific absolute paths
Impact:
- Cross-platform compatibility issues: Hardcoded /Users/username/ paths break on Linux systems
- User confusion: UI shows tilde paths that don't actually work in tools
- Debugging difficulties: Inconsistency between displayed and required paths
- Maintenance burden: Need separate path configurations for Mac vs Linux
- Portability problems: Configurations can't be shared across platforms
Use Case:
Users want to write portable configurations using ~/.claude/context/ that work on both Mac (/Users/username/.claude/) and Linux (/home/username/.claude/) without
hardcoding platform-specific paths.
Environment:
- Working directory: /Users/username/projects/ProjectName/.claude
- Platform: macOS (Darwin 24.6.0)
Suggested Fix:
- Add native tilde expansion support to all file tools (Read, Write, Edit, etc.)
- Either show actual resolved paths in UI or add visual indicator for path expansion
- Ensure consistent behavior between UI display and tool execution
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 1.0.113
- Feedback ID: 5c1c1951-2b60-49ca-b1e6-84d489ace357
Errors
[]This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗