nikivdev/code · error

remote commit message requires an active subscription. Visit

Error message

remote commit message requires an active subscription. Visit myflow to subscribe.

What it means

Thrown when the remote commit-message endpoint responds with HTTP 402 Payment Required, meaning the account has no active subscription. The message directs the user to subscribe via myflow.

Source

Thrown at src/commit.rs:13017

    let payload = json!({
        "diff": diff,
        "status": status,
        "truncated": truncated,
    });

    let response = client
        .post(&url)
        .bearer_auth(token)
        .json(&payload)
        .send()
        .context("failed to request remote commit message")?;

    if !response.status().is_success() {
        if response.status() == StatusCode::UNAUTHORIZED {
            bail!("remote commit message unauthorized. Run `f auth` to login.");
        }
        if response.status() == StatusCode::PAYMENT_REQUIRED {
            bail!(
                "remote commit message requires an active subscription. Visit myflow to subscribe."
            );
        }
        let status = response.status();
        let body = response.text().unwrap_or_default();
        bail!("remote commit message failed: HTTP {} {}", status, body);
    }

    let payload: RemoteCommitMessageResponse = response
        .json()
        .context("failed to parse remote commit message response")?;

    let message = payload.message.trim().to_string();
    if message.is_empty() {
        bail!("remote commit message was empty");
    }

    Ok(trim_quotes(&message))

View on GitHub (pinned to a747e741ae)

Solutions

  1. Subscribe or renew the subscription at myflow.
  2. Verify the payment method is valid and billing is current on the account.
  3. Log out and back in (`f auth`) so the client picks up updated entitlements.
  4. Confirm with the account/plan status endpoint whether quota or subscription is the blocker.
Defensive patterns

Strategy: validation

Validate before calling

// Verify subscription status before calling the remote endpoint
// e.g. via account/status API, or check cached entitlement flag
if !account.has_active_subscription {
    return Err(anyhow!("Subscription required. Visit myflow to subscribe."));
}

Type guard

fn subscription_active(status: &AccountStatus) -> bool {
    status.subscribed && !status.trial_expired
}

Try / catch

match result {
    Err(e) if e.to_string().contains("subscription") => {
        eprintln!("Subscribe at myflow to keep using remote AI commit messages.");
        open_subscribe_url();
    }
    other => other,
}

Prevention

When it happens

Trigger: Requesting AI commit messages from the remote API while the account's subscription is inactive, lapsed, or quota-exhausted.

Common situations: Free trial ended; subscription payment failed/expired; account downgraded; usage credits exhausted for the billing period.

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/6f7118474ea520da. Report an issue: GitHub.