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
When an LLM stream is interrupted after tool-input-start but before tool-call or step-finish arrives, the assistant message is left in an inconsistent state:
assistantMessage.error is set correctly
Tool parts are correctly marked error / Tool execution aborted / interrupted
But assistantMessage.finish is never updated — it retains whatever value it had before the interruption (often undefined in real sessions, or the initial fixture value)
This causes downstream consumers (continuation loops, session exports, UI) to misinterpret the aborted message — either treating it as still in-progress (no finish) or as successfully completed (stale finish value).
Root cause
In packages/opencode/src/session/processor.ts, the halt() function handles terminal errors. The ContextOverflowError + non-auto-compaction branch already sets finish = "error" (line 929), but the general terminal branch that handles all other errors (abort, provider failure, etc.) only sets error without setting finish.
Expected behavior
An assistant message that terminates via halt() should always have finish set to "error", consistent with the existing ContextOverflowError path.
Activity
feat(opencode): add chunking rule for large write tool calls
github-actions commentedon Aug 24, 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.