anomalyco / anomalyco/opencode
Assistant reply chunks appear as separate user messages (empty prompts, mid-sentence truncation) with interleaved-reasoning model via Zen
@rekram1-node is already working on this.
Since Aug 22, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
On the desktop app (1.18.21), using opencode/x-preview-f-free (OpenCode Zen stealth preview), parts of assistant responses end up in the session as separate user-role messages. Some are completely empty; some contain the verbatim continuation of an assistant reply that therefore looks truncated mid-sentence.
Evidence that these bypass the input path: the client's own sent-prompt history (drafts.sqlite, key opencode.global.dat:prompt-history) contains only my real sends — none of the empty/fragment messages appear there. They were not typed or pasted by me.
Agent log shows streams completing normally (INFO level, no errors) at moments replies are visibly truncated. The injected user messages arrive while an agent run is already active (no new loop step=0 entry for them).
Suspect: this model advertises interleaved reasoning ("interleaved": {"field": "reasoning_content"} in models.dev metadata). Multi-part deltas may be getting mis-routed into separate user-role messages somewhere between relay/persistence and display.
Session ID: ses_fd6f8f7b9ffeDSwnSHHgKSOLQ9. Happy to provide full agent logs on request.
Steps to reproduce
Not deterministic. Occurs intermittently (roughly every few responses) during long agent sessions with this model, most often while the agent is actively running tools.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.