vxcontrol/pentagi · error
pentester handler is required
Error message
pentester handler is required
What it means
Constructor validation error (backend/pkg/tools/tools.go): the flow tool-set factory was invoked with a nil Pentester handler in its config. Programming/configuration error — all agent handlers must be wired before building the flow's tool executor.
Source
Thrown at backend/pkg/tools/tools.go:834
func (fte *flowToolsExecutor) GetAssistantExecutor(cfg AssistantExecutorConfig) (ContextToolsExecutor, error) {
if cfg.Adviser == nil {
return nil, fmt.Errorf("adviser handler is required")
}
if cfg.Coder == nil {
return nil, fmt.Errorf("coder handler is required")
}
if cfg.Installer == nil {
return nil, fmt.Errorf("installer handler is required")
}
if cfg.Memorist == nil {
return nil, fmt.Errorf("memorist handler is required")
}
if cfg.Pentester == nil {
return nil, fmt.Errorf("pentester handler is required")
}
if cfg.Searcher == nil {
return nil, fmt.Errorf("searcher handler is required")
}
container, err := fte.db.GetFlowPrimaryContainer(context.Background(), fte.flowID)
if err != nil {
return nil, fmt.Errorf("failed to get container %d: %w", fte.flowID, err)
}
term := NewTerminalTool(
fte.flowID, nil, nil,
container.ID,
container.LocalID.String,
fte.cfg.TenantPrefix(),
fte.docker,
fte.tlp,View on GitHub (pinned to ea665308ba)
Solutions
- Assign a non-nil Pentester handler in AssistantExecutorConfig.
- Verify the pentester handler construction ran and returned non-nil.
- Add a pre-call nil check across all required handlers.
Example fix
// before
executor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{
Adviser: adviser, Coder: coder, Installer: installer, Memorist: memorist,
}) // Pentester nil
// after
executor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{
Adviser: adviser, Coder: coder, Installer: installer, Memorist: memorist, Pentester: pentester,
}) Defensive patterns
Strategy: validation
Validate before calling
if cfg.Pentester == nil {
return errors.New("pentester handler missing from AssistantExecutorConfig")
} Type guard
func hasPentester(cfg tools.AssistantExecutorConfig) bool {
return cfg.Pentester != nil
} Try / catch
executor, err := fte.GetAssistantExecutor(cfg)
if err != nil {
if strings.Contains(err.Error(), "pentester handler is required") {
return fmt.Errorf("wiring bug: pentester handler not built: %w", err)
}
return err
} Prevention
- Build the pentester handler unconditionally — it is the core agent.
- Check handler constructor errors immediately after each call.
- Add a smoke test that constructs the assistant executor with the full handler set.
When it happens
Trigger: Calling GetAssistantExecutor with cfg.Pentester == nil — the pentester handler was omitted from the config or its construction failed upstream.
Common situations: Stripped-down setups that omit the pentester agent; ignored construction errors leading to a nil handler; refactoring that dropped the field.
Related errors
- adviser handler is required
- coder handler is required
- installer handler is required
- memorist handler is required
- searcher handler is required
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/8caa622fed1a4954.
Report an issue: GitHub.