Skip to content

Conversation

@daniel-kurzynski
Copy link
Collaborator

Defer session persistence until the first prompt arrives instead of creating sessions immediately in new_session(). This prevents empty sessions from being created when the client opens multiple windows simultaneously but the user only interacts with one.

  • Add PendingSession struct to hold session config before materialization
  • Store pending sessions in a HashMap keyed by session ID
  • Materialize pending sessions on first prompt() call
  • Add create_session_with_id() to SessionManager for deferred creation

Defer session persistence until the first prompt arrives instead of
creating sessions immediately in new_session(). This prevents empty
sessions from being created when the client opens multiple windows
simultaneously but the user only interacts with one.

- Add PendingSession struct to hold session config before materialization
- Store pending sessions in a HashMap keyed by session ID
- Materialize pending sessions on first prompt() call
- Add create_session_with_id() to SessionManager for deferred creation
@stippi stippi merged commit d64d5d5 into main Feb 9, 2026
1 check passed
@stippi stippi deleted the fix-empty-session-cleanup branch February 9, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants