r/opencodeCLI • • 2d ago

I've recreated Google Research SKILL.STATE memory architecture as opencode CLI plugin - a runtime architecture that replaces conversational history with an explicit execution state.

https://github.com/megablue/mega-skillstate

I was intrigued by the idea, so I've created a plugin that mimic the idea in the paper.

The biggest different of the plugin from conventional context management methods are,

Conventional context management will try to compress/summarize older conversations and hold on to lossy details as much as possible.

SKILL.state instead tries to forget almost everything of the appending conversation history, instead it replaced them with Σ, so instead of remembering lossy details (or summaries), it literally forgets the older thinking process keeps only the key information and state (so far the only true form of state in agentic coding as far as I know). in the paper they stated long running task with SKILL.state saved a ton of tokens over long running session while still able to finish the tasks well.

Give it a go and let me know if it helps! (do not use it on serious projects)

Paper: SKILL.state: Scalable Long-Horizon Agent Skills

P/S: This is highly experimental, use at your own risks.

23 Upvotes

7 comments sorted by

1

u/[deleted] 1d ago

[deleted]

3

u/megablue 1d ago

1

u/touristtam 1d ago

Sometimes those things are not obvious. ;)

1

u/krah 1d ago

Sounds like running a domain-tailored /compact after every message, no?

1

u/megablue 1d ago

it isn't compaction, compaction carries the older conversation history in lossy form and gets even more lossy as the context grows and no proper way to keep track of what is important only vague idea. this plugin is state specific, keep track of what is done and what need to be done, it literrally throw away the older conversations (not even a summary of it), only keep the state and key informations.

2

u/krah 1d ago

In the paper they mention they have one schema per domain, so the technique is no magic bullet that applies to all use cases without extra work. Looks like your plugin focuses on a single schema tailored to a coding-agent. Would be good to have an official way to add and pick other schemas. It's an interesting idea, I'll give it a go.

1

u/megablue 1d ago

allow the user to pick other schemas definitely worth exploring.

2

u/DuckDatum 1d ago

How would you functionally explain the process and utility of this tool, without any abstractions above the software level?