charmbracelet/crush · error
no providers configured - please run 'crush' to set up a pro
Error message
no providers configured - please run 'crush' to set up a provider interactively
What it means
Returned by `crush run` when the loaded config has no providers configured (Config.IsConfigured() is false). Non-interactive mode cannot open the setup wizard, so it directs the user to run interactive `crush` once to configure a provider/model and credentials.
Source
Thrown at internal/cmd/run.go:108
switch {
case sessionID != "":
event.SetContinueBySessionID(true)
case useLast:
event.SetContinueLastSession(true)
}
if useClientServer() {
c, ws, cleanup, err := connectToServer(cmd)
if err != nil {
return err
}
defer cleanup()
event.AppInitialized()
if !ws.Config.IsConfigured() {
return fmt.Errorf("no providers configured - please run 'crush' to set up a provider interactively")
}
clientWs := workspace.NewClientWorkspace(c, *ws)
if err := clientWs.InitCoderAgentNonInteractive(ctx); err != nil {
return fmt.Errorf("failed to initialize agent: %w", err)
}
if sessionID != "" {
sess, err := resolveSessionByID(ctx, c, ws.ID, sessionID)
if err != nil {
return err
}
sessionID = sess.ID
}
if verbose {
slog.SetDefault(slog.New(log.New(os.Stderr)))
}View on GitHub (pinned to 7944b8e522)
Solutions
- Run `crush` interactively once to complete provider setup
- Or create a crushrc/crush.json manually with a provider, model, and API key env var
- Export the required API key environment variable in your shell or CI secrets
- Verify the config is discovered by running from the project root
Example fix
# before: no providers configured crush run "task" # error # after: configure a provider export ANTHROPIC_API_KEY=sk-... crush # interactive setup, writes crush config crush run "task"
Defensive patterns
Strategy: validation
Validate before calling
cfg, err := config.Load(...)
if err != nil {
return err
}
if !cfg.IsConfigured() {
return fmt.Errorf("no providers configured; run 'crush' to set one up")
} Try / catch
if err := runCmd.Execute(); err != nil {
if strings.Contains(err.Error(), "no providers configured") {
slog.Error("Run 'crush' interactively once, or export the provider API key")
}
return err
} Prevention
- Complete interactive `crush` setup before using `run` in CI
- Export provider API keys in shell profiles or CI secrets
- Run from the project root so the config file is discovered
- Keep the config file present after migrating between formats
When it happens
Trigger: Fresh machine or repo with no crush.json/crushrc and no provider keys; config exists but defines no providers; running in CI where interactive setup was never completed.
Common situations: CI pipelines missing ANTHROPIC_API_KEY/OPENAI_API_KEY secrets; running crush outside the project directory so the config isn't discovered; deleted config files after a migration to crushrc.
Related errors
- no providers found
- no providers found matching %q
- invalid source %q, must be 'catwalk' or 'hyper'
- failed to configure providers: %w
- failed to configure selected models: %w
AI-assisted analysis of charmbracelet/crush@7944b8e522 (2026-08-29).
Data as JSON: /api/errors/fbdf8b32ec3f87b1.
Report an issue: GitHub.