sipeed/picoclaw · error
failed to resolve sessions directory
Error message
failed to resolve sessions directory
What it means
Error "failed to resolve sessions directory" thrown in sipeed/picoclaw.
Source
Thrown at web/backend/api/session.go:823
if len(workspace) > 0 && workspace[0] == '~' {
home, _ := os.UserHomeDir()
if len(workspace) > 1 && workspace[1] == '/' {
workspace = home + workspace[1:]
} else {
workspace = home
}
}
return filepath.Join(workspace, "sessions")
}
// handleListSessions returns a list of Pico session summaries.
//
// GET /api/sessions
func (h *Handler) handleListSessions(w http.ResponseWriter, r *http.Request) {
dir, toolFeedbackMaxArgsLength, err := h.sessionRuntimeSettings()
if err != nil {
http.Error(w, "failed to resolve sessions directory", http.StatusInternalServerError)
return
}
if _, err := os.ReadDir(dir); err != nil {
// Directory doesn't exist yet = no sessions
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode([]sessionListItem{})
return
}
items := []sessionListItem{}
seen := make(map[string]struct{})
if refs, findErr := h.findPicoJSONLSessions(dir); findErr == nil {
for _, ref := range refs {
sess, loadErr := h.readJSONLSession(dir, ref.Key)
if loadErr != nil || isEmptySession(sess) {
continueView on GitHub (pinned to 49183d7e8d)
When it happens
Trigger: Thrown at web/backend/api/session.go:823 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/a4a6d2a499ab353f.
Report an issue: GitHub.