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
Provider-turn failures can leave assistant scaffolds unfinished #38431
The legacy prompt loop persists an empty assistant message before creating its processor. Existing cleanup handles interruption, but another failed Effect exit during processor creation or ordinary provider-turn setup and execution can propagate while leaving the committed message without an error or completion timestamp.
For an ordinary provider turn created by the current run, the failure boundary should begin at the persistence call. A failed exit should attempt to finalize that run's exact persisted assistant message, if present, without replacing the original failure. Cleanup should preserve any existing error and finish value.
This is process-local cleanup only. It does not scan existing history or recover process crashes, compaction turns, subtasks, cross-process work, or turns created by another run.
Plugins
None
OpenCode version
Current dev at 411eff73
Steps to reproduce
Create a session and persist a user message.
Run SessionPrompt.loop() with a SessionProcessor whose create() defects.
The defect propagates, but the assistant scaffold remains persisted with no parts, error, finish, or time.completed.
Expected: the original defect still propagates, while the persisted scaffold records an error and completion timestamp. finish remains unchanged.
changed the title [-]Unfinished assistant scaffold persists after prompt setup failure[/-][+]Provider-turn failures can leave assistant scaffolds unfinished[/+]on Jul 23, 2026
PR #42516 includes the propagation work from #42253 plus follow-up persistence and concise UI formatting. It overlaps this issue specifically in assistant-message finalization: PR #39200's finalizeAssistant approach is broader and may be preferable to port onto the current architecture. #39200 does not replace #42253's error propagation or tool-warning UI work, so I am leaving #42516 open until maintainers choose the implementation.
Activity
[-]Unfinished assistant scaffold persists after prompt setup failure[/-][+]Provider-turn failures can leave assistant scaffolds unfinished[/+]DatScreamer commentedon Aug 14, 2026
PR #42516 includes the propagation work from #42253 plus follow-up persistence and concise UI formatting. It overlaps this issue specifically in assistant-message finalization: PR #39200's
finalizeAssistantapproach is broader and may be preferable to port onto the current architecture. #39200 does not replace #42253's error propagation or tool-warning UI work, so I am leaving #42516 open until maintainers choose the implementation.github-actions commentedon Oct 15, 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.