# v0.19.3 — Fix empty-message 400 on follow-up tasks

A small maintenance release that fixes an intermittent `400` error when starting a new task after a previous one completed in the same session.

## Empty assistant message no longer breaks follow-up tasks

When a reasoning model spent a turn thinking but produced no visible text before calling a tool, the panel persisted an assistant bubble with empty content. On the next task that empty message was replayed into the LLM history, and strict providers — most visibly **Moonshot (Kimi)** — rejected the whole request:

```
400 — the message at position N with role 'assistant' must not be empty
```

Lenient providers silently tolerated the empty message, so the failure only surfaced on some providers and only on follow-up tasks, which made it look random.

Pie now drops wire-empty messages at the history hygiene step right before every LLM call. The fix is **provider-agnostic**, covers every history source (new task, resume, prior-task summary, mid-task instructions), and **heals sessions that already contain an empty message** — no need to start a fresh session. Extended-thinking blocks are preserved, so Anthropic thinking replay is unaffected (#115).

## 中文摘要

一个小维护版本,修复**同一会话里完成一轮任务后再开下一轮时偶发的 `400` 报错**。

当 reasoning 模型某一轮只输出思考、在调用工具前没有产生可见文字时,面板会存下一条内容为空的 assistant 气泡。下一轮任务会把这条空消息回放进 LLM 历史,严格的 provider——最典型的是 **Moonshot(Kimi)**——会直接拒绝整个请求(`message at position N with role 'assistant' must not be empty`)。宽松的 provider 会默默容忍,所以只在部分 provider、且只在后续任务里出现,看起来像随机故障。

现在 Pie 在每次调用 LLM 前的历史清理环节丢弃「线上为空」的消息。修复**与 provider 无关**,覆盖所有历史来源(新任务 / resume / 上轮摘要 / 任务中指令),并能**治愈已经包含空消息的旧会话**——无需新建会话。扩展思考(thinking)块会被保留,不影响 Anthropic 的思考回放(#115)。
