Description
When using a LiteLLM-based provider, the compaction agent produces an empty summary (calls _noop instead of generating text), causing complete post-compaction amnesia. The agent loses all knowledge of the conversation after compaction.
The compaction agent (packages/opencode/src/session/compaction.ts) passes tools: {} (empty) to processor.process(). When the conversation history contains any tool calls (e.g., a bash or read call from earlier), all three conditions are met, and _noop gets injected into the compaction request.
The model then calls _noop instead of generating the summary text. The resulting compaction message has summary: true but contains only step-start + tool (_noop) + step-finish parts — no text part with the actual summary.
Plugins
No response
OpenCode version
No response
Steps to reproduce
Reproduction Steps
- Start opencode with a LiteLLM-based provider
- Have a conversation that involves tool calls (e.g., "list files in this directory")
- Trigger compaction (manual via
/compact or automatic via context overflow)
- Ask the agent what it was previously working on
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
When using a LiteLLM-based provider, the compaction agent produces an empty summary (calls
_noopinstead of generating text), causing complete post-compaction amnesia. The agent loses all knowledge of the conversation after compaction.The compaction agent (
packages/opencode/src/session/compaction.ts) passestools: {}(empty) toprocessor.process(). When the conversation history contains any tool calls (e.g., abashorreadcall from earlier), all three conditions are met, and_noopgets injected into the compaction request.The model then calls
_noopinstead of generating the summary text. The resulting compaction message hassummary: truebut contains onlystep-start+tool(_noop) +step-finishparts — no text part with the actual summary.Plugins
No response
OpenCode version
No response
Steps to reproduce
Reproduction Steps
/compactor automatic via context overflow)Screenshot and/or share link
No response
Operating System
No response
Terminal
No response