#4060·omlx

Admin chat discards conversations on refresh, restart and "New Chat"; "Download chats" exports only the system prompt

Author: x144kCreated Sep 28, 2026Updated Oct 1, 2026

Describe the bug The chat page in the admin dashboard (/admin/chat) does not keep conversation state. I found four related problems:

  1. "Download chats" exports no history. The downloaded JSON file contains only the system prompt. It contains no user messages and no assistant replies.
  2. A page refresh deletes the conversation. After I refresh the chat page, the conversation disappears. I cannot find it anywhere in the UI.
  3. A page refresh clears the reply box. Any unsent text in the message input is gone after a refresh.
  4. "New Chat" replaces the existing conversation. Clicking "New Chat" does not create a separate chat. It discards the existing conversation without a warning, and the only way to prevent it is to pin the existing chat prior to creating a new one.

A server restart has the same effect as a page refresh: the conversation is lost.

Together, these problems mean that one refresh, one restart or one click on "New Chat" destroys the whole session. Problem 1 also removes the only workaround, because I cannot export a conversation before I lose it. I use exports to carry context into a new chat, so this blocks that workflow.

To Reproduce

A. Export contains no history

  1. Open http://localhost:8000/admin/chat.
  2. Select a model and exchange a few messages.
  3. Click "Download chats".
  4. Open the JSON file.
  5. See that the file contains only the system prompt.

B. Conversation lost on refresh

  1. Start a new chat and exchange a few messages.
  2. Refresh the browser page.
  3. See that the conversation is gone.

C. Unsent input lost on refresh

  1. Type a message in the reply box. Do not send it.
  2. Refresh the page.
  3. See that the reply box is empty.

D. Chat lost on server restart

  1. Exchange a few messages in a chat.
  2. Restart the server (omlx restart, or quit and reopen the app).
  3. Reload the chat page.
  4. See that the conversation is gone.

E. "New Chat" discards the existing chat

  1. Exchange a few messages in a chat.
  2. Click "New Chat".
  3. See that no warning or confirmation appears.
  4. See that the previous conversation is gone and cannot be found in the UI.

Expected behavior

  • The export contains every message in the conversation, in order, with its role and content.
  • Conversations survive a page refresh and a server restart.
  • The reply box restores unsent text after a refresh.
  • "New Chat" creates a separate conversation and keeps the existing one. If the UI supports only one conversation, it should warn before it discards the current one.

Screenshots I prefer to keep my usage private. The exported JSON contains only the system prompt anyway, and the steps above should reproduce the problem.

Desktop (please complete the following information):

  • macOS Version: 27.0 (26A428)
  • oMLX Version: 0.6.4 (build 2529)
  • Install method: macOS app
  • Browser: Safari 27.0 (22625.1.29.11.27)

Additional context I inspected the page's local storage in Safari's Web Inspector (Storage → Local Storage). The key omlx_chat_history exists, but it contains only the system prompt. It holds none of the messages I exchanged.

This suggests one shared cause for the empty export, the loss on refresh and the loss on restart. The UI appears to save the system prompt but not the messages. The export and the reload would then both read a history with no messages in it. I have inferred this from the storage contents; I have not read the source code.

The "New Chat" behaviour suggests that the UI holds only one conversation at a time. Because of this, I have never had more than one chat to lose. This is also an inference from observed behaviour, not from the source code.