Skip to content

MiniMax M3 Free leaking "]<]minimax[>[</tool_call>" #30684

Closed as not planned
Closed as not planned

Description

@raymelon

Description

Anyone else experiencing this?

MiniMax M3 Free is is leaking "]<]minimax[>[</tool_call>" at the end of its responses

Plugins

"opencode-env-protect", "openslimedit@latest", "@tarquinen/opencode-dcp@latest", "opencode-tool-search"

OpenCode version

1.15.13

Steps to reproduce

  1. Use MiniMax M3 Free model
  2. Watch the response leak "]<]minimax[>[</tool_call>"

Screenshot and/or share link

No response

Operating System

Windows 10

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jun 4, 2026

    @github-actions
    Contributor

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

  2. ulises-jeremias commented on Jun 5, 2026

    @ulises-jeremias
    Contributor

    I investigated and prepared a targeted fix.

    Root cause hypothesis

    • Some MiniMax responses can append a trailing serialized tool-call marker artifact (e.g. ]<]minimax[>[</tool_call>) to plain assistant text.
    • That artifact appears in the final rendered text because it is treated as normal text delta content.

    Fix implemented

    • Added a narrow sanitization step in SessionProcessor text finalization (text-end) to strip known trailing MiniMax tool-call leak suffixes:
      • specific marker: ]<]minimax[>[</tool_call>
      • fallback trailing </tool_call>
    • Guarded by model id: only runs when model id includes minimax.
    • The sanitizer only removes trailing leak suffixes; normal message content is preserved.

    Regression coverage

    • Added test in packages/opencode/test/session/processor-effect.test.ts:
      • session.processor strips MiniMax trailing tool_call leak suffix from assistant text
      • Verifies assistant text ends as clean Answer instead of leaked marker suffix.

    I’m opening the PR now.

  3. ulises-jeremias commented on Jul 14, 2026

    @ulises-jeremias
    Contributor

    Reopened the fix PR after automated cleanup closure: #36860

    @StarpTech could you please take a look when you get a chance? Thanks!

  4. niStee commented on Aug 24, 2026

    @niStee

    Still reproducible on opencode 1.18.18, provider litellm, model minimax-m3 (Linux) — but with a variant that the strip-trailing-suffix approach would not cover.

    In child session ses_fcda349f9ffeO8zVq1Izz7B2aG (linked to its parent via session.parent_id), part prt_0338572fa001VKFnz54Sl5aRxI contains the malformed markup <]minimax[> around a bash command, plus a raw </tool_call> closing tag. In other words, the leak occurs inside tool-call serialization, not as a trailing suffix on plain assistant text at text-end.

    Implication: sanitizing trailing text suffixes (as in the closed cleanup PRs #30849 / #36860) addresses the cosmetic text leak but not this variant, where malformed tool-call markup reaches the tool-call parsing layer. The root cause likely sits in MiniMax tool-call serialization/parsing rather than text finalization.

    Notes:

    • The affected child later reached step-finish with reason stop on its own (part prt_03385771b001PfRA0NwayGKpaq), so malformed output alone is not proof of a permanent stall.
    • Evidence gathered read-only from the local session DB and scoped logs; happy to run targeted follow-up queries if useful.

    (Local paths and machine details sanitized; stable IDs retained for cross-reference.)

  5. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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