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
{{ message }}
Repository navigation
Bug: GET /api/sessions/:id returns 404 Session not found even with valid sessionId and cwd #18
The /api/sessions/:id endpoint always returns {"error":"Session not found"} even when the session ID is valid and appears in the /api/sessions list.
Reproduction
# Session exists in list
curl "http://127.0.0.1:4827/api/sessions?cwd=/Users/dahai/fusion/fusion-code"# Returns: sessions with sessionId "9f8bdb58-..."# But detail returns 404
curl "http://127.0.0.1:4827/api/sessions/9f8bdb58-...?cwd=/Users/dahai/fusion/fusion-code"# Returns: {"error":"Session not found"}
Root Cause
The /api/sessions list endpoint uses listSessionsImpl({dir: cwd}) which may resolve paths differently from the detail endpoint which uses:
The sanitizePath(cwd) maps /Users/dahai/fusion/fusion-code to -Users-dahai-fusion-fusion-code, but listSessionsImpl may resolve the session directory differently (e.g., by scanning cwd directly or using a different path mapping).
Expected
Both endpoints should resolve to the same project directory and find the same sessions.
Activity
fix: session detail 404 — use resolveSessionFilePath + parseSessionIn…
refactor(repl): extract setResponseLength pure helper (audit §1.1.1 s…
refactor(screens): extract stream message dispatch sub-block (audit 1…
refactor(screens): extract processInitialMessage 3-phase flow (audit …