You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by: Zeus (LoL Stonks orchestrator) — first real user
Severity: CRITICAL — blocks all new task creation
Symptoms
New CC Bridge sessions get assigned claudeSessionId from OLD tasks. Claude responds with context from previous sessions instead of processing the new brief.
Reproduction (Zeus D51 Champion Pool Builder):
Attempt 1: got 186951e5 from D18-rune-details
Attempt 2: got fe7653c8 — responded with D19 Global Search output
Attempt 3: got 5490cf60 from D20-returning-player
All 3 attempts: Claude receives the D51 brief but responds with context from old sessions.
Root Cause Analysis
syncSessionMap() in session.ts matches session_map entries by windowId or windowName. After service restarts or prolonged uptime:
Old session_map.json entries survive with stale windowIds
New sessions get windowIds that collide with old entries (tmux reuses @N ids)
cleanSessionMapForWindow() (v1.2.1 fix) doesn't always clean — race condition between hook write and bridge read
purgeStaleSessionMapEntries() on startup helps but doesn't cover runtime collisions
Additional factor: archiveStaleSessionFiles() (v1.2.0) archives .jsonl files, but findSessionFile() can still find them via sessions-index.json entries that point to the original paths.
Fix Plan
Atomic session_map: clean ALL entries for a windowId/windowName BEFORE creating the session, not just on startup
Verify JSONL freshness: reject any claudeSessionId whose .jsonl mtime is older than the session createdAt
Reject archived paths: findSessionFile() should skip _archived/ paths (partially done but not comprehensive)
Timestamp guard: session_map entries should include a timestamp; reject entries older than the bridge session
Related
Partial fix in v1.2.1 (commit 27bfd59) — cleanSessionMapForWindow()
Partial fix in v1.2.0 (commit 52ddc8d) — archive .jsonl files
Bug Report
Reported by: Zeus (LoL Stonks orchestrator) — first real user
Severity: CRITICAL — blocks all new task creation
Symptoms
New CC Bridge sessions get assigned
claudeSessionIdfrom OLD tasks. Claude responds with context from previous sessions instead of processing the new brief.Reproduction (Zeus D51 Champion Pool Builder):
186951e5from D18-rune-detailsfe7653c8— responded with D19 Global Search output5490cf60from D20-returning-playerAll 3 attempts: Claude receives the D51 brief but responds with context from old sessions.
Root Cause Analysis
syncSessionMap()insession.tsmatches session_map entries by windowId or windowName. After service restarts or prolonged uptime:session_map.jsonentries survive with stale windowIds@Nids)cleanSessionMapForWindow()(v1.2.1 fix) doesn't always clean — race condition between hook write and bridge readpurgeStaleSessionMapEntries()on startup helps but doesn't cover runtime collisionsAdditional factor:
archiveStaleSessionFiles()(v1.2.0) archives .jsonl files, butfindSessionFile()can still find them viasessions-index.jsonentries that point to the original paths.Fix Plan
mtimeis older than the sessioncreatedAtfindSessionFile()should skip_archived/paths (partially done but not comprehensive)Related
27bfd59) —cleanSessionMapForWindow()52ddc8d) — archive .jsonl files