Skip navigation
One feature I got to implement in OpenCode 2.0 was allowing for HOT CONTEXT¹ without busting the…
0:00 / 4:05

One feature I got to implement in OpenCode 2.0 was allowing for HOT CONTEXT¹ without busting the…

Kit Langton

@kitlangton31K followers

Visit on X
783 likesDownloadOriginal post

112,900 views

One feature I got to implement in OpenCode 2.0 was allowing for HOT CONTEXT¹ without busting the cache. Here's me explaining how it works ↓ ¹ ⁿᵒᵗ ᵃ ᵗᵉʳᵐ

41 Comments

Comments from the original post on X (Twitter)

  • Kit Langton's profile picture

    @kitlangton

    obligatory @samwhoo link

    93 likes

  • zeb's profile picture

    @zebassembly

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

    32 likes

  • Kit Langton's profile picture

    @kitlangton

    @opencode 🥰 aw, thank ye zeb!

    11 likes

  • beginbot 🃏's profile picture

    @beginbot

    @opencode wait HOT LOCAL CONTEXT??? in my AREA???

    16 likes

  • Alan Rice's profile picture

    @alan__rice

    @opencode crazy they hired the same narrator as effect institute

    6 likes

  • Rhys's profile picture

    @RhysSullivan

    @opencode great explanation

    5 likes

  • AP's profile picture

    @apunlisted

    @opencode your demos are always the best holy

    5 likes

  • Kit Langton's profile picture

    @kitlangton

    @opencode 😳 😍

    6 likes

  • Sam Rose's profile picture

    @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

  • Anders Lie's profile picture

    @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

  • Kit Langton's profile picture

    @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

  • Marcelo Prado's profile picture

    @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

  • Jason Cameron's profile picture

    @tomlparser

    @opencode Very intuitive demo

    1 like

  • Alade Yessoufou's profile picture

    @dev_alade

    @opencode Nice UI is that openTUI ?

    1 like

  • Gjermund Garaba's profile picture

    @GjermundGaraba

    @opencode

    1 like

  • Antoine's profile picture

    @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's profile picture

    @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

  • Amaan's profile picture

    @BilwarAmaan

    @opencode very interesting

    1 like

  • manavv's profile picture

    @manavvnotop

    @opencode very interesting. learned something new today

    1 like

  • Austin's profile picture

    @FaulknerPearce

    @opencode Cc @gubatron