← Blog

Why is my AI agent's computer not responding? Orgo API errors explained

What each Orgo API error means, which ones are safe to retry, when a computer wakes on its own, and how to recover a stuck one.

Updated

The status code and the code field say which case you are in. A 401 or 403 is a key or workspace problem, and retrying will not help. A 402 is billing. A 409 means the computer is in the wrong state for the call: asleep, waking, still saving, being moved, or stopped. A 429 is a plan rate limit; wait retry_after seconds. A 504 with code: "timeout" means a command outlived the time the API allows.

A 503 needs reading before you retry. resuming and Service temporarily unavailable. pass on their own. Could not reach the desktop on a suspended computer that is Paused or hourly does not: Orgo never wakes those for you, so call POST /computers/{id}/resume.

If GET /computers/{id} answers 200 but actions keep failing, call GET /computers/{id}/health, then POST /computers/{id}/heal. Do not delete the computer; deleting drops the disk.

What an error looks like

An Orgo API error is JSON with an error string, and usually a code and a request_id. Every /api response, success or error, also carries an X-Request-Id header, so you can log an id even when the body has none or is not JSON:

json
{
  "error": "Could not reach the desktop. Try again in a moment.",
  "request_id": "f0c2c4a8-9d8e-4d2f-b8a6-2a9a4c2d4b1f",
  "code": "ECONNREFUSED"
}

When the failure came from the desktop rather than Orgo's control plane, the response adds upstream_status. Without it, the error happened in the control plane (auth, lookup, validation). An upstream_status of 400 means the desktop rejected the request body, and 500 means it could not carry out the action (Troubleshooting).

An answer that says when to ask again carries a Retry-After header in seconds, and most repeat it as retry_after in the body. The OpenAI-compatible /v1/chat/completions endpoint is the exception: its error is an object with type, message and code.

Keep the request_id. It maps to a server log line and is the first thing support asks for.

When a computer wakes on its own

Check this first when something that worked yesterday fails.

An action (a command, a click, a keypress, a new screen) on a suspended computer resumes it, then runs. You do not need to call resume. These are the exceptions:

The computer isWhat the action getsWhat to do
Paused by a person (Sleep in the app, or /suspend)503 Could not reach the desktop, or 409 with code: "paused" if it is asleep in storagePOST /computers/{id}/resume. A Pause holds until someone resumes it
Hourly (billed from credit)503 Could not reach the desktop, or 409 resume_required if it is asleep in storagePOST /computers/{id}/resume or /start, which reserves its running time
Being moved to another host503 Could not reach the desktopWait a few minutes, then retry
Owned by an account whose plan does not fund it503 Could not reach the desktopFix the plan, then resume
A Mac, iPhone or Android phone locked for keeping the account over capacity402 COMPUTER_LOCKEDBring the account back under its limits
On an ended trial402 Choose a plan to continue.Choose a plan

A read (a GET, such as a screenshot) wakes an ordinary suspended computer too, with the same exceptions. Two cases stay asleep: a computer moved to storage, and a Bops computer asleep for being idle. A read of those answers 409 computer_asleep; an action wakes them, unless the table says otherwise.

Which errors to retry

