UI normalizes file paths in tool call display, hiding actual parameter differences
UI displays normalized paths that hide actual differences in tool calls
Description
The Claude Code UI normalizes file paths in the tool call display by converting absolute paths like /home/lei/demo1/file.txt to ~/demo1/file.txt. This makes it appear that identical paths are being used when different paths are actually sent to tools, making debugging confusing.
Steps to Reproduce
- Use the Read tool with tilde path:
Read(file_path="~/demo1/CLAUDE.md") - Observe it fails with "Error reading file"
- Use the Read tool with absolute path:
Read(file_path="/home/lei/demo1/CLAUDE.md") - Observe it succeeds
- In the UI, both tool calls display as
Read(~/demo1/CLAUDE.md)even though different paths were sent
Expected Behavior
The UI should display the exact path parameter that was sent to the tool, without normalization. If the assistant sends /home/lei/demo1/CLAUDE.md, the UI should show that, not convert it to ~/demo1/CLAUDE.md.
Actual Behavior
The UI normalizes paths by converting /home/lei/ to ~, making it impossible to distinguish between:
Read(file_path="~/demo1/CLAUDE.md")(fails - tilde not expanded)Read(file_path="/home/lei/demo1/CLAUDE.md")(succeeds - absolute path)
Both display as Read(~/demo1/CLAUDE.md) in the UI.
Impact
- Makes debugging tool failures confusing
- Users cannot see what was actually sent to the tool
- Hides important differences in tool parameters that explain success/failure
Suggested Fix
Display the raw, unmodified parameter values that were sent to tools. Path normalization could be optional or shown as a tooltip.
Environment
- Claude Code CLI
- OS: Linux (WSL2)
- Observed with Read tool, likely affects other file-related tools
Related
This is specifically about the UI display of tool parameters, not the tool behavior itself. The Read tool correctly fails on ~ paths and succeeds on absolute paths - the issue is purely display/debugging.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