# PLAN - [x] Reproduce the likely color-update path from `session ended` through `setAgentConnected`. - [x] Fix stale model state: `setAgentConnected` now updates the visible model even when its cache already matches the requested value. - [x] Ensure session-ended updates every visible agent entry to disconnected/red. - [x] Verify the focused change and available diagnostics/build checks. > The focused code was reviewed directly. Full LSP/build verification remains unavailable because the language server lacks Qt include paths and no build-execution tool is exposed.