-
Notifications
You must be signed in to change notification settings - Fork 14.8k
_noop tool injection causes empty compaction summaries on LiteLLM proxies #18053
Description
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
/compactor 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