[FEATURE] Be less afraid to ingest entire files into context with this one neat trick!
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
I had a thought. So these LLMs are paranoid about cluttering their context, so they make these overly-targeted file excerpt requests that DO (in my experience) end up missing important things and context which sometimes results in duplicated code or code that does not conform to the pattern established by the whole file. And I had an idea. The LLM should:
Proposed Solution
1) Just ingest the whole file into the context. But then:
2) SAY ALOUD the parts it needs to remember from it (that it was looking for in it) in a separate comment (i.e., "Found a function 'function_name' that looks like it does that around lines xxx-yyy, the calling convention is <<pattern>>")
3) Then, NEXT, REMOVE that whole file from the context history (or substitute it with something like <Claude scanned path/to/file>), leaving only the comment with the important thing(s) to remember from that file, in the "permanent" context
...Boom, best of both worlds? This will only temporarily (instead of repeatedly) stretch the context demand.
Alternative Solutions
I just force it to read entire files sometimes. Which is silly and also requires my interaction and attention.
Priority
High - Significant impact on productivity
Feature Category
Interactive mode (TUI)
Use Case Example
Scenario: A context was just compacted. Claude has now forgotten lots of details, and while I was away, has rewritten important functionality that was already completed. I come back and am dismayed.
With my idea: Important functionality is almost never rewritten because Claude is no longer afraid of TEMPORARILY ingesting large code files into context.
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