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
desktop: "Message not found" 404 toast after revert + resubmit #51502
After reverting a session to an earlier user message and immediately resubmitting, the desktop client shows a "请求失败 / Message not found: msg_..." error toast. The server returns 404 for a message ID that was discarded during the revert + resubmit race. No data loss, but the error toast is confusing and looks like a failed request.
Active plugins: @prevalentware/opencode-goal-plugin, local handoff-on-compact plugin
Reproduction
In OpenCode Desktop, have a session where a turn is running (assistant with tool calls).
Revert the session to an earlier user message (server logs session.revert.stage).
Resubmit the message right away.
Within a few seconds, an error toast appears: 请求失败 — Message not found: msg_0de12f5dc001K7Lx40bwXb7nV3.
Expected Behavior
The client should not fetch a message ID that no longer exists after a revert; no error toast should be surfaced for internal state that was already discarded.
Actual Behavior
The server returns 404 and the desktop app surfaces it as a failed-request toast. Session state remains consistent afterwards (all messages intact, subsequent turns run normally), so this appears to be a transient client/server race, not corruption.
Additional Context
Server log excerpt (~/.local/share/opencode/log/opencode.log, UTC):
The missing message ID (msg_0de12f5dc001...) was created ~12 ms after the resubmitted user message (msg_0de12f5d0001...) and is absent from the final message list, which suggests the client kept a reference to an assistant message that was replaced or discarded during the revert + resubmit sequence.
Frequency: observed once so far (revert followed by immediate resubmit).
The bug report template requires a Description field. This report uses Summary instead; please edit it to include the required Description field. The report already contains useful details.
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:
#38864: Message not found after revert cleanup leaves orphaned messages and breaks loading a session.
#39736: Undo during an admitted-but-unpromoted message fails with Message not found during session revert.
If you believe this was flagged incorrectly, please let a maintainer know.
Activity
github-actions commentedon Sep 26, 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:
Message not foundafter revert cleanup leaves orphaned messages and breaks loading a session.Message not foundduring session revert.If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Sep 26, 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.