One feature I got to implement in OpenCode 2.0 was allowing for HOT CONTEXT¹ without busting the…
@kitlangton31K followers
112,900 views
41 Comments
Comments from the original post on X (Twitter)

@kitlangton
obligatory @samwhoo link
93 likes

@zebassembly
@opencode This is smart but also I'm distracted by this really nice looking demo ui
32 likes

@kitlangton
@opencode 🥰 aw, thank ye zeb!
11 likes

@beginbot
@opencode wait HOT LOCAL CONTEXT??? in my AREA???
16 likes

@alan__rice
@opencode crazy they hired the same narrator as effect institute
6 likes

@RhysSullivan
@opencode great explanation
5 likes

@apunlisted
@opencode your demos are always the best holy
5 likes

@kitlangton
@opencode 😳 😍
6 likes

@samwhoo
@opencode How did you evaluate that this way of updating context values doesn’t affect the quality of the LLM’s replies?
5 likes

@anderslie
@opencode pretty cool! though makes you wonder in what cases you might just want to intentionally change the prefix rather than append deltas, e.g. if you are on a provider with known low cache ttl, or if returning to a session after a long time
4 likes

@kitlangton
@opencode Yeah! If we have that information about the provider/model we can squash everything back into the prompt. I’ll look into this :)
6 likes

@mprado
@opencode We built something very similar for our own internal harness. Lovely representation though, will share with my team bc it makes understanding the concept a lot easier lol
1 like

@tomlparser
@opencode Very intuitive demo
1 like

@dev_alade
@opencode Nice UI is that openTUI ?
1 like

@GjermundGaraba
@opencode
1 like

@antoinecojp
@thdxr @opencode I wish opencode app would make cache easier to understand in general. Like if messages hit or miss cache, why (ttl, change of system prompt). Also knowing how much requests cost at message level would be sooo good to self improve.
1 like

@aman_yadav07
I use a simpler version of this for my personal agent, I keep the system prompt stable, then inject dynamic context right before the latest user turn. That gives me cache hits up to that point. It also works well for reminders and temporary instructions, since the context is recent and the LLM is more likely to follow them. The tradeoff is that on the next turn, I pay again for the previous turn’s new content, but I think it’s a nice tradeoff for the simplicity and cache efficiency.
1 like

@BilwarAmaan
@opencode very interesting
1 like

@manavvnotop
@opencode very interesting. learned something new today
1 like

@FaulknerPearce
@opencode Cc @gubatron















