Release native chat runtimes on lifecycle changes

Ensure /new and chat close stop native foreground and background work before changing registry state. Preserve transcripts while surfacing release and recovery cleanup failures instead of reporting false success, with focused adapter and server regressions.
This commit is contained in:
2026-11-11 17:11:40 +00:00
parent a5912d9a1e
commit 2307d45417
11 changed files with 197 additions and 14 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ func (m *chatManager) Close() {
func (m *chatManager) ReleaseSession(ctx context.Context, sessionID string) error {
adapter, err := m.brokerFor(ctx, sessionID)
if err != nil {
return nil
return err
}
if releaser, ok := adapter.(chatSessionReleaser); ok {
return releaser.ReleaseSession(ctx, sessionID)