Skip to content

Compaction produced no summary when the conversation ends on a tool result #53242

Description

@LegendaryFire

Description

Auto-compaction often fails with "Compaction produced no summary" when using a models with tooling. I can only reproduce when the conversation ends on a tool result.

The summary request still includes the session's tools. The model then writes its summary in reasoning_content, makes a tool call, and returns empty content. OpenCode only reads content, so the summary is lost.

Plugins

None

OpenCode version

v2.0.22

Steps to reproduce

  1. Configure a provider pointing at llama.cpp using a Qwen3-based model. Use the reasoning_content config.
  2. Start a session that runs many tool calls in a row (e.g. Playwright MCP) until it reaches the compaction threshold.
  3. Auto-compaction fires while the last message is a tool result.
  4. You get Compaction produced no summary.

Screenshot and/or share link

No response

Operating System

Arch Linux 7.2.2

Terminal

Gnome Terminal

Activity

  1. Shalin-Shah-2002 commented on Oct 5, 2026

    @Shalin-Shah-2002

    I'd like to take this. The summary request still sends the session's tools, so the model can answer with a tool call and empty text. I'll set toolChoice: "none" on the summary request in session/compaction.ts and add a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions