Live data from Hacker News

Managing context on the Claude Developer Platform

anthropic.com

51–60 of 93 posts

Re: Managing context on the Claude Developer Platform

#51
post #38
post #36

I wish every instruction and response had a enable/disable checkbox so that I can disable parts of the conversation in such a way that it is excluded from the context. Let's say I submit or let it create a piece of code, and we're working on improving it. At some point I want to consider the piece of code to be significantly better that what I had initially, so all those initial interactions containing old code could…

I kind of do this, semi-manually when using the web chat UIs (which happens less and less). I basically never let the conversations go above two messages in total (one message from me + one reply, since the quality of responses goes down so damn quick), and if anything is wrong, I restart the conversation and fix the initial prompt so it gets it right. And rather than manually writing my prompts in the web UIs, I man…

I work similarly. I keep message rounds short (1-3) and clear often. If I have to steer the conversation too much, I start over.

I built a terminal tui to manage my contexts/prompts: https://github.com/pluqqy/pluqqy-terminal

Re: Managing context on the Claude Developer Platform

#52
post #36

I wish every instruction and response had a enable/disable checkbox so that I can disable parts of the conversation in such a way that it is excluded from the context. Let's say I submit or let it create a piece of code, and we're working on improving it. At some point I want to consider the piece of code to be significantly better that what I had initially, so all those initial interactions containing old code could…

> I like how Google AI Studio allows one to delete sections and they are then no longer part of the context. Not possible in Claude, ChatGPT or Gemini, I think there one can only delete the last response.

I have the same peeve. My assumption is the ability to freely edit context is seen as not intuitive for most users - LLM products want to keep the illusion of a classic chat UI where that kind of editing doesn't make sense. I do wish ChatGPT & co had a pro or advanced mode that was more similar to Google AI Studio.

Re: Managing context on the Claude Developer Platform

#53
post #34

Context editing is interesting because most agents work on the assumption that KV cache is the most important thing to optimise and are very hesitant to remove parts of the context during work. It also sometimes introduces hallucinations, because parts of the context are with the assumption that eg tool results are there, but theyre not. Example Manus [0]. Eg, read file A, make changes on A. Then prompt on some more…

Yes we had the same issue with our coding agent. We found that instead of replacing large tool results in the context it was sometimes better to have two agents, one long lived with smaller tool results produced by another short lived agent that would actually be the one to read and edit large chunks. The downside of this is you always have to manage the balance of which agent gets what context, and you also increase…

I found that having sub agents just for running and writing unit tests got me over 90% of my context woes

Re: Managing context on the Claude Developer Platform

#55
post #44
post #43

Earlier quoted context omitted.

Related, it feels like AI Studio is the only mainstream LLM frontend that treats you like an adult. Choose your own safety boundaries, modify the context & system prompt as you please, clear rate limits and pricing, etc. It's something you come to appreciate a lot, even if we are in the part of the cycle where Google's models aren't particularly SOTA rn

How are they not SOTA? They're all very similar with ChatGPT being the worst (for my use case anyway). Like adding lambdas and random c++ function calls into my vulkan shaders.

Gemini 2.5 pro is generally non-competitive with GPT-5-medium or Sonnet 4.5.

But never fear, Gemini 3.0 is rumored to be coming out Tuesday.

Re: Managing context on the Claude Developer Platform

#57
post #36

I wish every instruction and response had a enable/disable checkbox so that I can disable parts of the conversation in such a way that it is excluded from the context. Let's say I submit or let it create a piece of code, and we're working on improving it. At some point I want to consider the piece of code to be significantly better that what I had initially, so all those initial interactions containing old code could…

I exit and restart CC all the time to get a “Fresh perspective on the universe as it now is”.

Isn't /clear enough to do that? I know some permissions survive from previous sessions, but it served me well

Re: Managing context on the Claude Developer Platform

#58
post #34

Earlier quoted context omitted.

Yes we had the same issue with our coding agent. We found that instead of replacing large tool results in the context it was sometimes better to have two agents, one long lived with smaller tool results produced by another short lived agent that would actually be the one to read and edit large chunks. The downside of this is you always have to manage the balance of which agent gets what context, and you also increase…

I found that having sub agents just for running and writing unit tests got me over 90% of my context woes

this sounds like a good approach, i need to try it. I had good results with using context7 in specialized docs agent. I wasn't able how to limit MCP to a subagent, likely its not supported.

Re: Managing context on the Claude Developer Platform

#59
post #28

Earlier quoted context omitted.

Claude Code already compacts automatically.

I believe Codex CLI also auto compacts when the context limit is met, but in addition to that, you can manually issue a /compact command at any time.

Claude Code had this /compact command for a long time, you can even specify your preferences for compaction after the slash command. But this is quite limited and to get the best results out of your agent you need more than rely on how the tool decides to prune your context. I ask it explicitly to write down the important parts of our conversation into an md file, and I review and iterate over the doc until I'm happy with it. Then /clear the context and give it instructions to continue based on the MD doc.

Re: Managing context on the Claude Developer Platform

#60
post #36

I wish every instruction and response had a enable/disable checkbox so that I can disable parts of the conversation in such a way that it is excluded from the context. Let's say I submit or let it create a piece of code, and we're working on improving it. At some point I want to consider the piece of code to be significantly better that what I had initially, so all those initial interactions containing old code could…

I’ll be releasing something shortly that does this, plus more.
Post reply on HN