langgenius / langgenius/syncless-issue
[Bug] In-flight messages in the message queue are lost when switching conversations
- Dominant language
- No language data
- Stars
- 4
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Pending (in-flight) messages in the message queue are silently discarded when the user switches to a different conversation. Any associated file writes (e.g. `.md` files being streamed/saved) are also lost — the file ends up empty or missing entirely.
## Steps to Reproduce
1. Start a task where the Agent is writing output to a file (e.g. a `.md` report) and messages are still in-flight / queued.
2. Before the queue drains completely, switch to a different conversation tab or dialog.
3. Switch back to the original conversation.
## Expected Behavior
In-flight messages should be persisted regardless of which conversation is currently active. The message queue should continue processing in the background, and any associated file writes should complete normally.
## Actual Behavior
All pending messages in the queue are dropped the moment the conversation is deactivated. The `.md` file (or other output) that was being written is gone — content is lost with no warning or recovery option.
## Impact
**High** — this is a silent data loss bug. The user has no indication that messages were dropped, and there is no way to recover the lost content. Switching conversations is a completely normal action that should never cause data loss.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue while an Agent task has messages in flight and a file is being written, then trace what happens to the message queue when the conversation is deactivated. Check how queued messages and associated file writes are handled after switching conversations. Done means the queue continues processing in the background and the output file is preserved when returning to the original conversation.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100