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
Implement backend session creation for Matrix rooms
MAJOR ARCHITECTURAL IMPROVEMENT: Matrix sessions now create real backend sessions
Key Changes:
- Added createMappingWithBackendSession() to SessionMappingService
- Matrix rooms now call startAgent API to create actual backend sessions
- Session mappings use real backend session IDs instead of generated ones
- Updated MatrixService.createAISession() to use backend session creation
- Updated MatrixService.ensureSessionMapping() to create backend sessions
- Added fallback to old method if backend session creation fails
Benefits:
- Matrix sessions are now fully compatible with backend APIs
- No more 'Failed to read session: Session not found' errors
- Session token counting works correctly for Matrix sessions
- SSE streams work properly with Matrix sessions
- Full session persistence and reload functionality
- Eliminates the need for frontend-only workarounds
This resolves the fundamental issue where Matrix sessions existed only in the frontend
but had no corresponding backend session data. Now Matrix collaborative sessions
are treated as first-class citizens with proper backend integration.
0 commit comments