opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[BUG] Compactation Fails Agent forgets everything

Open dhruvkej9 opened this issue 1 week ago • 10 comments

Description

The /compact and auto compact fails.

Plugins

"oh-my-opencode@beta",     "opencode-antigravity-auth@beta",     "@plannotator/opencode@beta",     "@franlol/[email protected]",     "@tarquinen/opencode-dcp@latest",     "@mohak34/opencode-notifier@latest"

OpenCode version

1.1.12

Steps to reproduce

  1. Run Sisyphus agent with Claude opus 4.5 High think (Antigravity)
  2. Manual/Auto Compact fails when context is near to full (90% in my case)

Screenshot and/or share link

Image

Operating System

WSL Ubuntu 24.04

Terminal

Windows Terminal

dhruvkej9 avatar Jan 14 '26 07:01 dhruvkej9

This issue might be a duplicate of existing issues. Please check:

  • #6286: Compaction Failing to Run on Time
  • #6068: Auto compaction not triggering reliably with Anthropic models
  • #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur in agent workflows
  • #2945: Session automatically compacted, destroying the entire working context
  • #3031: Model in BUILD mode does not have enough context to continue after compaction
  • #2234: compact causes llm to forget convo
  • #5934: Session Todo-list is forgotten after compaction
  • #6535: Auto-compaction causes the subagent to lose its original context, possibly the system prompt as well
  • #8349: Model selection is "lost" on continuation and Agent selection is "lost" on compaction

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Jan 14 '26 07:01 github-actions[bot]

Weird, my OpenCode is smart enough to clear drop cache of context to recover memory and continues to work. I am using desktop OpenCode. You should probably upgrade to 1.1.19 and stop wasting time on 1.1.12.

super-unique-ai avatar Jan 14 '26 07:01 super-unique-ai

Weird, my OpenCode is smart enough to clear drop cache of context to recover memory and continues to work. I am using desktop OpenCode. You should probably upgrade to 1.1.19 and stop wasting time on 1.1.12.

1.1.19 Have serious bugs when using GitHub copilot, it consumes multiple premium requests & has wiped out monthly credits of many people

dhruvkej9 avatar Jan 14 '26 07:01 dhruvkej9

Weird, my OpenCode is smart enough to clear drop cache of context to recover memory and continues to work. I am using desktop OpenCode. You should probably upgrade to 1.1.19 and stop wasting time on 1.1.12.

1.1.19 Have serious bugs when using GitHub copilot, it consumes multiple premium requests & has wiped out monthly credits of many people

Thanks for letting me know. 1.1.16 works well. 1.1.15 also works well.

super-unique-ai avatar Jan 14 '26 07:01 super-unique-ai

OpenCode compaction needs serious work, even when it does work it's beyond terrible. There are a bunch of good PR's on here but the powers that be apparently aren't interested.

Super weird.

SteveyBoros avatar Jan 15 '26 04:01 SteveyBoros

OpenCode is still better than 99% of carp on GitHub.

super-unique-ai avatar Jan 15 '26 05:01 super-unique-ai

OpenCode compaction needs serious work, even when it does work it's beyond terrible. There are a bunch of good PR's on here but the powers that be apparently aren't interested.

Super weird.

@rekram1-node

dhruvkej9 avatar Jan 15 '26 05:01 dhruvkej9

I can look into it, which PRs are you referring to?

It's weird cause some people say it's great, and I never hit it so I can imagine it leaves much to be desired haha

rekram1-node avatar Jan 15 '26 05:01 rekram1-node

I can look into it, which PRs are you referring to?

It's weird cause some people say it's great, and I never hit it so I can imagine it leaves much to be desired haha

I think if they all try OpenCode with OpenCode Zen then they might realize it's their LLMs that are letting them down. I have $200 dollar a month ChatGPT account yet OpenCode Zen still does a better job at programming.

This very second OpenCode Zen MiniMax is beating ChatGPT Codex.

super-unique-ai avatar Jan 15 '26 12:01 super-unique-ai