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:
resolveIncompleteTurnPayloadText — only triggers on stopReason: "toolUse" | "error", misses stopReason: "stop" with empty assistant text
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
Problem
When
kimi-k2.5-thinking(or potentially other thinking models) returns a response containing only thinking content withstopReason: "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.tsfail to catch this:resolveIncompleteTurnPayloadText— only triggers onstopReason: "toolUse" | "error", missesstopReason: "stop"with empty assistant textresolvePlanningOnlyRetryInstruction— only applies toopenai/gpt-5modelsProposed Fix
Extend
resolveIncompleteTurnPayloadTextto detectstopReason: "stop"with 0 assistant text blocks AND 0 tool calls. ExtendresolvePlanningOnlyRetryInstructionto cover all thinking models.Impact
Any user message triggering a thinking-only response is silently lost. Particularly likely on high-context sessions.
Related