{"record":{"id":"568ccdc8d4b05104","repo":"sipeed/picoclaw","slug":"session-not-found-568ccd","errorCode":null,"errorMessage":"session not found","messagePattern":"session not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"web/backend/api/session.go","lineNumber":933,"sourceCode":"\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}\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tif legacyRef, legacyErr := h.findLegacyPicoSession(dir, sessionID); legacyErr == nil {\n\t\t\t\tsess, err = h.readLegacySession(legacyRef.Path)\n\t\t\t}\n\t\t\tif err == nil && isEmptySession(sess) {\n\t\t\t\terr = os.ErrNotExist\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\thttp.Error(w, \"session not found\", http.StatusNotFound)\n\t\t\t} else {\n\t\t\t\thttp.Error(w, \"failed to parse session\", http.StatusInternalServerError)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\n\tfor i := range sess.Messages {\n\t\tif sess.Messages[i].CreatedAt == nil {\n\t\t\tsess.Messages[i].CreatedAt = &sess.Updated\n\t\t}\n\t}\n\tmessages := detailSessionMessages(sess.Messages, toolFeedbackMaxArgsLength)\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(map[string]any{\n\t\t\"id\":       sessionID,\n\t\t\"messages\": messages,","sourceCodeStart":915,"sourceCodeEnd":951,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/web/backend/api/session.go#L915-L951","documentation":"Error \"session not found\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at web/backend/api/session.go:933 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"}