Back to the ward
Case 0442MinorApraxia

One Bad Argument, Forever

Admitted
2026-02-17
Source dataset
Other / sample
Source
GitHub, MoonshotAI/kimi-cli issue #1171
Failure mode
Infinite loop
Agent system
Autonomous loop
Tool access
Write access
Industry
Software development

Presenting Behaviour

During an autonomous coding session, the model generated a tool call whose arguments were truncated, invalid JSON, an unterminated string. The system's error handling caught the malformed call but, rather than discarding it, stored the broken argument text as-is in the conversation history used for future turns. From that point on, every subsequent turn resent the same corrupted arguments back to the model provider, which rejected the request every time; the session was permanently stuck and required a manual reset to recover.

Case Replay

A reconstruction, not a simulation. This sequence is reconstructed from the public incident record and summarised in our own words. It is a static record of what was reported, and nothing here can be run or replayed live.

4 steps

  1. Truncated call. The model emits a tool call with an unterminated string.
  2. Stored as-is. Error handling saves the broken text in the session history. This is where the agent derailed.
  3. Resent every turn. Each turn sends the corrupt arguments to the provider.
  4. Stuck. The provider rejects every request until a manual reset.

Differential Diagnosis

A one-off generation glitch with no lasting effect, considered and ruled out. A single malformed call is unsurprising on its own, but the session did not recover from it the way a normal transient error would; the broken call persisted in memory and kept breaking every later turn.

Perseveration (repeating a failing action without adapting), considered, since the symptom was a repeating failure. Ruled out as the primary cause because the repetition here wasn't the model retrying a choice, it was the surrounding system re-transmitting a corrupted record it never should have kept in the first place.

Apraxia, most consistent with the evidence. The mechanics of handling a malformed tool call broke down: invalid arguments weren't validated before being sent, and once they failed, they were preserved in history rather than sanitized, poisoning every call that followed.

Working Diagnosis

Apraxia: a malformed tool-call argument wasn't caught before submission or cleaned up after failing, and the corrupted call structure was preserved in session history, breaking every subsequent turn of the same session.

Discussion

The failure here isn't that a model occasionally produces malformed output (that will always happen sometimes) it's that the system had no way to quarantine the bad output once it appeared, so one truncated string turned into a permanently broken session. Validating tool-call arguments against their schema before they're sent, and stripping anything that fails validation out of the conversation record rather than storing it, is the kind of unglamorous plumbing that keeps a single bad call from cascading.

Mitigation Strategy

Validate tool-call arguments against their schema before sending, and strip failures from the conversation record.

Governance Guardrails

Schema validation; quarantine of invalid output; session recovery without manual reset.

Typical Presentation in Human Patients

General clinical background, included for context. Not medical advice, and not a diagnosis of any individual.

Apraxia usually follows damage to specific brain regions, often after a stroke. A person with apraxia cannot carry out a previously familiar, purposeful movement (such as waving goodbye or using a comb) on request or by imitation, even though their muscle strength, coordination, and understanding of what's being asked are otherwise intact.

Source Note

GitHub, MoonshotAI/kimi-cli issue #1171

https://github.com/MoonshotAI/kimi-cli/issues/1171