vxcontrol/pentagi · error
adviser handler is required
Error message
adviser handler is required
What it means
GetAssistantExecutor requires all agent handler fields of AssistantExecutorConfig to be non-nil, starting with Adviser. The Adviser handler backs the LLM 'advise' tool used by the assistant executor; without it the executor would panic or fail at call time, so construction fails fast with this error.
Source
Thrown at backend/pkg/tools/tools.go:818
userID: fte.userID,
flowID: fte.flowID,
taskID: cfg.TaskID,
subtaskID: cfg.SubtaskID,
mlp: fte.mlp,
tclp: fte.tclp,
vslp: fte.vslp,
db: fte.db,
store: fte.store,
definitions: cfg.Definitions,
handlers: cfg.Handlers,
barriers: barriers,
summarizer: cfg.Summarizer,
}, nil
}
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")
}
View on GitHub (pinned to ea665308ba)
Solutions
- Supply a non-nil Adviser handler in AssistantExecutorConfig before calling GetAssistantExecutor.
- Verify the handler-construction function that builds Adviser is actually called and its error checked.
- Check upstream config (env/DB prompt settings) that gates whether the adviser handler is created.
Example fix
// before
executor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{
Coder: coder,
}) // Adviser nil
// after
executor, err := fte.GetAssistantExecutor(AssistantExecutorConfig{
Adviser: adviser,
Coder: coder,
}) Defensive patterns
Strategy: validation
Validate before calling
if cfg.Adviser == nil || cfg.Coder == nil || cfg.Installer == nil || cfg.Memorist == nil || cfg.Pentester == nil || cfg.Searcher == nil {
return errors.New("assistant executor config incomplete")
} Type guard
func validAssistantConfig(cfg tools.AssistantExecutorConfig) bool {
return cfg.Adviser != nil
} Try / catch
executor, err := fte.GetAssistantExecutor(cfg)
if err != nil {
if strings.Contains(err.Error(), "handler is required") {
// log which fields were nil; fail fast before agent start
}
return err
} Prevention
- Build all agent handlers in one constructor and pass them together.
- Check every handler construction error immediately; never ignore a nil result.
- Use a single config struct literal so all fields are visible at the call site.
When it happens
Trigger: Calling GetAssistantExecutor with a struct literal or a programmatically built AssistantExecutorConfig whose Adviser field is nil — e.g. skipping Adviser when wiring only a subset of agent handlers.
Common situations: Partial wiring of handlers in provider setup code; a config struct built conditionally where the Adviser assignment is skipped; copy-pasting an executor config from a path that does not supply Adviser.
Related errors
- coder handler is required
- installer handler is required
- memorist handler is required
- pentester handler is required
- searcher handler is required
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/a5da6e032899674d.
Report an issue: GitHub.