Describe the bug
When exiting the app and resuming a session, an empty assistant message {"content": "", "role": "assistant"} appears in the conversation history.
Current behavior
On session load/resume, a spurious record with empty content and assistant role shows up. This appears to be a ghost record that gets written during session teardown and then re-read on resume.
Impact
- Confusing for users seeing an empty assistant message
- May affect context window usage (waste tokens on empty messages)
- Could be a symptom of improper session serialization/deserialization
Where to look
- Session serialization (save/load) path
crates/core/src/session.rs — session state
crates/core/src/session_store.rs — session persistence
- Rollout file reading on resume
Expected behavior
No empty assistant messages should appear in the conversation. Session serialization should filter out empty or orphaned records.
Describe the bug
When exiting the app and resuming a session, an empty assistant message
{"content": "", "role": "assistant"}appears in the conversation history.Current behavior
On session load/resume, a spurious record with empty content and assistant role shows up. This appears to be a ghost record that gets written during session teardown and then re-read on resume.
Impact
Where to look
crates/core/src/session.rs— session statecrates/core/src/session_store.rs— session persistenceExpected behavior
No empty assistant messages should appear in the conversation. Session serialization should filter out empty or orphaned records.