nikivdev/code · error

remote review failed: HTTP {}

Error message

remote review failed: HTTP {}

What it means

Catch-all for any non-success HTTP status from the remote review service that is not 401 or 402 (e.g. 4xx/5xx). The status code is embedded in the message, so the specific server-side problem must be inferred from the code.

Source

Thrown at src/commit.rs:5490

    .context("failed to create HTTP client for remote review")?;

    let mut request = client.post(&review_url).json(&payload);
    if let Some(token) = commit_with_check_review_token() {
        request = request.bearer_auth(token);
    }

    let response = request
        .send()
        .context("failed to send remote review request")?;

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

    let payload: RemoteReviewResponse = response
        .json()
        .context("failed to parse remote review response")?;

    if !payload.stderr.trim().is_empty() {
        debug!(stderr = payload.stderr.as_str(), "remote claude stderr");
    }

    let result = payload.output;
    let mut review_json = parse_review_json(&result);
    let future_tasks = review_json
        .as_ref()
        .map(|parsed| normalize_future_tasks(&parsed.future_tasks))
        .unwrap_or_default();
    let summary = review_json.as_ref().and_then(|r| r.summary.clone());
    let quality = review_json.as_mut().and_then(|r| r.quality.take());

View on GitHub (pinned to a747e741ae)

Solutions

  1. Check the HTTP code in the message: 429 → wait and retry with backoff; 404 → re-check review URL config; 5xx → retry later or check myflow status page.
  2. Shrink the diff/payload if it may exceed size limits.
  3. Verify the review URL with curl to see the raw response.
  4. Retry the review after confirming the service is up.
Defensive patterns

Strategy: retry

Validate before calling

// preflight reachability
let resp = reqwest::Client::new().get(review_url).send().await?;
let status = resp.status();
if status.is_client_error() || status.is_server_error() {
    anyhow::bail!("review endpoint unhealthy: HTTP {status}");
}

Try / catch

for attempt in 0..3 {
    match run_remote_review(&diff).await {
        Ok(r) => return Ok(r),
        Err(e) if e.to_string().contains("remote review failed: HTTP 5") && attempt < 2 => {
            tokio::time::sleep(Duration::from_secs(2u64.pow(attempt))).await;
        }
        Err(e) => return Err(e),
    }
}
unreachable!()

Prevention

When it happens

Trigger: The review endpoint returns any status other than success/401/402 — e.g. 404 wrong URL, 429 rate limited, 500/502/503 server errors, 413 payload too large.

Common situations: Misconfigured review URL pointing at a wrong or moved endpoint (404); oversized diffs rejected (413); rate limiting under heavy use (429); myflow service outage (5xx); proxy/firewall interference.

Related errors


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