logoalt Hacker News

kaibeetoday at 4:19 PM2 repliesview on HN

In my experience this is what Claude 4.5 (and 4.6) basically does, depending on why its grepping it in the first place. It'll sample the header, do a line count, etc. This is because the agent can't backtrack mid-'try to read full file'. If you put the 50,000 lines into the context, they are now in the context.


Replies

inetknghttoday at 6:06 PM

> If you put the 50,000 lines into the context, they are now in the context.

And you can't revert back to a previous context, and then add in new context summarizing to something like "the file is too large" with how to filter "there are too many unrelated lines matching '...', so use grep"?

Using output-limiting stuff first won't tell you if you've limited too much. You should search again after changing something; and if you do search again then you need to remember which page you're on and how many there are. That's a bit more complex in my opinion, and agents don't handle that kind of complexity very well afaik.

jtbaylytoday at 5:09 PM

Why can't the LLM/agent edit the context and dump that file if it decides it was dumb to have the whole thing in the context?