anomalyco / anomalyco/opencode

[FEATURE]: ACP: expose compaction summary marker so chat clients can suppress compaction dumps

Open
#40,494 0 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Aug 4, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement

Chat clients connected via the ACP protocol (e.g. opencode-chat-bridge, which forwards ACP updates to Matrix/Telegram) cannot distinguish an auto-compaction summary from a normal assistant reply.

OpenCode already marks the summary internally:

  • the summary assistant message is created with summary: true and mode: "compaction"
  • the auto-continue follow-up text part has metadata: { compaction_continue: true }
  • a session.compacted event is published when compaction completes

But packages/opencode/src/acp/event.ts only handles permission.asked, message.part.updated, message.part.delta and forwards plain agent_message_chunk updates with no message-level info. The session.compacted event is never forwarded to ACP clients. As a result, chat users see an unexplained wall of text when the session auto-compacts.

Suggested fix: include message info (summary, mode) in the agent_message_chunk sessionUpdate payload (and in session/load replay), and/or forward the session.compacted event as a dedicated ACP notification.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.