anomalyco / anomalyco/opencode
[FEATURE]: ACP: expose compaction summary marker so chat clients can suppress compaction dumps
@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: trueandmode: "compaction" - the auto-continue follow-up text part has
metadata: { compaction_continue: true } - a
session.compactedevent 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.