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
opencode export outputs messages in wrong order for long sessions #7426
opencode export <session_id> outputs messages in wrong order for long sessions. The first part of the conversation appears in the middle or end of the export.
Root cause: Session.messages() uses result.reverse() which only reverses the alphabetical order from Storage.list(). Message IDs are random strings (e.g., msg_19b9ed* vs msg_b9946c*), so alphabetical order ≠ chronological order.
Plugins
None
OpenCode version
1.1.8
Steps to reproduce
Create a long session with 100+ messages over multiple hours/days
Run opencode export <session_id>
Check the message order — early messages appear in the middle or end instead of the beginning
These issues are related to message ordering/handling in long sessions but may have different root causes. Feel free to ignore if your specific case differs from these.
Activity
github-actions commentedon Jan 9, 2026
This issue might be a duplicate of or related to existing issues. Please check:
These issues are related to message ordering/handling in long sessions but may have different root causes. Feel free to ignore if your specific case differs from these.
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.