{"record":{"id":"3c2957e8ed17d42b","repo":"sipeed/picoclaw","slug":"missing-session-id","errorCode":null,"errorMessage":"missing session id","messagePattern":"missing session id","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"web/backend/api/session.go","lineNumber":903,"sourceCode":"\t\titems = []sessionListItem{} // Out of bounds, return empty\n\t} else {\n\t\tif end > totalItems {\n\t\t\tend = totalItems\n\t\t}\n\t\titems = items[offset:end]\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(items)\n}\n\n// handleGetSession returns the full message history for a specific session.\n//\n//\tGET /api/sessions/{id}\nfunc (h *Handler) handleGetSession(w http.ResponseWriter, r *http.Request) {\n\tsessionID := r.PathValue(\"id\")\n\tif sessionID == \"\" {\n\t\thttp.Error(w, \"missing session id\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tdir, toolFeedbackMaxArgsLength, err := h.sessionRuntimeSettings()\n\tif err != nil {\n\t\thttp.Error(w, \"failed to resolve sessions directory\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tref, refErr := h.findPicoJSONLSession(dir, sessionID)\n\tvar sess sessionFile\n\terr = refErr\n\tif refErr == nil {\n\t\tsess, err = h.readJSONLSession(dir, ref.Key)\n\t}\n\tif err == nil && isEmptySession(sess) {\n\t\terr = os.ErrNotExist\n\t}","sourceCodeStart":885,"sourceCodeEnd":921,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/web/backend/api/session.go#L885-L921","documentation":"Error \"missing session id\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at web/backend/api/session.go:903 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}