{"record":{"id":"8a64f56cbc3a3142","repo":"vxcontrol/pentagi","slug":"memorist-handler-is-required","errorCode":null,"errorMessage":"memorist handler is required","messagePattern":"memorist handler is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/tools.go","lineNumber":830,"sourceCode":"\t\tsummarizer:  cfg.Summarizer,\n\t}, nil\n}\n\nfunc (fte *flowToolsExecutor) GetAssistantExecutor(cfg AssistantExecutorConfig) (ContextToolsExecutor, error) {\n\tif cfg.Adviser == nil {\n\t\treturn nil, fmt.Errorf(\"adviser handler is required\")\n\t}\n\n\tif cfg.Coder == nil {\n\t\treturn nil, fmt.Errorf(\"coder handler is required\")\n\t}\n\n\tif cfg.Installer == nil {\n\t\treturn nil, fmt.Errorf(\"installer handler is required\")\n\t}\n\n\tif cfg.Memorist == nil {\n\t\treturn nil, fmt.Errorf(\"memorist handler is required\")\n\t}\n\n\tif cfg.Pentester == nil {\n\t\treturn nil, fmt.Errorf(\"pentester handler is required\")\n\t}\n\n\tif cfg.Searcher == nil {\n\t\treturn nil, fmt.Errorf(\"searcher handler is required\")\n\t}\n\n\tcontainer, err := fte.db.GetFlowPrimaryContainer(context.Background(), fte.flowID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get container %d: %w\", fte.flowID, err)\n\t}\n\n\tterm := NewTerminalTool(\n\t\tfte.flowID, nil, nil,\n\t\tcontainer.ID,","sourceCodeStart":812,"sourceCodeEnd":848,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/tools.go#L812-L848","documentation":"Constructor validation error (backend/pkg/tools/tools.go): the flow tool-set factory was invoked with a nil Memorist handler in its config. Programming/configuration error — all agent handlers must be wired before building the flow's tool executor.","triggerScenarios":"Calling GetAssistantExecutor with cfg.Memorist == nil, e.g. when the memory store/embedder is disabled upstream so the memorist handler was never created.","commonSituations":"Deployments without the pgvector/embedding backend configured, causing the memorist handler to be nil; partial wiring of agent handlers.","solutions":["Assign a non-nil Memorist handler in AssistantExecutorConfig.","Check that the memory store and embedding provider are configured so the memorist handler is created.","Validate all required handler fields before calling GetAssistantExecutor."],"exampleFix":"// before\nexecutor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{\n  Adviser: adviser, Coder: coder, Installer: installer,\n}) // Memorist nil\n// after\nexecutor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{\n  Adviser: adviser, Coder: coder, Installer: installer, Memorist: memorist,\n})","handlingStrategy":"validation","validationCode":"if cfg.Memorist == nil {\n    return errors.New(\"memorist handler missing from AssistantExecutorConfig\")\n}","typeGuard":"func hasMemorist(cfg tools.AssistantExecutorConfig) bool {\n    return cfg.Memorist != nil\n}","tryCatchPattern":"executor, err := fte.GetAssistantExecutor(cfg)\nif err != nil {\n    if strings.Contains(err.Error(), \"memorist handler is required\") {\n        // check memory store + embedding provider configuration\n        return err\n    }\n    return err\n}","preventionTips":["Verify pgvector and an embedding provider are configured before starting flows.","Treat memorist as mandatory; build it unconditionally in handler setup.","Log memory-store init failures loudly so a nil memorist is caught early."],"tags":["configuration","nil-handler","assistant-executor"],"backgroundTag":"required-handler-missing","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}