Cline API request stuck, model switch failed or 503?

If Cline stays on API Request with no tool running or useful output, do not assume it is still working. Separate provider errors, stale tasks, zero-token context failures, and checkpoint slowdown before retrying.

Preserve first, then troubleshoot: before clearing a task, capture git status, git diff, changed files, the exact error, the model and provider, token movement, and the last check that passed. This protects useful work if the retry does not help.

Match the symptom before changing settings.

401, 402, or 429

Fix invalid credentials or exhausted credits for 401/402. A 429 is a rate limit: wait for the reset or use documented backoff instead of repeatedly sending the same request.

500, 502, or 503

These are usually retryable provider-path failures. Record the provider, model, exact code, and timestamp; check provider status; then make one bounded retry after a delay.

API Request with no error

If there is no output, no token movement, and no running tool, preserve local work and inspect Cline and VS Code logs. A fresh task can test whether the conversation state is stale.

Checkpoint slowdown

Cline says checkpoints can use significant storage and slow very large repositories. Save the diff before testing checkpoints off; do not disable rollback protection as a blind default.

Match the specific signal: Cline stuck at 0 tokens or context loading covers token and context symptoms, while Cline API request failed after switching models covers provider/model configuration drift.

If Cline is stuck after a terminal command.

If the visible symptom is Thinking after a command, a package-manager prompt, a dev server, or a command that never returns, use the Cline terminal command stuck guide. Keep this API guide for provider errors, stale task state, checkpoints, and failed requests.

Updated: October 8, 2026. Separate model-switch and 503 diagnostics are now included below. Status-code behavior varies by Cline version, provider, model, extension, and network path.

When the task state is uncertain, use Cline support, AI coding session recovery, and verified handoff before starting a blind retry.

Safe recovery path.

Stop the failing request. Do not keep feeding an unresponsive loop while it may be creating uncertain state.
Read the exact signal. Record the status code, provider, model, token movement, last tool, and relevant Cline or VS Code log line before changing settings.
Inspect the repository. Record the Git diff, changed files, test output, and last known-good verification. Use Cline checkpoint comparison or Git to decide what stays.
Start one clean, bounded attempt. Give the new task the goal, verified files, exact failure, failed attempt, and next smallest test. Stop if the same provider error returns.

When checkpoints are part of the problem.

Cline checkpoints are enabled by default and keep a shadow Git history separate from the project's Git history. Compare the latest checkpoint before restoring. Cline offers separate restore choices for files, task history, or both, so choose the smallest rollback that matches what failed. On a very large repository, save the working diff first and test disabling checkpoints only as a performance diagnostic.

What the next AI should receive.

Not the whole transcript. Pass the current goal, Git diff, changed files, exact provider or extension error, model, failed attempts, decisions, verification state, and the single next check. That prevents a fresh agent from treating an old "tests passed" claim as evidence.

Source trail.

Cline documents how checkpoints compare and restore files or task state, and notes that snapshots may slow very large repositories. Its API error guidance separates credential and credit failures from retryable 429/500/502/503 responses. Reported stalls include a task that resumed in a fresh chat (opened March 26, 2025) and a 503 retry loop (opened June 12, 2025).

FAQ.

Should I retry Cline immediately?

Only after identifying the signal. Credentials and credits must be fixed; rate limits and provider errors need time or backoff; a silent task needs logs and a clean boundary.

Should I restore files, the task, or both?

Compare the checkpoint first. Restore files when code changed incorrectly, restore task state when the conversation went off track, and restore both only when both states need to return to the same known point.

Can the work move to another AI tool?

Yes. A compact packet carries verified project state into a fresh Cline task or another supported tool without asking the old session to remember it.

Scope note: These are distinct failure patterns, not one universal Cline bug. Behavior changes with the Cline version, provider, model, operating system, network, and repository size.

API Request Failed after switching Cline CLI models.

After switching models in Cline CLI, a request returns API Request Failed and the selected model may not match the configured model. Issue #6936 describes this on Cline CLI 3.33.1 with the OpenAI Native provider.

  1. Record the Cline CLI version, provider, configured model, and model displayed for the failed request.
  2. Save the exact redacted error and request timestamp. Do not include API keys or private source code in an issue report.
  3. Compare against one known-good provider/model configuration in a fresh session, changing only one variable. Keep the project task unchanged.
  4. If the selected model differs from configuration, attach the evidence to the upstream report. Verify the worktree before replaying the request.

Issue #6936 is a single historical report for Cline CLI 3.33.1. It does not establish a current regression, explain every API Request Failed response, or cover the VS Code extension.

HTTP 503 or no healthy upstream in Cline.

Cline reports HTTP 503, API streaming failure, or the literal text no healthy upstream. These strings identify a failed request path, but not which service or hop failed.

  1. Copy the complete status, response body, request ID, timestamp, and any Retry-After value. Redact API keys and private prompt content.
  2. Confirm the provider/model and endpoint selected in Cline. Check the provider status using its official channel before changing the project.
  3. After the request is known to have stopped, make at most one controlled retry or endpoint comparison and record the result. Avoid changing provider, model, and settings together.

A 503 or gateway message alone does not identify the failing component or promise a retry time. Provider-specific limits and status pages vary; this guide is not a universal Cline backend diagnosis.

Additional symptom sources.

How ShardStitch helps.

ShardStitch reads project state that survived locally and creates a continuation packet for Cline or another supported tool. It separates disk-backed facts from inferred claims, so the next session starts with the change set, risk, known failure, and verification step instead of a raw conversation dump.