Skip to content

[Bug] Chat thread is not created in sidebar until deleting a message; export returns empty or stale chat data #5250

Description

@okaybeydanol

Description

I am seeing a chat persistence/sidebar/export issue in Unsloth Studio.

A new chat can receive messages and the model responds normally, but the chat thread does not appear in the left sidebar under Recents. Because the thread is not created/indexed in the sidebar, Export all chats can also return an empty JSON even though messages are visible in the current chat window.

The strange part is that deleting one message from the current chat appears to force the thread to be created. After deleting a message, the chat suddenly appears in the sidebar.

Steps to reproduce

  1. Start Unsloth Studio.
  2. Load a local GGUF model.
  3. Click New Chat.
  4. Send a message, for example hi.
  5. Wait for the model response.
  6. Send another message, for example hi again.
  7. Look at the left sidebar under Recents.

Actual behavior

After sending messages, the conversation is visible in the main chat area and the model replies normally, but no chat thread appears in the left sidebar.

If I use Export all chats at this point, the exported JSON can be empty even though the current chat visibly contains messages.

If I delete one message from the current chat, the chat thread suddenly appears in the sidebar under Recents.

After clicking New Chat, clicking an older/sidebar chat can also fail to reopen it correctly.

Expected behavior

  • A new chat thread should be created after the first user message.
  • The thread should immediately appear in Recents.
  • Export all chats should include visible chats without needing to delete a message first.
  • Clicking an existing chat in the sidebar should reopen that chat reliably.
  • Search should only show valid, openable chat threads.

Screenshots

Screenshot 1

Shows the current chat after sending hi twice. The model replies normally, but no chat appears in the sidebar under Recents.

Image

Screenshot 2

Shows the result after deleting one message from the current chat. The thread suddenly appears in the sidebar as Greeting and Introduction.

Image

Additional observation

Before clearing browser site data/cookies for localhost:8888, Search showed old chats from several days ago. Those stale chats appeared in search/sidebar, but clicking them did not open the chat.

After clearing site data/cookies, the stale old chats disappeared. However, the main bug still remains:

  • New messages appear in the current chat window.
  • The thread does not appear in Recents until a message is deleted.
  • Export all chats can return empty data until the thread is forced to appear.

Environment

  • OS: Linux
  • GPU: NVIDIA RTX 5090 Laptop GPU, 24 GB VRAM
  • Studio package: unsloth 2026.4.8
  • unsloth-zoo 2026.4.9
  • torch 2.10.0+cu130
  • Source tested: v0.1.37-beta
  • Browser URL: http://localhost:8888
  • Model tested: local GGUF model, Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf

Possible cause

This looks like the active chat is not being persisted/indexed as a thread after sending messages. A later mutation, such as deleting a message, seems to trigger the missing thread creation or sidebar invalidation.

Possible areas to check:

  • thread creation after first user message
  • chat title generation / metadata update
  • sidebar Recents invalidation
  • export reading only persisted/indexed threads
  • search index containing stale browser-side or backend-side chat state

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions