Conversation
…earProcessingState Two fixes discovered during live monitoring: 1. When a reconnect changes a session's ID (ResumeSessionAsync returns a different ID), the old ID was not added to _closedSessionIds. The merge in SaveActiveSessionsToDisk would find both the old and new entries and rename the old one to '(previous)'. Now the old ID is marked closed before updating to the new ID. 2. ForceCompleteProcessingAsync had the same manual field-clearing anti- pattern — 15+ fields cleared individually instead of calling ClearProcessingState. Refactored to use the atomic helper. Also adds health-monitoring skill for continuous PolyPilot session monitoring. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Covers DevTunnel chain, WsBridgeServer diagnostics, common mobile issues (blank sessions, stuck Working state, disconnects), bridge-specific diagnostic tags, and DevTunnel management commands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All 54 Console.WriteLine calls in WsBridgeServer now go through BridgeLog() which writes to event-diagnostics.log via CopilotService.LogBridgeDiagnostic(). This enables monitoring of: - Mobile client connect/disconnect - Bridge prompt dispatch and errors - WebSocket proxy lifecycle - Authentication events - State sync activity All messages use [BRIDGE] tag prefix for filtering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Multi-Model Code Review — PR #540PR: fix: phantom sessions on reconnect + ForceComplete consolidation + health monitoring skill Findings: None (consensus)Three independent reviewers examined the full diff. Several single-reviewer findings were raised but none achieved consensus:
✅ Verified Correct
🏁 Recommendation: ✅ ApproveClean, focused reliability fix. The reconnect phantom session fix closes a real gap. ForceComplete consolidation follows the established |
What
Two reliability fixes discovered during live monitoring, plus a new health-monitoring skill.
1. Phantom
(previous)sessions on reconnectWhen
ResumeSessionAsyncreturns a different session ID (server assigned a new one), the old ID was not added to_closedSessionIds. The merge inSaveActiveSessionsToDiskwould find both the old and new entries and rename the old one to(previous).Fix: Mark old session ID as closed before updating to the new one.
2. ForceCompleteProcessingAsync uses ClearProcessingState
Last remaining site that manually cleared 15+ fields instead of calling the atomic
ClearProcessingStatehelper. This was the code path used during reconnect bystander session cleanup.3. Health monitoring skill
New
.claude/skills/health-monitoring/SKILL.mdfor continuous PolyPilot session monitoring — covers single sessions, multi-agent, IDLE-DEFER, reconnect recovery audits, mobile/bridge/DevTunnel diagnostics.Testing