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
[bug] clicking "New" on an empty conversation creates duplicate empty sessions #246
On the Chat with AI panel, when the current conversation has no messages,
clicking "New conversation" creates a new empty session on every click
instead of reusing the current one. Empty sessions accumulate in the history
list and in project storage until the 100-conversation limit blocks new
sessions entirely.
Steps to reproduce
Open a project and the Chat with AI panel, with the current conversation
empty.
Click "New conversation" several times.
Open the history panel: one empty session has been created per click.
Cause
The client generates a fresh conversation ID per click, while the backend's
create path is idempotent only by conversation ID, so the dedupe never
matches: each request archives the previous empty session and creates a new
one. The same accumulation is reachable from the agent/HTTP entry points,
because "reuse the empty active session" is not enforced as a server-side
rule.
Proposed fix
Frontend: when the current conversation is empty, "New" reuses it instead
of creating a new session.
Backend: in the create path, return the current session when it is empty
instead of archiving it and creating a new one. This protects the agent
and HTTP entry points as well.
Acceptance
Repeated clicks with an empty current conversation produce exactly one
session, and the history list stops accumulating empty entries.
Backend contract test: repeated create against an empty current session is
idempotent.
changed the title [-]Assistant: clicking "New" on an empty conversation creates duplicate empty sessions[/-][+][bug] clicking "New" on an empty conversation creates duplicate empty sessions[/+]on Nov 9, 2026
Activity
[-]Assistant: clicking "New" on an empty conversation creates duplicate empty sessions[/-][+][bug] clicking "New" on an empty conversation creates duplicate empty sessions[/+]