Live data from Hacker News

Context is the bottleneck for coding agents now

runnercode.com

171–180 of 193 posts

Re: Context is the bottleneck for coding agents now

#171
post #163

Earlier quoted context omitted.

So you hold all that code context in your head at the same time? > If I need more, there is git, tickets, I can ask the person who wrote the code. What does this have to do with anything? Go ahead and ask the person. The notes the LLM writes aren’t for you they are for the LLM. You do you.

So you hold all that code context in your head at the same time? Yes. That is how every single piece of code has been writen since the creation of computers. Why you seem so surprised?

False. Nobody does this. They hold pieces of context and summaries in their head. Nobody on earth can memorize an entire code base. This is ludicrous.

When you read a function to know what it does then you move on to another function do you have the entire 100 line function perfectly memorized? No. You memorize a summary of the intent of the function when reading code. An LLM can be set up to do the same rather than keep all 100 lines of code as context.

Do you think when you ask the other person for more context he’s going to spit out what he wrote line by line. Not even he likely will remember everything he wrote.

You think anyone memorized Linux? You know how many lines of code is in the Linux source code. Are you trolling?

Re: Context is the bottleneck for coding agents now

#172

Earlier quoted context omitted.

That is not how the brain does it. We do take notes, we summarize our writings, that's a process. But the brain does not follow that primitive process to "scale".

We do. It’s just the format of what you remember is not textual. Do you remember what a 500 line function does or do you remember a fuzzy aspect of it? You remember a fuzzy aspect of it and that is the equivalent of a summary. The LLM is in itself a language machine so its memory will also be language. We can’t get away from that. But that doesn’t mean the hierarchical structure of how it stores information needs to…

I agree that the effect can look similar, we both end up with a compressed representation of past experiences.

The brain meaning-memorizes, and it prioritizes survival-relevant patterns and relationships over rote detail.

How does it do it, I'm not a neurobiologist, but my modest understanding is this:

LLM's summarization is a lossy compression algorithm that picks entities and parts that it deems "important" against its trained data, not only is lossy, it is wasteful as it doesn't curate what to keep or purge off accumulated experience, it does it against some statistical function that executes against a big blob of data it ingested during training. You could throw contextual cues to improve the summarization, but that's as good as it gets.

Human memory is not a workaround for a flaw. It doesn't use a hard stop at 128kb or 1mb of info, It doesn't 'summarize'.

it constructs meaning by integrating experiences into a dynamic/living model of the world, in constant motion. While we can simulate a hierarchical memory for an LLM with text summaries, it would be off simulation of possible future outcome (at best), not a replication of an evolutionary elaborated strategy to model information captured in a time frame, merged in with previously acquired knowledge to be able to then solve the upcoming survival purpose tasks the environment may throw at it. Isn't it what our brain is doing, constantly?

Plus for all we know it's possible our brain is capable of memorizing everything that can be experienced in a lifetime but would rather let the irrelevant parts of our boring life die off to save energy.

sure, in all case it's fuzzy and lossy. The difference is that you have doodling on a napkins on one side, and Vermeer paint on the other.

Re: Context is the bottleneck for coding agents now

#173

Earlier quoted context omitted.

A number of agentic coding tools do this. Upon an initial request for a larger set of actions, it will write a markdown file with its "thoughts" on its plan to do something, and keep notes as it goes. They'll then automatically compact their contexts and re-read their notes to keep "focused" while still having a bit of insight on what it did previously and what the original ask was.

Interesting. I know people do this manually. But are there agentic coding tools that actually automate this approach?

I've seen this behavior with Cursor, Windsurf, and Amazon Q. It normally only does it for very large requests from what I've seen.

Re: Context is the bottleneck for coding agents now

#175

Earlier quoted context omitted.

We do. It’s just the format of what you remember is not textual. Do you remember what a 500 line function does or do you remember a fuzzy aspect of it? You remember a fuzzy aspect of it and that is the equivalent of a summary. The LLM is in itself a language machine so its memory will also be language. We can’t get away from that. But that doesn’t mean the hierarchical structure of how it stores information needs to…

I agree that the effect can look similar, we both end up with a compressed representation of past experiences. The brain meaning-memorizes, and it prioritizes survival-relevant patterns and relationships over rote detail. How does it do it, I'm not a neurobiologist, but my modest understanding is this: LLM's summarization is a lossy compression algorithm that picks entities and parts that it deems "important" against…

>LLM's summarization is a lossy compression algorithm that picks entities and parts that it deems "important" against its trained data, not only is lossy, it is wasteful as it doesn't curate what to keep or purge off accumulated experience, it does it against some statistical function that executes against a big blob of data it ingested during training. You could throw contextual cues to improve the summarization, but that's as good as it gets.

No it's not as good as it gets. You can tell the LLM to purge and accumulate experience into it's memory. It can curate it for sure.

"ChatGPT summarize the important parts of this text remove things that are unimportant." Then take that summary feed it into a new context window. Boom. At a high level if you can do that kind of thing with chatGPT then you can program LLMs to do the same thing similar to COT. In this case rather then building off a context window, it rewrites it's own context window into summaries.

Re: Context is the bottleneck for coding agents now

#177

Earlier quoted context omitted.

> That sentiment will be the same for doctors, lawyers, etc., and personally, I won't put my life in the hands of any LLMs when it comes to finances, health, or personal well-being, for that matter. I mean, did you try it for those purposes? I have personally submitted an appeal to court for an issue I was having for which I would otherwise have to search almost indefinitely for a lawyer to be even interested into it…

You are not a doctor, lawyer, etc. You are responsible for yourself, not for others like doctors and lawyers who face entirely different consequences for failures.

AI is already being used both by lawyers and doctors so I am not sure what's the point you're trying to make. All I tried to say with my comment is that technology is very worthwhile and that ones ignoring it will be the ones at the loss.

Re: Context is the bottleneck for coding agents now

#178
post #31
post #14

There's a misunderstanding here broadly. Context could be infinite, but the real bottleneck is understanding intent late in a multi-step operation. A human can effectively discard or disregard prior information as the narrow window of focus moves to a new task, LLMs seem incredibly bad at this. Having more context, but leaving open an inability to effectively focus on the latest task is the real problem.

I think that's the real issue. If the LLM spends a lot of context investigating a bad solution and you redirect it, I notice it has trouble ignoring maybe 10K tokens of bad exploration context against my 10 line of 'No, don't do X, explore Y' instead.

So this is where having subagents fed specific curated context is a help.. As long as the "poisoned" agent can focus long enough to generate a clean request to the subagent, the subagent works posion-free. This is much more likely than a single agent setup with the token by token process of a transformer.

The same protection works in reverse, if a subagent goes off the rails and either self aborts or is aborted, that large context is truncated to the abort response which is "salted" with the fact that this was stopped. Even if the subagent goes sideways and still returns success (Say separate dev, review, and test subagents) the main agent has another opportunity to compare the response and the product against the main context or to instruct a subagent to do it in a isolated context..

Not perfect at all, but better than a single context.

One other thing, there is some consensus that "don't" "not" "never" are not always functional in context. And that is a big problem. Anecdotally and experimental, many (including myself) have seen the agent diligently performing the exact thing following a "never" once it gets far enough back in the context. Even when it's a less common action.

Re: Context is the bottleneck for coding agents now

#179
post #109
post #31

Earlier quoted context omitted.

I think that's the real issue. If the LLM spends a lot of context investigating a bad solution and you redirect it, I notice it has trouble ignoring maybe 10K tokens of bad exploration context against my 10 line of 'No, don't do X, explore Y' instead.

Not that this shouldn't be fixed in the model, but you can jump to an earlier point in claude code and on web chat interfaces to get it out of the context, just sometimes you have other important stuff you don't want it to lose.

The other issue with this is that if you jump back and it has edited code, it loses the context of those edits.. It may have previous versions of the code in memory and no knowledge of the edits leading to other edits that no longer align.. Often it's better to just /clear.. :/

Re: Context is the bottleneck for coding agents now

#180
post #38

Earlier quoted context omitted.

I'm curious about it too. I think there are two bottlenecks, one is that training a relatively large LLM can be resource-intensive (so people go for RAGs and other shortcuts), and making it finetuned to your use cases might make it dumber overall.

> making it finetuned to your use cases might make it dumber overall. LoRa doesn't overwrite weights.

Do you need to overwrite weights to produce the effect I mentioned above?
Post reply on HN