multica-ai/multica · error
server URL not configured
Error message
server URL not configured
What it means
Thrown by autoWatchWorkspaces when the saved profile has a token but an empty ServerURL, so the CLI cannot construct an API client base URL. It is the second fail-closed guard (after the token check) in the post-login workspace watch flow.
Source
Thrown at server/cmd/multica/cmd_login.go:100
fmt.Fprintf(os.Stderr, "\n→ Run 'multica daemon start' to start your local agent runtime.\n")
return nil
}
func autoWatchWorkspaces(cmd *cobra.Command) error {
// runLogin has already passed the human/local command guard and saved the
// newly authenticated profile. Read that exact profile here rather than the
// general task-safe resolvers, which intentionally fail closed on a lone
// MULTICA_DAEMON_PORT signal.
profile := resolveProfile(cmd)
cfg, err := cli.LoadCLIConfigForProfile(profile)
if err != nil {
return err
}
if cfg.Token == "" {
return fmt.Errorf("not authenticated")
}
if cfg.ServerURL == "" {
return fmt.Errorf("server URL not configured")
}
client := cli.NewAPIClient(normalizeAPIBaseURL(cfg.ServerURL), "", cfg.Token)
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
var workspaces []struct {
ID string `json:"id"`
Name string `json:"name"`
}
if err := client.GetJSON(ctx, "/api/workspaces", &workspaces); err != nil {
return fmt.Errorf("list workspaces: %w", err)
}
if len(workspaces) == 0 {
var err error
workspaces, err = waitForWorkspaceCreation(cmd, client)
if err != nil {View on GitHub (pinned to 2c0912b6ec)
Solutions
- Set the server URL in the profile config (or via the CLI's server configuration flag/env) and re-run login
- Re-run `multica login` fully so both token and server URL are persisted together
- Check for config field rename if upgrading from an older CLI version
Defensive patterns
Strategy: validation
Validate before calling
# bash: confirm both token and server URL before relying on the profile
multica config show --output json 2>/dev/null \
| jq -e '.server_url | length > 0' >/dev/null \
|| { echo "server URL missing in profile — set it and re-login" >&2; exit 2; } Prevention
- Never hand-edit profiles to drop server URLs
- After upgrades, check for renamed config fields
- Complete the full login flow so token and URL persist together
When it happens
Trigger: Profile config written with a token but no server URL — e.g. a login against an implicit/default server whose URL was not persisted; manual editing of the config file that dropped the field; a config schema change losing the key.
Common situations: Hand-edited or migrated config files; older CLI versions writing a different field name; provisioning scripts that create partial profiles.
Related errors
- not authenticated
- get source agent: %w
- invalid token format: must start with %s
- unsupported platform: %s
- could not start the local login callback server (used to rec
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/274467a9fbc25e3a.
Report an issue: GitHub.