← Back to context

Comment by gwd

6 days ago

Like it a lot so far!

After a brief play last night, the biggest feature of aider I miss is more control over the context window -- saying "/clear" to re-start the conversation from scratch, or specifying files to add or remove as they become relevant or irrelevant. Not clear how much or how long files stay in the context window.

The other question I have is whether you use Anthropic's "prompt caching" [1] to reduce the cost of the long conversation?

[1] https://docs.anthropic.com/en/docs/build-with-claude/prompt-...

curious why /clear instead of making a new session?

and nothing expires out from the session until you get near the context window max - at which point we do a compaction process

  • I don't think I realized how the sessions worked; It looks like /new would get pretty close. One of the things /clear does in aider is clear the chat history but not the files you've added (which are always done manually).

    Again the theme of the difference is control over the context: partly for cost management, partly because the quality tends to degrade with the length of the context.

    But it may be that the main thing needed is just a change of workflow. So far I am finding opencode's ability to find things out for itself quite refreshing.

    • > partly because the quality tends to degrade with the length of the context.

      And as if to emphasize this, I was using opencode this morning with Sonnet; but once the context window got up close to 100k, only about 30% through implementing a new feature (which doesn't seem that large to me), it repeatedly failed with "Error: oldString not found in content or was found multiple times", which I take to mean that it wasn't generating patches in the right format.

      This isn't the first time this has happened to me. Maybe my code is just more complicated than other people's, so it gets confused more easily. But having tools to manage the complexity the LLM is exposed to has been critical to making it useful.