Statuserror or codeMeaningRetryWhat to do
401Invalid API keyThe Bearer token is not a known Orgo keyNoMake a new key at orgo.ai/api-keys and check for stray whitespace
401Authentication requiredNo Authorization header, or a token without the sk_ prefixNoSend Authorization: Bearer $ORGO_API_KEY. The body's docs field links to the sign-in guide
503Service temporarily unavailable. ...Orgo could not verify credentials because of a fault on its sideYesWait Retry-After (5 seconds). Do not rotate your key
403workspace_scope_mismatchA workspace key was used on another workspace, or on an endpoint that needs an account-wide keyNoUse an account-wide key, or a key for the target workspace (Authentication)
402INSUFFICIENT_COMPUTE_CREDITAn hourly computer has too little credit to reserve its running timeAfter fixingAdd credit, then retry
402insufficient_creditA launch, or the prepaid time to a computer's end, costs more than the account's creditAfter fixingAdd credit, or pick a shorter end
402upgrade_requiredThe workspace owner's plan does not fund running computersAfter fixingUpgrade the plan. The disk is kept
402COMPUTER_LOCKEDThe account is over capacity and this Mac or phone is lockedAfter fixingBring the account under its limits
404computer_not_foundAn API key named a computer ID that does not resolveNoFetch the ID again from GET /workspaces/{id}
400Desktop instance not availableThe computer has no machine: it is frozen (stopped), or not created yetAfter startingPOST /computers/{id}/start
409computer_asleepA read of a computer in storage, or of a Bops computer asleep for being idleAfter an actionSend an action, or POST /computers/{id}/resume
409computer_wakingAn action is waking the computer from storageYesRetry after retry_after (30 seconds)
409resume_requiredAn hourly computer is asleep in storage, and actions do not wake itAfter startingPOST /computers/{id}/start or /resume
409suspend_in_progressA suspend is still being savedYesRetry once the computer shows suspended
409OVER_CAPACITYWaking it would take the owner past a plan limit; limit says computers, ram or vcpuAfter fixingStop another computer, or add capacity
409migratingA lifecycle call on a computer being movedYesRetry in a few minutes
429rate_limitedA plan rate limit was reached; limit names itYesWait retry_after seconds
503resumingThe computer's memory is coming back from storageYesRetry after Retry-After (30 seconds)
503Could not reach the desktop. Try again in a moment.The control plane could not connect to the desktopRead it firstSuspended and Paused or hourly: resume. Otherwise back off 1 s, 2 s, 4 s, then call /heal
503Computer not readyThe computer has no connection details yetYesGive a new computer a few seconds
504timeoutThe command outlived the time the API allowsSometimesShorten the command, or run it in the background and poll

That 404 is what an API key gets; a signed-in browser gets 404 Desktop not found, and /bash adds a hint. Plan rate limits and their RateLimit-* headers are in Account limits.

Waking a computer

A computer's status is one of creating, running, restarting, updating, suspending, suspended, resuming, frozen, stopped, error or deleted. Pick the call by status:

StatusCallWhat comes back
suspended, still on its hostPOST /computers/{id}/resumeMemory restored, open windows and processes continue, in seconds
suspended, moved to storagePOST /computers/{id}/resume or /startWoken on a host with room, in about a minute
frozen or stoppedPOST /computers/{id}/startDisk restored, cold boot
runningNothingResume and start do nothing to a running computer

A resume that returns 202 with status: "resuming" is still bringing memory back. Poll Get suspension until status reads running, then send the action again. A start waits for the boot. If the boot takes longer than five minutes, or you ask for async, start returns 202 with an operation and a poll_url to poll.

bash
# Wake a paused computer, then retry the action
curl -X POST https://www.orgo.ai/api/computers/$COMPUTER_ID/resume \
  -H "Authorization: Bearer $ORGO_API_KEY"

/resume on a frozen computer returns 409 with Computer is not suspended (status: frozen); use /start. A stop freezes the computer, so a computer you stopped reads frozen. How do you pause, fork, or clone an AI agent's computer? covers what each lifecycle call keeps.

Bash timeouts

There are two timeouts, and they look different.

The command's own timeout: Execute bash takes timeout in seconds. Without it a command gets 200 seconds. With it the value is clamped to 1 to 300, so a larger value becomes 300, and 0 or a non-numeric value becomes 10. On Linux, a command killed by this timeout returns exit_code: -1. On Windows, where the endpoint runs PowerShell, it returns 200 with exit_code: 124, error: "timeout" and the output so far.

The API's limit: Orgo waits the command's timeout plus 30 seconds for the desktop to answer. Past that you get 504 with code: "timeout", the message The command exceeded the allowed time and was aborted., and no output. Because of the margin, the command's own timeout normally fires first.

A command that exits non-zero is not an error status. The call returns 200 with success: true, and exit_code says whether the command worked. On a computer with several screens, ?screen= naming a screen that does not exist returns 404 and nothing runs.

For long jobs, start the work in the background on the computer and poll for a result file or process.

Recovering a stuck computer

