sipeed/picoclaw · error

unsupported config version

Error message

unsupported config version: %d

What it means

Thrown in LoadConfig's version switch when the config's version field is greater than the binary's CurrentVersion. The config file was written by a newer release this binary cannot understand, so loading is aborted rather than silently misinterpreting newer fields.

Solutions

  1. Upgrade the application binary to a version that supports this config version
  2. If downgrading intentionally, manually set the config's version field to the highest version this binary supports (accepting possible data loss)
  3. Restore a config backup (config.json.YYYYMMDD.bak) created by a compatible version
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/config/config.go:1511 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/39c9b9d560f5508b. Report an issue: GitHub.

Appendix: source

Thrown at pkg/config/config.go:1511

		// Current version
		cfg, err = loadConfig(data)
		if err != nil {
			logger.ErrorCF(
				"config",
				formatDiagnosticLogMessage("Failed to load config", err),
				map[string]any{"path": path},
			)
			return nil, err
		}
		// Load security configuration
		secPath := securityPath(path)
		err = loadSecurityConfig(cfg, secPath)
		if err != nil && !errors.Is(err, os.ErrNotExist) {
			return nil, fmt.Errorf("failed to load security config: %w", err)
		}

	default:
		return nil, fmt.Errorf("unsupported config version: %d", versionInfo.Version)
	}

	applyLegacyBindingsMigration(data, cfg)

	gatewayHostBeforeEnv := cfg.Gateway.Host

	if err = env.Parse(cfg); err != nil {
		return nil, err
	}
	applySkillsRegistryEnvCompat(cfg)

	if err = InitChannelList(cfg.Channels); err != nil {
		return nil, err
	}
	if err = cfg.ValidateTurnProfile(); err != nil {
		return nil, err
	}
	cfg.Gateway.Host, err = resolveGatewayHostFromEnv(gatewayHostBeforeEnv)

View on GitHub (pinned to 49183d7e8d)