{"record":{"id":"498ba28955996854","repo":"chenhg5/cc-connect","slug":"session-not-found-s","errorCode":null,"errorMessage":"session not found: %s","messagePattern":"session not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/cursor/cursor.go","lineNumber":399,"sourceCode":"\thash := workspaceHash(workDir)\n\tvar dirs []string\n\tfor _, base := range cursorChatsBaseDirs(homeDir) {\n\t\tdir := filepath.Join(base, hash)\n\t\tif info, err := os.Stat(dir); err == nil && info.IsDir() {\n\t\t\tdirs = append(dirs, dir)\n\t\t}\n\t}\n\treturn dirs\n}\n\nfunc findCursorSessionDir(homeDir, workDir, sessionID string) (string, error) {\n\tfor _, chatsDir := range workspaceChatsDirs(homeDir, workDir) {\n\t\tdir := filepath.Join(chatsDir, sessionID)\n\t\tif info, err := os.Stat(dir); err == nil && info.IsDir() {\n\t\t\treturn dir, nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"session not found: %s\", sessionID)\n}\n\nfunc listCursorSessions(workDir string) ([]core.AgentSessionInfo, error) {\n\thomeDir, err := os.UserHomeDir()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"cursor: cannot determine home dir: %w\", err)\n\t}\n\n\tchatsDirs := workspaceChatsDirs(homeDir, workDir)\n\tif len(chatsDirs) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tbyID := make(map[string]core.AgentSessionInfo)\n\tfor _, chatsDir := range chatsDirs {\n\t\tentries, err := os.ReadDir(chatsDir)\n\t\tif err != nil {\n\t\t\tif os.IsNotExist(err) {","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/cursor/cursor.go#L381-L417","documentation":"A sentinel from findCursorSessionDir: no directory named after the requested session ID exists in any of the workspace's known chats locations. It fires during DeleteSession when the ID is stale, already deleted, or belongs to a different workspace hash.","triggerScenarios":"Thrown at agent/cursor/cursor.go:399 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List sessions (/sessions) to get valid current IDs","Confirm the cc-connect working directory matches the session's workspace","Refresh — the session may have been deleted elsewhere"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}