plandex-ai/plandex · error

Client version is too old for this endpoint. Please upgrade

Error message

Client version is too old for this endpoint. Please upgrade to version %s or later.

What it means

requireMinClientVersion enforces a minimum client version per endpoint by reading the X-Client-Version request header. If the header is missing, too old, or unparsable, the handler responds 400 with a message telling the user to upgrade to the required version. 'development' versions bypass the check.

Source

Thrown at app/server/handlers/auth_helpers.go:447

	resp := shared.SessionResponse{
		UserId:      user.Id,
		Token:       token,
		Email:       user.Email,
		UserName:    user.Name,
		Orgs:        apiOrgs,
		IsLocalMode: os.Getenv("GOENV") == "development" && os.Getenv("LOCAL_MODE") == "1",
	}

	return &resp, nil
}

func requireMinClientVersion(w http.ResponseWriter, r *http.Request, minVersion string) bool {
	msg := fmt.Sprintf("Client version is too old for this endpoint. Please upgrade to version %s or later.", minVersion)

	version := r.Header.Get("X-Client-Version")
	if version == "" {
		http.Error(w, msg, http.StatusBadRequest)
		return false
	}

	if version == "development" {
		return true
	}

	if semver.Compare(version, minVersion) < 0 {
		http.Error(w, msg, http.StatusBadRequest)
		return false
	}

	return true
}

func execAuthenticate(w http.ResponseWriter, r *http.Request, requireOrg bool, raiseErr bool) *types.ServerAuth {
	log.Println("authenticating request")

View on GitHub (pinned to e2d772072e)

Solutions

  1. Upgrade the client (CLI/extension) to at least the version named in the error message
  2. If using a custom script, add the X-Client-Version header with a current version value
  3. Set the version to 'development' only for local dev builds
  4. Check that proxies/gateways are not stripping the X-Client-Version header

Example fix

// before
req, _ := http.NewRequest("POST", url, body)
// after
req, _ := http.NewRequest("POST", url, body)
req.Header.Set("X-Client-Version", "1.2.0")
Defensive patterns

Strategy: validation

Validate before calling

if clientVersionAtLeast("1.2.0") {
    req.Header.Set("X-Client-Version", clientVersion)
} else {
    // prompt user to upgrade before calling model-pack endpoints
}

Try / catch

if resp.StatusCode == http.StatusBadRequest && strings.Contains(body, "Client version is too old") {
    return fmt.Errorf("upgrade client: %s", body)
}

Prevention

When it happens

Trigger: Calling UpsertCustomModelsHandler, ListCustomModelsHandler, CreateModelPackHandler, UpdateModelPackHandler, or ListModelPacksHandler without an X-Client-Version header, or with a version string older than the endpoint's minimum (or an unparsable value).

Common situations: Running an old CLI/extension against an upgraded server after new model-pack endpoints shipped; custom scripts or curl calls that omit the X-Client-Version header; corporate proxies stripping custom headers.

Related errors


AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05). Data as JSON: /api/errors/09188d15b80b874d. Report an issue: GitHub.