Cosmo Docs
AI

Chat History

How Cosmo persists your chat sessions across restarts and syncs them to the cloud.

Overview

Every conversation you have in Cosmo is automatically saved. Sessions survive app restarts and, when you're signed in, are synced to the cloud so your history follows you across devices.

How sessions are saved

  • Locally — sessions are written to disk after every message, title update, or model change.
  • Cloud sync — when authenticated, every mutation is async-pushed to the server. On the next sign-in or app restart, sessions are pulled from the server first, so the cloud copy always wins.

Offline and orphan recovery

Sessions created while offline (or before you first signed in) are pushed to the server the next time you authenticate. No history is silently lost.

Sessions that are never synced

Two session types are intentionally kept local only:

TypeWhy
Hidden sessionsInternal sessions used by background processes
Onboarding sessionsThe first-run welcome conversation

Switching accounts or orgs

When you sign in as a different user or switch to a different organisation, local session history is cleared before loading the new account's sessions from the server. Re-authenticating as the same user (e.g. a token refresh) preserves your history.

Deleting a session

Deleting a session from the sidebar soft-deletes it on the server. Deleted sessions are not recoverable from the UI — there is no trash for chat sessions.