Skip to content

orchestration leakage during context compaction #28355

Closed as not planned
Closed as not planned

Description

@jiten-core

OS:
Windows 11

OpenCode version:
v1.15.5

Model:
MiniMax M2.5

Steps to reproduce:

  1. Open OpenCode Desktop v1.15.5

  2. Start a new session in Build mode

  3. Use MiniMax M2.5 as the model

  4. Send very small prompts such as:

    • “hi”
    • “banana”
    • “reply only with banana”
  5. Continue chatting for a few messages

Observed behavior:
The assistant first responds normally, but then the session sometimes becomes compacted and the chat shows structured task-summary sections such as:

  • Goal
  • Constraints & Preferences
  • Progress
  • Next Steps
  • Critical Context

Sometimes “Session compacted” also appears in the timeline.

After compaction, MiniMax may continue replying in this structured task-summary style even for casual prompts.

Expected behavior:
Casual prompts should continue producing normal conversational responses after compaction instead of switching into persistent task-summary formatting.

Notes:
This behavior appears much more frequently with MiniMax M2.5 than with Claude/GPT models in the same environment.

Description

orchestration leakage during context compaction Prompt leakage
System prompt leakage
Orchestration leakage
Reasoning leakage
Context compaction leakage
Recursive summarization
Agent loop / recursion loop Ex: prompt: Expected output:

User: hi

Assistant:
Hey! How can I help?

What you got:

User: hi

Assistant:
Hey! How can I help?

Session compacted

Goal

Constraints & Preferences

Progress

Blocked

Expected internal flow:

user message
→ model response
→ done

What actually happened:

user message
→ hidden planner/context state
→ MiniMax generates structured task summary
→ OpenCode compacts session
→ compacted state rendered publicly

Another example:

Expected:

User:
Reply only with banana

Assistant:
banana

What you got:

banana

Goal

  • Reply with banana

Constraints

  • User requested one word

So the phenomenon is basically:

internal orchestration becoming visible output

instead of remaining hidden system state.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on May 19, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Steps to reproduce is empty — please describe how to reproduce the behavior you observed
    • OpenCode version is empty — please include the version you are using
    • Operating System is empty — please include your OS
    • The description consists largely of a list of technical terms and incomplete example fragments (e.g. Ex: prompt: Expected output: left unfilled), rather than a clear account of what happened and how to reproduce it

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. jiten-core commented on May 19, 2026

    @jiten-core
    Author

    OS:
    Windows 11

    OpenCode version:
    v1.15.5

    Model:
    MiniMax M2.5

    Steps to reproduce:

    1. Open OpenCode Desktop v1.15.5

    2. Start a new session in Build mode

    3. Use MiniMax M2.5 as the model

    4. Send very small prompts such as:

      • “hi”
      • “banana”
      • “reply only with banana”
    5. Continue chatting for a few messages

    Observed behavior:
    The assistant first responds normally, but then the session sometimes becomes compacted and the chat shows structured task-summary sections such as:

    • Goal
    • Constraints & Preferences
    • Progress
    • Next Steps
    • Critical Context

    Sometimes “Session compacted” also appears in the timeline.

    After compaction, MiniMax may continue replying in this structured task-summary style even for casual prompts.

    Expected behavior:
    Casual prompts should continue producing normal conversational responses after compaction instead of switching into persistent task-summary formatting.

    Notes:
    This behavior appears much more frequently with MiniMax M2.5 than with Claude/GPT models in the same environment.

  3. github-actions commented on May 19, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! Everything looks good now — the steps to reproduce, OS, version, and observed/expected behavior are all clearly described. We appreciate you taking the time to improve it.

  4. JARVIS-coding-Agent commented on Jun 8, 2026

    @JARVIS-coding-Agent

    +1 — This also affects ACP downstream platforms (e.g. Discord, Slack) when opencode is used via opencode acp.

    Reproduction via ACP

    When opencode runs as an ACP agent behind a platform bridge (like OpenAB), the compacted planning block (Goal / Constraints & Preferences / Progress / Blocked / Next Steps / Critical Context / Relevant Files) is included in the result.content[].text returned via JSON-RPC.

    The downstream platform has no way to distinguish this internal orchestration state from the actual answer — it renders everything to the end user.

    Observed behavior (ACP mode)

    • Each tool call iteration appends another full planning dump to the response
    • A single user question produces 6-7 repetitions of the planning block before the actual answer
    • Internal state (model name, base URL, file paths) is leaked to end users
    • Model: Gemma 4 31B-IT via vLLM (non-Claude/GPT models are more susceptible, consistent with the original report)

    Impact

    For ACP consumers this is not just a UX annoyance — it is:

    1. Information leakage (internal infra details exposed to users)
    2. Token waste (repeated planning blocks consume output tokens)
    3. Unusable output (users see walls of planning text before getting the actual answer)

    Suggested fix scope

    Whatever fix is applied for the Desktop UI should also ensure the compaction summary format does not leak into the text parts returned via ACP session/prompt responses. Ideally the planning state should only be emitted via SessionUpdate::Plan (ref #30659), not as raw text in the assistant message.

  5. github-actions commented on Aug 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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