Skip to content

Agent Runtime: Empty {"content": "", "role": "assistant"} record appears on session resume #145

Description

@wangtsiao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions