Summary
When using /session <name> to switch to a new session in the webchat or TUI, the session does not appear in the session dropdown/picker until a message is actually sent.
Steps to Reproduce
- Open webchat Control UI
- Run
/session chat1
- Run
/session chat2
- Open the session dropdown
Expected
chat1 and chat2 should appear in the session list immediately after switching.
Actual
Only previously-used sessions appear. The new sessions are not visible until you send a message to them.
Root Cause
/session <name> only updates the client-side session key (stored in localStorage for webchat, or in state for TUI). The session entry is not created in sessions.json until there's actual activity (message sent/received). The session list (sessions.list) is populated from sessions.json.
Suggested Fix
When switching sessions via /session, call sessions.patch with the session key to ensure it gets created in the store (even if empty). The sessions.patch handler already supports creating new sessions:
// In setSession (tui-session-actions.js or webchat equivalent)
await client.patchSession({ key: nextKey });
This creates the session entry immediately, making it visible in dropdowns.
Workaround
Send any message to the session, or manually call sessions.patch via the gateway API.
Version
2026.1.30
Summary
When using
/session <name>to switch to a new session in the webchat or TUI, the session does not appear in the session dropdown/picker until a message is actually sent.Steps to Reproduce
/session chat1/session chat2Expected
chat1andchat2should appear in the session list immediately after switching.Actual
Only previously-used sessions appear. The new sessions are not visible until you send a message to them.
Root Cause
/session <name>only updates the client-side session key (stored in localStorage for webchat, or in state for TUI). The session entry is not created insessions.jsonuntil there's actual activity (message sent/received). The session list (sessions.list) is populated fromsessions.json.Suggested Fix
When switching sessions via
/session, callsessions.patchwith the session key to ensure it gets created in the store (even if empty). Thesessions.patchhandler already supports creating new sessions:This creates the session entry immediately, making it visible in dropdowns.
Workaround
Send any message to the session, or manually call
sessions.patchvia the gateway API.Version
2026.1.30