Skip to content

Thinking-only LLM responses silently dropped (kimi-k2.5-thinking) #64570

Description

@OpenCodeEngineer

Problem

When kimi-k2.5-thinking (or potentially other thinking models) returns a response containing only thinking content with stopReason: "stop", the agent treats this as a successful completion with 0 payloads — no text, no tool calls, no retry. The user's message gets silently dropped.

Root Cause

Two detection gates in src/agents/pi-embedded-runner/run/incomplete-turn.ts fail to catch this:

  1. resolveIncompleteTurnPayloadText — only triggers on stopReason: "toolUse" | "error", misses stopReason: "stop" with empty assistant text
  2. resolvePlanningOnlyRetryInstruction — only applies to openai/gpt-5 models

Proposed Fix

Extend resolveIncompleteTurnPayloadText to detect stopReason: "stop" with 0 assistant text blocks AND 0 tool calls. Extend resolvePlanningOnlyRetryInstruction to cover all thinking models.

Impact

Any user message triggering a thinking-only response is silently lost. Particularly likely on high-context sessions.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions