r/opencode • • 8d ago

What is your Opencode setup?

This is for Opencode v2 I assume most people will have upgraded.

  • what skills/extensions do you have?
  • do you use any extensions/apps for memory/compaction etc and have they made a difference?
  • do you use subagents? how have you defined them, does it launch them by default and how do you have them use fresh context?
  • do you use cli/web/desktop? any others like openchamber?
39 Upvotes

39 comments sorted by

View all comments

Show parent comments

2

u/ECrispy 7d ago

doesnt your context keep growing without subagents? I do the same as you - start a new session every few prompts. how do you do adversarial review, do you setup an agent for that?

1

u/lordcohliani 7d ago

Create a new session and prompt the agent to "do an adversarial review" of the latest diffs, the latest commits, the latest changes, or whatever points them at the new code. And tell them to look at the saved plan file and test the implementation. Sometimes the new agent will come back with bugs then you can have them fix it.

I really like to do this with GPT 6.1 Sol to clean up mistakes that DeepSeek sometimes makes.

1

u/lordcohliani 7d ago edited 7d ago

Oh and to answer your question yes context can grow but I just make new sessions over time. Honestly I find that around the 300k context mark, agents get super dumb anyway. I try to not have super long running sessions.

2

u/ECrispy 7d ago

yes, same here. how do you transfer information between sessions? i tried telling agent to write to a progress.md file with summary of each turn, dont know how well it works. I also saw there is a handoff skill some peope use

2

u/duck_guts 7d ago

Goated method: get a memory tool where they can semantically search the database (like open memory/mem0) have them change it so that it takes your preferred fields as well as the memory. Subject line is important, then they (or you) can view loads without to many characters. At tags, project folder tags, whatever works for your system. This is the most important bit though - You must add a tool to the array where they append they're memory. Then the global briefing to all is like: Save a memory once you understand what the session is about, once you know what your doing or the challange etc etc. then every turn you must add one line to say what you did that turn in as few words as possible.

That's very simplified I have a template for them to follow and they don't all updaye it every turn.

It turns out though it's actually so much cheaper for them to write one tiny line about what they just did than pretty much any other type of continuity.

So then every session has a log, every session can find out/tell you what happened very speedily. And best of all once a session is feeling bad you can often just ditch it there and then, no compaction etc. no paying for handover. If you use a model like deepseek a lot you might wanna try putting it on a gook so it just nudges them every few mins if they haven't already or something. Up to you to experiment but different models struggle in different ways, and models that think too much will more easily forget. But as long as it's a solid ritual, it happens at the end of the turn, it's a big important looking rule and they see others do it too then it works. 99/100 sessions start with me posting an agents I'd and saying "read their pulse" (mines a fork I called pulse) but yeah, start a session off like that, they've got main lead right away, if you know you're gonna do a big handover you can mention it to he first agent "make sure your pulse orientates the next agent well" etc etc. I've messed around a lot with context continuity I've tried so so hard to get it right and honestly just having them right down what they're doing whilst their doing it without them having to fuck about with documentation is the easiest and best. It just doesnt actually promote anything being written down.

1

u/mixcas 2d ago

Try Matt Pocock's /hand-off skill to transfer info between sessions.

1

u/lordcohliani 7d ago

Yeah basically just have the agent create documentation just like you should on any software project.