Skip to content

[Feature]: Persist Agent chat sessions across app restarts #855

Description

@auberginewly

Search existing issues

  • I have searched the existing issues

Is your feature request related to a problem?

The roadmap lists "chat history that survives a restart" as next up. Chat sessions are currently kept in the main process's in-memory sessionsByProject map. After restarting OpenScreen, the conversation list and messages are gone, even though the project still exists. This also prevents continuing an earlier Agent conversation with its context.

Describe the solution you'd like

I'd like to own a separate PR for local, per-project Agent chat persistence:

  • Save session identity, title, timestamps and the visible message transcript locally, and restore them when reopening the project after an app restart.
  • Restore the context needed to continue the conversation correctly, including any compaction summary/boundary used for model history. The visible transcript should remain complete.
  • Keep conversations isolated by project. Creating, renaming and deleting sessions should persist across restarts.
  • Handle missing or invalid saved data without preventing a project from opening. Avoid storing provider API keys or other unrelated configuration in the chat history.
  • Do not show a rewind action on restored messages unless its document checkpoint is also restorable. A checkpoint that only existed in memory must not appear usable after restart.

Acceptance cases: restart and reopen a project with multiple sessions; continue a restored conversation; verify project isolation and rename/delete; restore a compacted conversation without losing the visible transcript; handle invalid persisted data; verify honest rewind availability.

This is local persistence, not cloud sync or conversation export.

Describe alternatives you've considered

Keeping sessions only in memory is simple, but it loses the user's work on every restart. Persisting only the displayed messages would restore the UI without necessarily restoring the model's context or the validity of rewind controls.

Additional context

Roadmap: https://github.com/getopenscreen/openscreen/blob/main/ROADMAP.md

Current in-memory session implementation: https://github.com/getopenscreen/openscreen/blob/main/electron/ai-edition/chat-service.ts

I'd like to implement and maintain this as an independent Agent PR. Is anyone already working on chat persistence, or would you prefer a smaller first-PR boundary?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions