← All projects
Project record1 mention
Originally shared on Hacker News

context bonsai

A tool that gives LLM harnesses the ability to surgically edit their conversation context. Messages can be removed either by natural-language instruction or by message ID ranges, with each removal leaving behind a summary and keywords. A companion retrieve tool can pull original removed messages back into context when the LLM decides they are useful again.

Last shared
01 / The problem

What it addresses

Keeps LLM context windows small and focused by proactively removing content that is no longer useful, staying ahead of autocompaction.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. context bonsai

    A tool that gives LLM harnesses the ability to surgically edit their conversation context. Messages can be removed either by natural-language instruction or by message ID ranges, with each removal leaving behind a summary and keywords. A companion retrieve tool can pull original removed messages back into context when the LLM decides they are useful again.

    Problem: Keeps LLM context windows small and focused by proactively removing content that is no longer useful, staying ahead of autocompaction.

    Posted by @planckscnst · Original source ↗

    Source text · @planckscnst · · Source ↗

    My favorite is what I call "context bonsai" where I'm giving LLM harnesses the ability to surgically edit the context. It's available as a tool. You can say "remove that failed debugging session and write a summary of what we learned." Or you can take a more hands-on approach and say "remove messages msg_ID1 through msg_ID2". The removal leaves a summary and keywords, and the original messages can be pulled back into context if the LLM thinks they're useful.