Repository navigation
Description
Description
A long-running session (~950 events, ~74 messages) with the build agent on deepseek-v4-pro suddenly entered a state where new messages are saved to the database but the AI response is never triggered. The input clears as normal, no error is shown, but no assistant message is ever created. Other sessions in the same OpenCode instance work fine.
The event stream shows a pattern of abort cycles before the session went silent:
message.updated.1 (user message created)
message.part.updated.1 (user text saved)
session.updated.1
message.updated.1 (assistant message created)
message.part.updated.1 (assistant step-start/reasoning)
message.updated.1 (assistant completed with MessageAbortedError)
session.updated.1
message.removed.1 (user message removed)
message.removed.1 (assistant message removed)
session.updated.1
After several such cycles, the session transitioned to a "write-only" state where user messages still create events, but no assistant message is ever created — not even an aborted one.
What did NOT fix it:
- Manually deleting orphan user messages/parts/events from the DB
- Updating
event_sequence - Changing the session's
modelfield - Closing and reopening OpenCode
What worked (both confirm it's client-side state, not data corruption):
opencode --session <id> --fork— the forked session works normally- Exporting all sessions from Linux and re-importing on Windows — the serialization/deserialization round-trip flushed the bad state
Plugins
none
OpenCode version
1.18.4
Steps to reproduce
Not reliably reproducible, but the progression appears to be:
- Run a long session with the
buildagent - Have message abort/remove cycles occur (possibly from rapid message sending or provider interruptions)
- Continue sending messages — the session may enter the write-only state after several cycles
Screenshot and/or share link
No response
Operating System
Windows 11 (build 26200), Git Bash terminal
Terminal
Git Bash (MINGW64_NT-10.0-26200) inside Cursor IDE integrated terminal
Activity
github-actions commentedon Jul 23, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct (particularly the abort-cycle trigger path leading to the stuck state), it would help to clarify the differences from those issues in a comment here.
github-actions commentedon Sep 22, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.