{"record":{"id":"03b1fd0f8a8d247a","repo":"plandex-ai/plandex","slug":"panic-in-gennotename-v-s","errorCode":null,"errorMessage":"panic in GenNoteName: %v\n%s","messagePattern":"panic in GenNoteName: (.+?)\n(.+?)","errorType":"panic","errorClass":null,"httpStatus":500,"severity":"error","filePath":"app/server/handlers/context_helper.go","lineNumber":186,"sourceCode":"\t\t\t\t\tOrgUserConfig: orgUserConfig,\n\t\t\t\t})\n\n\t\t\t\tif err != nil {\n\t\t\t\t\terrCh <- fmt.Errorf(\"error generating name for piped data: %v\", err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tcontext.Name = name\n\t\t\t\terrCh <- nil\n\t\t\t}(context)\n\t\t} else if context.ContextType == shared.ContextNoteType {\n\t\t\tnum++\n\n\t\t\tgo func(context *shared.LoadContextParams) {\n\t\t\t\tdefer func() {\n\t\t\t\t\tif r := recover(); r != nil {\n\t\t\t\t\t\tlog.Printf(\"panic in GenNoteName: %v\\n%s\", r, debug.Stack())\n\t\t\t\t\t\terrCh <- fmt.Errorf(\"panic in GenNoteName: %v\\n%s\", r, debug.Stack())\n\t\t\t\t\t\truntime.Goexit() // don't allow outer function to continue and double-send to channel\n\t\t\t\t\t}\n\t\t\t\t}()\n\n\t\t\t\tname, err := model.GenNoteName(r.Context(), auth, plan, settings, orgUserConfig, clients, authVars, context.Body, context.SessionId)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\terrCh <- fmt.Errorf(\"error generating name for note: %v\", err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tcontext.Name = name\n\t\t\t\terrCh <- nil\n\t\t\t}(context)\n\t\t}\n\t}\n\tif num > 0 {\n\t\tfor i := 0; i < num; i++ {","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/handlers/context_helper.go#L168-L204","documentation":"Recovery guard in the note-name goroutine of the LoadContext handler: model.GenNoteName panicked while naming a note context. The panic and stack are logged and converted to this error via errCh, with Goexit preventing double-send.","triggerScenarios":"Thrown at app/server/handlers/context_helper.go:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the logged stack trace to locate the panic","Check for nil settings/clients passed into GenNoteName","Fix the underlying bug; the recover only prevents a server crash"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}