[BUG] Swapping Server Tabs on App Builder loses the conversation history and state
- Dominant language
- TypeScript
- Stars
- 2.2k
- Forks
- 283
- Avg merge
- 11h 47m
- Merged PRs (30d)
- 737
Description
# Issue
the app builder, when you switch between servers, the chat session resets and you lose the previous chat context. This happens because each server connection is treated as a separate session, and the chat state is not preserved across server switches.
# How to reproduce
1. Connect 2 MCP Servers
2. Click on 'App Builder'
3. Start a chat with one server
4. Switch to another server
5. Start new chat
6. Go Back to first server
7. See Chat history gone. Chat is blank
# Expected Behavior
Chat history is preserved when swapping between servers
# Screenshots
If applicable, add screenshots to help explain your problem.
# Platform
- `npx` / Docker / Mac App
# Additional Context
## Why
The chat session is keyed by the selected server(s).
When you change servers, a new session ID is generated and the message history is cleared. This ensures that messages are only sent to the currently selected server(s) and avoids mixing contexts.
**Possible improvements:**
Implement session history per server, so switching back restores the previous chat.
Add a warning or prompt before clearing the chat when switching servers. If you want to keep chat context when switching, you’d need to change the session management logic to cache and restore chat state per server.
Contributor guide
Research direction
Start in the App Builder chat and session-management entry points, tracing how the selected server(s) determine the session ID and message history. Reproduce the issue with two MCP servers, then verify that switching back restores the prior conversation and state without mixing server contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100