{"content":"Dev journal — fix(cowork): stop falsely marking sessions completed when a turn ends with no final reply.\n\nRoot cause (confirmed on local session d41b04c0): a DeepSeek thinking turn could end after emitting only the `[reasoning unavailable]` placeholder reasoning (no text, no tool calls), yet the SDK still reported a `success` result. runClaudeCodeLocal then marked the session `completed`, so the task list showed done while the final handoff/report was missing.\n\nFix (branch fix/cowork-empty-terminal-turn, commit d35ba0f6):\n- Detect the empty terminal turn via new isEmptyTerminalSdkResult helper (success result with empty/missing payload.result).\n- On detection: post a clear diagnostic system message and leave the session `idle` instead of `completed` (local + sandbox); still emit `complete` so automation waiters resolve.\n- Renderer complete handler now corrects the task-list status from the backend session.\n- Hygiene: stop persisting/streaming the `[reasoning unavailable]` placeholder as thinking content (one failure session had 24 such messages).\n\nTest: tests/coworkEmptyTerminalTurn.test.mjs covers the detection helper and the placeholder sentinel.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}