{"record":{"id":"82e835704904a6f7","repo":"vxcontrol/pentagi","slug":"installer-handler-is-required","errorCode":null,"errorMessage":"installer handler is required","messagePattern":"installer handler is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/tools/tools.go","lineNumber":826,"sourceCode":"\t\tstore:       fte.store,\n\t\tdefinitions: cfg.Definitions,\n\t\thandlers:    cfg.Handlers,\n\t\tbarriers:    barriers,\n\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}","sourceCodeStart":808,"sourceCodeEnd":844,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/tools.go#L808-L844","documentation":"GetAssistantExecutor requires the Installer handler to be non-nil; it backs the 'installer' tool that installs packages in the sandbox container. Construction fails fast with this error when Installer is nil.","triggerScenarios":"Calling GetAssistantExecutor with cfg.Installer == nil, e.g. omitting the installer handler when building the config struct.","commonSituations":"Partial agent wiring in custom deployments; installer handler creation skipped behind a feature flag; refactoring dropped the field assignment.","solutions":["Assign a non-nil Installer handler in AssistantExecutorConfig.","Verify the installer handler construction path executed and returned non-nil.","Validate the full config struct before calling GetAssistantExecutor."],"exampleFix":"// before\nexecutor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{\n  Adviser: adviser, Coder: coder,\n}) // Installer nil\n// after\nexecutor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{\n  Adviser: adviser, Coder: coder, Installer: installer,\n})","handlingStrategy":"validation","validationCode":"if cfg.Installer == nil {\n    return errors.New(\"installer handler missing from AssistantExecutorConfig\")\n}","typeGuard":"func hasInstaller(cfg tools.AssistantExecutorConfig) bool {\n    return cfg.Installer != nil\n}","tryCatchPattern":"executor, err := fte.GetAssistantExecutor(cfg)\nif err != nil {\n    if strings.Contains(err.Error(), \"installer handler is required\") {\n        return fmt.Errorf(\"wiring bug: installer handler not built: %w\", err)\n    }\n    return err\n}","preventionTips":["Do not gate installer handler creation behind optional feature flags.","Construct all handlers in one place and assert non-nil before use.","Cover executor construction in integration tests."],"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"}