You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Invalid request: the message at position 64 with role 'assistant' must not be empty" with Kimi K3 #37887
No issue template was used — please use the Bug Report template, which requires a Description field with real content, reproduction steps, and environment information (OS, opencode version, provider/model config)
The current content is a single line with no context on how to reproduce the issue or what environment it occurs in
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
For anyone landing here from search: this error means the replayed history contains an assistant message that serializes with empty content (typically from a mid-turn abort or empty streamed text parts with reasoning models like Kimi K3), and strict providers reject the whole request — bricking the session.
If your session is already bricked and you can't wait: clean the offending assistant rows in ~/.local/share/opencode/opencode.db (empty text parts / reasoning-only steps), then restart the client.
Activity
github-actions commentedon Jul 20, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Jul 20, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.
impptg commentedon Aug 31, 2026
For anyone landing here from search: this error means the replayed history contains an assistant message that serializes with empty content (typically from a mid-turn abort or empty streamed text parts with reasoning models like Kimi K3), and strict providers reject the whole request — bricking the session.
Two fixes:
experimental.chat.messages.transformhook before each request (drops empty text parts and reasoning-only step segments).If your session is already bricked and you can't wait: clean the offending assistant rows in
~/.local/share/opencode/opencode.db(empty text parts / reasoning-only steps), then restart the client.