[FEATURE] Use relative-paths on built-in READ-related tools when adding to context
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Basically, I noticed that each path is returned to claude by absolute path, instead of relative.
In addition, I found out that this is NOT limited to results, but permanent file-read operations as well.
This causes an extreme amount of waste when it comes to input tokens, significantly impacting the model's ability to work with the context. The performance impact is visible in BOTH Sonnet and Haiku -- with long file paths, sometimes Sonnet might even forget that a file is in context, and go ahead to re-read it.
Proposed Solution
I'd like an option to "use relative path" instead of "full path" for internal stuff like "Read" -- would save literally millions of input tokens per session :/
Claude CLI's tools should be able to convert relative results from and to full paths.
Alternative Solutions
I currently find myself replacing Claude Code's built-in tools with my custom toolkits.
Moving projects to some drive-level workspace (e.g. Z:/) to save tokens is a viable workaround as well.
Both these workarounds work, but are both FAR from optimal!
- It's not really feasible to move projects around just to escape this.
- My inhouse tool can't possibly match the tools and system prompts that Claude was trained to respond best to.
Priority
High - Significant impact on productivity
Feature Category
File operations
Use Case Example
No response
Additional Context
It's not 100% related to the request, but this is the CLI tool I had to code to get past the spam from the screenshot above:
I also had to disable the "Glob" tool completely, and write skills that point to my tool instead.
Basically what this solves is:
- Single full-project file-read instead of tons of small reads
- Prevent bloating the context with full filepaths each time Claude wants to read something
- Prevent bloating the context with unwanted files present in
[obj, .vs, bin]folders that Glob returns anyway
The UI version of this tool (including the code) can be found here: https://github.com/Lyrcaxis/FilesDropper/ Also attaching the ignore patterns of my preference: IgnoredExtractPatterns.json
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.