Skip to content

Opening the panel shows New session after a failed restore #543

Open

Description

@jensenojs

Opening the panel kept showing New session instead of the session I had been using.

Restore did run. The snapshot for this project already pointed at a session the server answered 404 for. The failed lookup is dropped, so restore finished with no active session, and open then created a blank one. That blank session is what the panel shows as New session. A later toggle in the same process only observed it, which is why that open has no snapshot lookup in the log.

How that id got into the snapshot is not recoverable. The server log has no successful response for it, the database has no row for it, and the snapshot file was overwritten by a later manual session switch. A snapshot write does not record which session id it stored or what triggered the write, and a failed lookup does not record which id was missing.

Activity

  1. self-assigned this
    on Oct 20, 2026
  2. changed the title [-]Opening the panel persists an empty session, so the next open shows New session[/-] [+]Opening the panel shows New session after restore looks up a session the server does not have[/+] on Oct 20, 2026
  3. changed the title [-]Opening the panel shows New session after restore looks up a session the server does not have[/-] [+][bug] : Opening the panel shows New session after restore looks up a session the server does not have [/+] on Oct 20, 2026
  4. changed the title [-][bug] : Opening the panel shows New session after restore looks up a session the server does not have [/-] [+]Opening the panel shows New session after a failed restore[/+] on Oct 20, 2026
  5. jensenojs commented on Oct 20, 2026

    @jensenojs
    CollaboratorAuthor

    Action Items:

    • : Log the missing session ID whenever a snapshot lookup returns 404.
    • : Log the target session ID and trigger source on every snapshot write.
    • : Ensure logging.outfile applies during setup(), not on module load.
    • : Defer session creation until the first prompt is submitted; never persist blank sessions to the snapshot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions