{"record":{"id":"2a804cf7b9312a7e","repo":"chenhg5/cc-connect","slug":"s-invalid-session-key-q","errorCode":null,"errorMessage":"%s: invalid session key %q","messagePattern":"(.+?): invalid session key %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/feishu/feishu.go","lineNumber":4440,"sourceCode":"// PlatformHealthInfo plumbing.\nfunc (p *Platform) IsGroupFilterDegraded() bool {\n\tp.mu.RLock()\n\tdefer p.mu.RUnlock()\n\treturn p.groupFilterDegraded\n}\n\nfunc stringValue(v *string) string {\n\tif v == nil {\n\t\treturn \"\"\n\t}\n\treturn *v\n}\n\nfunc (p *Platform) ReconstructReplyCtx(sessionKey string) (any, error) {\n\t// {platformName}:{chatID}:{userID}\n\tparts := strings.SplitN(sessionKey, \":\", 3)\n\tif len(parts) < 2 || parts[0] != p.platformName {\n\t\treturn nil, fmt.Errorf(\"%s: invalid session key %q\", p.tag(), sessionKey)\n\t}\n\trc := replyContext{chatID: parts[1], sessionKey: sessionKey}\n\tif len(parts) == 3 {\n\t\tif rootID, ok := parseThreadRootID(parts[2]); ok {\n\t\t\trc.messageID = rootID\n\t\t}\n\t}\n\treturn rc, nil\n}\n\n// RelayGroupVisibilityKey implements core.RelayGroupVisibilityTarget for\n// feishu.  When the caller session key targets a feishu thread (its\n// third colon-separated segment carries a non-empty \"root:\" or\n// \"thread:\" prefix produced by makeSessionKey), the visibility echo\n// gets routed back into that thread; otherwise the platform returns\n// (\"\", false) so core falls back to the channel-level \":relay\" default.\nfunc (p *Platform) RelayGroupVisibilityKey(callerSessionKey string) (string, bool) {\n\tparts := strings.SplitN(callerSessionKey, \":\", 3)","sourceCodeStart":4422,"sourceCodeEnd":4458,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/feishu/feishu.go#L4422-L4458","documentation":"Feishu ReconstructReplyCtx guard: sessionKey does not start with this platform's name or lacks the chatID segment ('<platform>:<chatID>[:<userID>]'), so no reply context can be rebuilt — typically a foreign or corrupted persisted session key.","triggerScenarios":"Thrown at platform/feishu/feishu.go:4440 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the source of the persisted session key","Start a new session to regenerate a valid key"],"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-14T00:17:10.932Z"}