MiniMax-AI / MiniMax-AI/cli

MiniMax-M3 emits truncated tool-call JSON (error 2013) and destroys resumable session

Open
#235 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.2k
Forks
181
Avg merge
9h 4m
Merged PRs (30d)
13

Description

Summary

While using MiniMax-M3 through a persistent Codex/fast-subagent session, the model attempted an unrequested tool call whose arguments were truncated. The provider returned error 2013 (invalid_prompt), and the persistent session became structurally non-resumable.

Environment

  • Date: 2026-08-09
  • OS: Windows
  • Model: MiniMax-M3
  • Reasoning effort: high
  • Runtime transport: Codex session wrapped by a local MCP supervisor
  • MiniMax CLI was not used for the failing run

Sanitized failure

ERROR codex_core::tools::router: failed to parse function arguments:
EOF while parsing a string at line 1 column 260

provider response:
invalid params, invalid function arguments json string
code: invalid_prompt
numeric code: 2013

The last textual output before failure said the agent was going to write a research document, even though the requested outcome was a textual research list and no file write was requested.

A subsequent attempt to add a message to the same persistent session returned:

SESSION_NOT_RESUMABLE
Session cannot resume after structural failure in the previous run

Steps to reproduce

  1. Start a persistent session with MiniMax-M3 and tool calling available.
  2. Ask for a structured research response containing multiple candidates and URLs.
  3. Let the model decide whether to invoke a tool.
  4. In the observed run, the model emitted malformed/truncated JSON for a tool call.
  5. Attempt to continue the same session.

I could not reproduce the malformed call in a clean second session after explicitly forbidding all tool use; that session completed normally. The original failure and non-resumable state are persisted and reproducible from its run artifact.

Expected behavior

  • Tool-call arguments should always be valid complete JSON.
  • If generation of a tool call fails, the provider/runtime should ideally return a recoverable turn error or allow the persistent session to continue.
  • A malformed assistant tool call should not permanently destroy otherwise valid conversation state.

Actual behavior

  • The turn exits with code 1 / provider error 2013.
  • No token usage is returned for the failed run.
  • The persistent session becomes structurally non-resumable.

No credentials, prompts containing personal data, or private file contents are included in this report.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the persistent session and tool-calling runtime paths, using the preserved run artifact and the sanitized provider error as the reproduction entry point. Follow the listed reproduction steps with MiniMax-M3 and compare behavior with tool use explicitly forbidden. Done means malformed tool-call JSON is handled without permanently making the session non-resumable, with coverage for the provider error path.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.