{"record":{"id":"11be358c547c5762","repo":"davila7/claude-code-templates","slug":"session-not-found","errorCode":null,"errorMessage":"Session not found","messagePattern":"Session not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"warning","filePath":"cli-tool/src/teams-dashboard.js","lineNumber":678,"sourceCode":"\n    // Global summary stats\n    this.app.get('/api/summary', async (req, res) => {\n      try {\n        res.json({\n          totalSessions: this.sessions.length,\n          totalAgents: this.sessions.reduce((sum, s) => sum + s.agentCount, 0),\n          timestamp: new Date().toISOString()\n        });\n      } catch (error) {\n        res.status(500).json({ error: 'Failed to load summary' });\n      }\n    });\n\n    // Full session detail (triggers parse)\n    this.app.get('/api/sessions/:id', async (req, res) => {\n      try {\n        const session = await this.parseFullSession(req.params.id);\n        if (!session) return res.status(404).json({ error: 'Session not found' });\n\n        res.json({\n          id: session.id,\n          projectName: session.projectName,\n          gitBranch: session.gitBranch,\n          startTime: session.startTime,\n          endTime: session.endTime,\n          duration: session.duration,\n          agents: session.agents,\n          teammateNames: session.teammateNames,\n          stats: session.stats\n        });\n      } catch (error) {\n        res.status(500).json({ error: 'Failed to load session' });\n      }\n    });\n\n    // Timeline (paginated)","sourceCodeStart":660,"sourceCodeEnd":696,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/teams-dashboard.js#L660-L696","documentation":"HTTP 404 from the teams dashboard GET /api/sessions/:id when parseFullSession(id) returns null — no session file with that id exists or it could not be resolved.","triggerScenarios":"GET /api/sessions/<unknown-id>; session file deleted between list and detail view; id with wrong case/format.","commonSituations":"Stale session list in UI after files cleaned up; mistyped or truncated session id.","solutions":["GET /api/sessions to list valid ids and use one","Verify the session file still exists on disk","Re-check the id format (must match parsed session ids exactly)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const ids = (await (await fetch('/api/sessions')).json()).sessions.map(s => s.id);\nif (!ids.includes(id)) throw new Error('unknown session');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always resolve ids from the live session list","Handle 404 by refreshing the list"],"tags":["http-404","teams-dashboard","express"],"backgroundTag":"resource-not-found","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}