Skip to content

[Bug]: Agent compresses right after Opencode /compact. #450

@nmzpy

Description

@nmzpy

Bug Description

I didn't have debug enabled but this is clear as day:

  1. have a long session 100k tokens plus whatever,
  2. /compact
  3. the model will literally spin up in a loop even after you tell it "DO NOT USE COMPRESS TOOL." and will just say shit like "Oh but the system tells me I must" and proceeds to do it. GPT 5.4 medium btw.
  4. in the end it just compresses the Compaction message ?
Image

Expected Behavior

NOT compress the session compact message ? I have turnprotection set to 20 btw

Debug Context Logs

I don't have it but it is clear as day and easy to reproduce. Turn protection doesn't reset after /compact hits.

Tool Call Details

No response

DCP Version

3.0.3

Opencode Version

OpenCode 1.2.27

Model

Other (specify in description)

Additional Context

No response

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