Hacker News new | ask | show | jobs
by jdiff 31 days ago
Even modern frontier models benefit so hugely from careful context pruning, maintenance, and rewriting to erase mistakes that it's astonishing to me that there are no tools centered around it. The one tool that used to have such a feature, Zed and its retroactively-named Text Threads, has now stripped itself of it.
2 comments

this! the back-and-forth chat interface where you can edit only your own messages, and only then to get a new response, is a terrible one, but I think favored by vendors because it helps them fight in vain against prompt injection. Custom harnesses and stuff are nice but incredibly time consuming to set up when all I want to do is like, see what the agent is reading, and editing out some irelevant nonsense side quest it went on, or trim some massive log file it read which filled 90% of its context. Theres no inherent reason behind some caching gains that these things must be strictly chronological - a response it gave me previously does not have to be part of the context now
"some caching gains" is a pretty huge understatement- snipping something out of the middle of the window requires rebuilding the entire context. Thats a shitload of tokens.

Afaik messing with the context also pretty reliably degrades performance still. The model responses reference things that no longer exist to it and it becomes more chaotic.

The real usefulness of parallel or sub-agents is not that they run at the same time, its that they isolate noisy or self-contained context away from the main window.

I still feel that during agentic workload sometimes it would be nice to have the model identify it is veering off the main track, send out a "keep the cached states and tell me which they are" command to the inference server, do the side thing (such as handling an error that plopped up that has not that much to do with the main task) and return back to the cached state with just a comment tacked at the end to say "oh and btw I fixed DNS" instead of having the DNS debugging inside the context window now. Maybe other harnesses just steer the models more towards using subagents for such tasks and my pi is misconfigured. I can use the tree feature, but having insight into what's cached would be nice there.
You can structure your context window to minimize the amount of editing you do further back. You usually only need to edit and correct the most recent response. It's little different from forking the conversation at an earlier point, and nobody warns about that being a sneaking footgun. There is still a prefix to cache.
No reason other than you're giving user's a cost footgun? That's a pretty good reason.
Local models benefit disproportionately from this kind of pruning and have no such footgun.
This is why I prefer Pi over all other agent harnesses. It has a tree view of each conversation and it's easy to move between branches.