[Bug]: Running conversation with attachments disappears from the sidebar until the run completes (v0.8.8-rc3)
What happened?
When a new conversation is started with an attachment and the first turn runs for a while (e.g. code execution, 1-2 min), the conversation drops out of the sidebar as soon as the conversation list is refetched. It comes back only when the run has finished. Nothing is lost, the conversation is complete afterwards.
Observed variants:
- The running entry vanishes from the list and reappears when the run finishes.
- With two overlapping runs, each run's completion makes the other run's entry vanish.
- Sometimes the entry shows as "New Chat" (row exists, no title yet) before it disappears.
Reproduced on two independent v0.8.8-rc3 installations. Did not occur on v0.8.7. A conversation started without an attachment in the same session is readable via GET /api/convos/<id> within seconds (see log).
Why it happens (from reading the code): since #14425 (AgentClient.shouldDeferUserMessagePersistence(), api/server/controllers/agents/client.js), the user message and therefore the conversation row are written deferred when model-bound attachments are present. The sidebar seeds the entry optimistically, but every invalidateConversationLists() (new-chat start, another run settling, page reload) replaces the list with the server response, which does not contain the conversation yet. v0.8.7 wrote the row eagerly before calling the model, so refetches always found it.
Possible fix: keep conversations that have an active job (GET /api/agents/chat/active) in the list cache across refetches, or persist the conversation row before the run starts and defer only the message content.
Version Information
LibreChat version: v0.8.8-rc3 Commit: 1df448481075d37484f11c4751dc3f60314ee651 Branch: v0.8.8-rc3 Build date: 2026-09-15 02:34:58 UTC User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
Steps to Reproduce
- Start a new chat (agents endpoint, Code Interpreter enabled), attach a file (e.g. .xlsx), send a prompt that triggers a long code-execution run.
- While it runs, trigger a sidebar refetch: click "New chat" and start a second run with the same prompt and file, or reload the page, or delete another conversation.
- Watch the sidebar: the first conversation disappears (or shows "New Chat"), the second one appears. When the second run finishes, the second entry disappears and the first one is back. When the first run finishes, both are listed
What browsers are you seeing the problem on?
Chrome, Safari
Relevant log output
nginx access log (UTC), user-agent column removed. Conversation 968106fb starts with an attachment at 13:48:00; for the whole 6-minute run GET /api/convos/<id> answers 404 while the job endpoints answer 200 for the same id. A sidebar list refetch during the run (13:51:12) therefore cannot contain it. The row exists only after the run completed (13:54:00), first 200 at 13:57:06.
13:47:58 "POST /api/files HTTP/2.0" 200 803
13:48:00 "POST /api/agents/chat/bedrock HTTP/2.0" 200 143
13:48:00 "GET /api/messages/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 200 2
13:48:02 "GET /api/convos/gen_title/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 200 69
13:48:05 "GET /api/agents/chat/active HTTP/2.0" 200 128
13:48:07 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 404 0
13:48:07 "GET /api/messages/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 200 642
13:48:10 "GET /api/agents/chat/status/968106fb-61df-5cea-9c79-b53c18652887?generationProtocolVersion=2 HTTP/2.0" 200 1521
13:48:18 "GET /api/agents/chat/stream/968106fb-61df-5cea-9c79-b53c18652887?resume=true&generationCreatedAt=1789652880777&generationProtocolVersion=2 HTTP/2.0" 200 10008
13:48:19 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 404 0
13:48:50 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 404 0
13:49:36 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 404 0
13:50:24 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 404 0
13:50:54 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 404 0
13:51:04 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 404 0
13:51:08 "GET /api/agents/chat/status/968106fb-61df-5cea-9c79-b53c18652887?generationProtocolVersion=2 HTTP/2.0" 200 2496
13:51:12 "DELETE /api/convos HTTP/2.0" 201 147 <- another conversation deleted, triggers list refetch
13:51:12 "GET /api/convos?sortBy=updatedAt&sortDirection=desc HTTP/2.0" 200 310 <- list refetch while 968106fb is running
13:54:00 "GET /api/agents/chat/stream/968106fb-61df-5cea-9c79-b53c18652887?resume=true&generationCreatedAt=1789652880777&generationProtocolVersion=2 HTTP/2.0" 200 897009 <- run completes
13:54:05 "GET /api/agents/chat/active HTTP/2.0" 200 77
13:57:06 "GET /api/convos?sortBy=updatedAt&sortDirection=desc HTTP/2.0" 200 524
13:57:06 "GET /api/convos/968106fb-61df-5cea-9c79-b53c18652887 HTTP/2.0" 200 452 <- row exists now
Same pattern for two earlier runs with attachments in the same session: bc49dec6 (13:43:10 start, GET /api/convos/<id> 404 at 13:43:46, 13:43:54, 13:44:08, 13:44:23, 13:44:41) and 74024359 (13:45:24 start, 404 at 13:45:50).
Counter-example without attachment: f830a8f4 was started at 13:47:48 (no preceding POST /api/files) and GET /api/convos/f830a8f4-... returned 200 at 13:48:06.
LibreChat debug log for the same conversation (no errors, no warnings):
2026-09-17T13:48:00.778Z debug: [RedisJobStore] Created job: 968106fb-61df-5cea-9c79-b53c18652887
2026-09-17T13:48:00.833Z debug: [AgentStream] Client subscribed to 968106fb-61df-5cea-9c79-b53c18652887, resume: false
2026-09-17T13:48:06.784Z debug: [AgentStream] Client disconnected from 968106fb-61df-5cea-9c79-b53c18652887
2026-09-17T13:48:06.792Z debug: [ResumableAgentController] Saved partial response for 968106fb-61df-5cea-9c79-b53c18652887, content parts: 1
2026-09-17T13:48:10.963Z debug: [AgentStream] Client subscribed to 968106fb-61df-5cea-9c79-b53c18652887, resume: true
Note the partial response is saved at 13:48:06 via saveMessage() (messages collection only), and GET /api/messages/<id> returns it at 13:48:07 (200, 642 bytes). The conversation document is still missing at that moment (GET /api/convos/<id> 404), because the user message and the conversation row are only written once the deferred persistence starts. So during the run the messages exist but the conversation the sidebar lists does not.
No errors in the LibreChat API, debug or error log during this time.Screenshots
Code of Conduct
- I agree to follow this project's Code of Conduct
Source: danny-avila/LibreChat