{"record":{"id":"3a4a16cbb71cc1c2","repo":"vxcontrol/pentagi","slug":"searcher-handler-is-required","errorCode":null,"errorMessage":"searcher handler is required","messagePattern":"searcher handler is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/tools.go","lineNumber":838,"sourceCode":"\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,\n\t\tcontainer.LocalID.String,\n\t\tfte.cfg.TenantPrefix(),\n\t\tfte.docker,\n\t\tfte.tlp,\n\t\ttime.Duration(fte.cfg.TerminalToolTimeout)*time.Second,\n\t)\n\n\tdefinitions := []llms.FunctionDefinition{","sourceCodeStart":820,"sourceCodeEnd":856,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/tools.go#L820-L856","documentation":"Constructor validation error (backend/pkg/tools/tools.go): the flow tool-set factory was invoked with a nil Searcher 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.Searcher == nil, e.g. when no search engine is configured so the searcher handler was never built.","commonSituations":"Deployments with no search provider keys configured (DuckDuckGo/Google/Tavily etc.), producing a nil searcher; partial agent wiring.","solutions":["Assign a non-nil Searcher handler in AssistantExecutorConfig.","Configure at least one search engine in the environment so the searcher 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, Memorist: memorist, Pentester: pentester,\n}) // Searcher nil\n// after\nexecutor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{\n  Adviser: adviser, Coder: coder, Installer: installer, Memorist: memorist, Pentester: pentester, Searcher: searcher,\n})","handlingStrategy":"validation","validationCode":"if cfg.Searcher == nil {\n    return errors.New(\"searcher handler missing from AssistantExecutorConfig\")\n}","typeGuard":"func hasSearcher(cfg tools.AssistantExecutorConfig) bool {\n    return cfg.Searcher != nil\n}","tryCatchPattern":"executor, err := fte.GetAssistantExecutor(cfg)\nif err != nil {\n    if strings.Contains(err.Error(), \"searcher handler is required\") {\n        // verify at least one search engine is configured\n        return err\n    }\n    return err\n}","preventionTips":["Configure at least one search engine (e.g. DuckDuckGo needs no key) before starting flows.","Fail startup with a clear message when no search provider is available.","Build the searcher handler even with a degraded/fallback engine list."],"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"}