-
Notifications
You must be signed in to change notification settings - Fork 782
Open
Labels
bugWe can reproduce the issue and confirmed it is a bug.We can reproduce the issue and confirmed it is a bug.
Description
Problem
After logging out and logging back in (re-authentication), new conversations created before logout are not visible in the chat history list, even though they exist in the database file.
Steps to reproduce
- Log in to Amazon Q
- Start a new conversation and complete it
- Log out from Amazon Q (sign out)
- Log back in with the same account
- Open chat history panel
- Observe: The conversation created in step 2 is missing from the list
Expected behavior
The chat history list should display all conversations, including those created before re-authentication. The history should be reloaded from the database when logging back in.
Actual behavior
- New conversations created before logout are not visible in the UI history list
- However, the conversations do exist in the database file (
~/.aws/amazonq/history/chat-history-*.json) - The UI only shows conversations that were already in memory from the previous session
- Workaround: Restarting VS Code forces the history to reload correctly
Log evidence:
- First login:
amazonq_loadHistorytelemetry event is emitted ✓ - Re-login:
amazonq_loadHistorytelemetry event is not emitted ✗
Root cause analysis
The issue appears to be that:
- When logging out, the database connection is not properly closed/flushed
- When logging back in with a new connection ID, the in-memory history index is not reloaded
- The LSP server continues using the old in-memory index from before logout
Relevant log snippet:
13:39 First login
[2026-01-30T05:39:34.054Z] lserver: Initializing database at .../chat-history-b4dbba750d99ad0770122316d2f020bb.json
[VSCode Telemetry] Emitting amazonq_loadHistory telemetry
13:41 Re-login (after logout)
[Info - 1:41:17 PM] Runtime: Successfully saved bearer credentials
# ← No database initialization or amazonq_loadHistory telemetry!
Workaround
Restart VS Code after re-authentication to force history reload.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugWe can reproduce the issue and confirmed it is a bug.We can reproduce the issue and confirmed it is a bug.