A computer is stuck when GET /computers/{id} returns 200 but actions fail.

  1. Check health. GET /computers/{id}/health is read-only: it never wakes, resumes or restarts anything. It returns overall (healthy, degraded or stopped) and a checks list covering the status, the agent inside the computer, the exec path, the display and VNC. A computer that is not running reads stopped, with the live checks skipped.
  2. Heal. POST /computers/{id}/heal with no body tries automatic recovery, then checks again. It respects a Pause and never restarts. If the computer is still not healthy, the answer's recommendation says what to do next: resume a paused computer, wait for one moving to or from storage, or restart.
  3. Restart. Call /heal again with {"action": "restart"}, or POST /computers/{id}/restart. Files on disk survive a restart; running processes do not. The /heal restart waits up to about 45 seconds for the exec path to answer before it replies.
  4. If restart fails too, collect the request_id from a few attempts and contact support. Do not delete the computer.
bash
# Read-only health check
curl https://www.orgo.ai/api/computers/$COMPUTER_ID/health \
  -H "Authorization: Bearer $ORGO_API_KEY"
 
# Safe automatic recovery (never restarts)
curl -X POST https://www.orgo.ai/api/computers/$COMPUTER_ID/heal \
  -H "Authorization: Bearer $ORGO_API_KEY"

Restart does not apply to every status (Restart computer):

  • A frozen computer has no host, so restart returns 409 with code: "stopped" and This computer is stopped. Use Start to turn it back on. Use /start.
  • A suspended computer returns 409 with code: "suspended". Resume it first.
  • A computer being moved returns 409 with code: "migrating". Wait a few minutes.
  • A dedicated GPU computer whose restart recreates the machine needs {"clear_disk": true}, because that restart deletes everything outside /workspace. Without it you get 409 with RESTART_CLEARS_DISK. With it, restart answers 202 with an operation and a poll_url. /heal will not restart one of these.

Every other computer's restart answers 200 once the reboot has finished.

The 503 diagnostic fields

When Execute bash or Execute Python returns 503 Could not reach the desktop, the body also carries vm_status, host_reachable, desktop_api_reachable and a hint. Other actions (click, type, screenshot) return the plain 503, so use /health for those.

FieldsMeaningWhat to do
vm_status: "suspended"Suspended and not resumed: Paused, hourly, being moved, or not fundedPOST /computers/{id}/resume
host_reachable: falseThe host running the computer is unreachableRetry shortly
host_reachable: true, desktop_api_reachable: falseThe machine is up but its desktop service is not answering yetRetry in a few seconds, then /heal

The hint says the same in a sentence. The body also has desired_status, which is always null; do not branch on it.

Handling errors in an agent loop

python
import time, requests
 
RETRY_CODES = {"computer_waking", "suspend_in_progress", "migrating", "resuming", "rate_limited"}
WAKE_CODES = {"computer_asleep", "resume_required", "paused"}
 
def act(session, base, computer_id, path, body, attempts=4):
    url = f"{base}/computers/{computer_id}/{path}"
    for i in range(attempts):
        r = session.post(url, json=body)
        if r.ok:
            return r.json()
        try:
            data = r.json()
        except ValueError:
            data = {}
        code = data.get("code")
        rid = data.get("request_id") or r.headers.get("X-Request-Id")
        if code in WAKE_CODES or data.get("vm_status") == "suspended":
            session.post(f"{base}/computers/{computer_id}/resume")
        elif code not in RETRY_CODES and r.status_code != 503:
            raise RuntimeError(f"{r.status_code} {code} {data.get('error')} request_id={rid}")
        time.sleep(int(r.headers.get("Retry-After", 2 ** i)))
    raise RuntimeError(f"gave up, last request_id={rid}")

The loop resumes a computer that will not wake by itself, retries only the cases that pass on their own, honors Retry-After, and includes request_id in every failure. If a plain 503 keeps coming back, call /heal instead of looping. For the same calls through MCP, see Orgo MCP for AI agents.

What to send support

  • The request_id from the error, or the X-Request-Id header.
  • The exact request: method, URL and body, with secrets removed.
  • The full error response.

Email contact@orgo.ai, or ask in the Orgo Discord linked from the Troubleshooting guide.