You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Archived session loses messages and becomes inaccessible when interacted with #16030
When navigating to an archived session (e.g. via URL) and sending a prompt, two things break:
"Unable to retrieve session" toast — the session disappears from the reactive store, so the prompt input can't find it
Messages vanish — the entire message history, parts, diffs, todos, permissions, and questions are deleted from the UI store
Steps to reproduce
Archive a session (via sidebar context menu)
Navigate back to it (e.g. via browser URL/history)
Session loads correctly — messages visible
Send a prompt
Messages disappear and toast shows "Unable to retrieve session"
Root cause
Session.touch() (called during prompting via SessionPrompt.prompt()) publishes an SSE session.updated event with the full session info — including time.archived still set. The frontend event-reducer.tssession.updated handler sees info.time.archived as truthy and unconditionally:
Removes the session from store.session (sidebar list)
Calls cleanupSessionCaches() which deletes all messages, parts, diffs, todos, permissions, questions, and session_status
This makes sync.session.get(id) return undefined → submit.ts shows the error toast. And since messages are deleted from the store, the timeline goes blank.
Expected behavior
Interacting with an archived session should unarchive it and place it back in the sessions sidebar. Message caches should not be destroyed when a session is archived since archive is reversible.
Activity
github-actions commentedon Jun 26, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.