Skip to content

[Bug]: Compress does not work on some models #612

Description

@MrGoraj

Bug Description

I've noticed issues with using the “compress” function from DCP in OpenCode when using certain models, even though switching to a different model allows the same session to compress without any problems.

So far, I've encountered this issue with the Ox Alpha (no longer available) and Hy3.

At first, I thought it was a problem specific to just one model, but now I’ve encountered it with a other model as well, so I think it’s a more complex issue—it might occur with others too.

When I switch to DeepSeek v4 Pro within the same session and run the compression from the DCP in the same way, it works without any problems.

Expected Behavior

Instead of the standard message summarizing the compression, the AI agent reports that it received the error “content is required and must be a non-empty array.”

Debug Context Logs

2026-08-27T15:54:34.274Z INFO  index: DCP initialized
2026-08-27T15:54:36.653Z INFO  index: DCP initialized
2026-08-27T15:55:14.435Z INFO  index: Syncing tool parameters from OpenCode messages
2026-08-27T15:55:14.435Z INFO  index: Cached tool id: chatcmpl-tool-91783b73b5cc20d6 (turn 1, 167 tokens)
2026-08-27T15:55:14.435Z INFO  index: Cached tool id: chatcmpl-tool-bd0cf2be0c758cc5 (turn 2, 167 tokens)
2026-08-27T15:55:14.435Z INFO  index: Cached tool id: chatcmpl-tool-a8ad7fe4b1842f8d (turn 3, 152 tokens)
2026-08-27T15:55:14.435Z INFO  index: Cached tool id: chatcmpl-tool-aa04d32c53ac1c2c (turn 4, 121 tokens)
2026-08-27T15:55:14.435Z INFO  index: Synced cache - size: 4, currentTurn: 5
2026-08-27T15:55:14.437Z DEBUG index: Applied manual prompt | sessionId=ses_fbc137604ffefa2VrQPmaPRtq9
2026-08-27T15:55:16.643Z DEBUG index: Cached model context limit | limit=256000
2026-08-27T15:55:31.566Z DEBUG index: Recorded compression start | messageID=msg_043eeb87a001IWmgseVaz5ftJ7 callID=chatcmpl-tool-a831b78b8c9110cb startedAt=1787846131563
2026-08-27T15:55:36.332Z INFO  index: Syncing tool parameters from OpenCode messages
2026-08-27T15:55:36.332Z INFO  index: Cached tool id: chatcmpl-tool-a831b78b8c9110cb (turn 6, 225 tokens)
2026-08-27T15:55:36.332Z INFO  index: Synced cache - size: 5, currentTurn: 6
2026-08-27T15:55:36.451Z DEBUG index: Cached model context limit | limit=256000
2026-08-27T16:02:07.737Z INFO  index: Syncing tool parameters from OpenCode messages
2026-08-27T16:02:07.737Z INFO  index: Synced cache - size: 5, currentTurn: 7
2026-08-27T16:02:07.738Z DEBUG index: Applied manual prompt | sessionId=ses_fbc137604ffefa2VrQPmaPRtq9
2026-08-27T16:02:07.845Z DEBUG index: Cached model context limit | limit=1000000
2026-08-27T16:02:29.550Z DEBUG index: Recorded compression start | messageID=msg_043f50884001Y4X8tAlfa2tQt0 callID=call_00_yjspAlfjj6t0zJrHBk899607 startedAt=1787846549546
2026-08-27T16:02:31.234Z DEBUG index: Marked 1 duplicate tool calls for pruning
2026-08-27T16:02:31.234Z DEBUG index: Marked 2 error tool calls for pruning (older than 4 turns)
2026-08-27T16:02:31.709Z INFO  index: Saved session state to disk | sessionId=ses_fbc137604ffefa2VrQPmaPRtq9 totalTokensSaved=909
2026-08-27T16:02:31.752Z INFO  index: Saved session state to disk | sessionId=ses_fbc137604ffefa2VrQPmaPRtq9 totalTokensSaved=909
2026-08-27T16:02:31.752Z INFO  index: Attached compression time to blocks | messageID=msg_043f50884001Y4X8tAlfa2tQt0 callID=call_00_yjspAlfjj6t0zJrHBk899607 blocks=1 durationMs=1660
2026-08-27T16:02:33.307Z INFO  index: Loaded session state from disk | sessionId=ses_fbc137604ffefa2VrQPmaPRtq9
2026-08-27T16:02:33.520Z INFO  index: Syncing tool parameters from OpenCode messages
2026-08-27T16:02:33.520Z INFO  index: Cached tool id: call_00_yjspAlfjj6t0zJrHBk899607 (turn 6, 163 tokens)
2026-08-27T16:02:33.520Z INFO  index: Synced cache - size: 6, currentTurn: 6
2026-08-27T16:02:33.520Z INFO  index: Injected compress summary | anchorMessageId=msg_043ee9cc7001EYwnPYf8mMd8GD summaryLength=716
2026-08-27T16:02:33.551Z INFO  index: Saved session state to disk | sessionId=ses_fbc137604ffefa2VrQPmaPRtq9 totalTokensSaved=909
2026-08-27T16:02:33.661Z DEBUG index: Cached model context limit | limit=1000000

Tool Call Details

No response

DCP Version

latest (v3.1.15)

Opencode Version

1.18.23

Model

Other (specify in description)

Additional Context

No response

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions