When reopening a thread that is already visible in the agent panel, `open_thread` could recreate the session instead of reusing the existing visible thread. That left the UI holding a thread whose backend session could be closed out from under it. This change routes `AgentPanel::open_thread` through `load_agent_thread`, which already handles the right behavior for existing sessions: - reuse the active thread when it already matches - promote a retained thread when it matches - only load when the session is not already present The regression coverage is now a focused behavioral test at the `AgentPanel::open_thread` boundary that verifies reopening an already-visible session keeps the thread usable. cc @bennetbo Release Notes: - Fixed reopening an already-visible agent thread so it reuses the existing session instead of creating a broken duplicate.
1 file changedLine totals unavailable