Inherit the focused terminal's AI session when tabs merge, hand it back on dissolve, and remap side-panel open/layout/SFTP state so the panel does not look cleared. Co-authored-by: Cursor <cursoragent@cursor.com>