Skip to content

[Bug]: Creating a new session deletes non-empty sessions when “Auto-cleanup blank sessions” is enabled #754

Description

@Ledracarnos

App Variant

Tauri

CodeNomad Version

0.20.0-dev-20260922-e68ac524

OpenCode Version

Unavailable - not provided

Operating System & Version

Windows 11

Issue Summary

When "Auto-cleanup blank sessions" is enabled under Settings → Advanced, creating a new session triggers the cleanup process. During this cleanup, CodeNomad incorrectly deletes existing sessions that already contain messages or other content, as though they were blank.

Steps to Reproduce

  1. Open CodeNomad.
  2. Open Settings → Advanced.
  3. Enable "Auto-cleanup blank sessions."
  4. Create a session.
  5. Send one or more messages so that the session contains content.
  6. Create another new session.
  7. Observe that the previous non-empty session disappears.

Expected Behavior

Creating a new session should only remove genuinely blank sessions.

A session must be preserved if it contains at least one user message, assistant response, attachment, or any other meaningful content.

Logs & Screenshots

None provided.

Additional Context

Actual behavior: creating a new session causes an existing session containing content to be removed as though it were blank.

Impact: High. Users may unexpectedly lose conversations when creating new sessions.

It has not yet been confirmed whether the session data is permanently deleted or only removed from the visible session list.

Tauri build of CodeNomad version 0.20.0-dev-20260922-e68ac524 on Windows 11.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions