multica-ai/multica · error
save config: %w
Error message
save config: %w
What it means
Returned by `multica setup` (cloud flow) when cli.SaveCLIConfigForProfile fails to persist the freshly confirmed cloud config (server_url/app_url pointing at Multica Cloud). It fires only after the user confirmed the overwrite prompt, and before login or daemon start, so no partial auth state is created.
Source
Thrown at server/cmd/multica/cmd_setup.go:161
return err
}
profile := resolveProfile(cmd)
cfg := cli.CLIConfig{
ServerURL: defaultCloudServerURL,
AppURL: defaultCloudAppURL,
}
ok, err := confirmOverwrite(profile, cfg.ServerURL, cfg.AppURL)
if err != nil {
return err
}
if !ok {
return nil
}
if err := cli.SaveCLIConfigForProfile(cfg, profile); err != nil {
return fmt.Errorf("save config: %w", err)
}
fmt.Fprintln(os.Stderr, "Configured for Multica Cloud (https://multica.ai).")
fmt.Fprintf(os.Stderr, " server_url: %s\n", cfg.ServerURL)
fmt.Fprintf(os.Stderr, " app_url: %s\n", cfg.AppURL)
printConfigLocation(profile)
// Authenticate.
fmt.Fprintln(os.Stderr, "")
if err := runLogin(cmd, args); err != nil {
return err
}
if err := runDaemonAfterSetup(cmd, args); err != nil {
return fmt.Errorf("start or restart daemon: %w", err)
}
fmt.Fprintln(os.Stderr, "\n✓ Setup complete! Your machine is now connected to Multica.")
View on GitHub (pinned to 2c0912b6ec)
Solutions
- Read the wrapped error to distinguish permission vs disk-full vs path issues.
- Ensure the profile config directory exists and is writable by the current user.
- Free disk space or remount the config volume read-write.
- Re-run `multica setup` and confirm the overwrite prompt again.
Defensive patterns
Strategy: try-catch
Try / catch
Wrap `multica setup` in the automation harness, on 'save config:' failure check the wrapped message for permission/disk causes, remediate, then re-run setup — it is idempotent (re-prompts overwrite).
Prevention
- Pre-create the config directory with correct ownership in provisioning scripts.
- Ensure HOME is set and writable in containers/CI.
- Run setup as the same user that will run the daemon.
When it happens
Trigger: Running `multica setup` and confirming, when the profile config file cannot be written: read-only home, permission mismatch, full disk, or an unwritable config directory.
Common situations: First-run on a machine with a locked-down home directory; config directory previously created by root or another user; running inside a container without a writable mount for ~/.config; CI contexts with HOME unset.
Related errors
- resolve workspaces_root: %w
- mint PAT: target API URL not set
- read --%s-file: %w
- --%s-file %q: empty contents%s
- max_concurrent_tasks must be an integer: %w
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/feedf98eb6014e91.
Report an issue: GitHub.