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.
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:
{
"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 is | What the action gets | What 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 storage | POST /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 storage | POST /computers/{id}/resume or /start, which reserves its running time |
| Being moved to another host | 503 Could not reach the desktop | Wait a few minutes, then retry |
| Owned by an account whose plan does not fund it | 503 Could not reach the desktop | Fix the plan, then resume |
| A Mac, iPhone or Android phone locked for keeping the account over capacity | 402 COMPUTER_LOCKED | Bring the account back under its limits |
| On an ended trial | 402 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
| Status | error or code | Meaning | Retry | What to do |
|---|---|---|---|---|
401 | Invalid API key | The Bearer token is not a known Orgo key | No | Make a new key at orgo.ai/api-keys and check for stray whitespace |
401 | Authentication required | No Authorization header, or a token without the sk_ prefix | No | Send Authorization: Bearer $ORGO_API_KEY. The body's docs field links to the sign-in guide |
503 | Service temporarily unavailable. ... | Orgo could not verify credentials because of a fault on its side | Yes | Wait Retry-After (5 seconds). Do not rotate your key |
403 | workspace_scope_mismatch | A workspace key was used on another workspace, or on an endpoint that needs an account-wide key | No | Use an account-wide key, or a key for the target workspace (Authentication) |
402 | INSUFFICIENT_COMPUTE_CREDIT | An hourly computer has too little credit to reserve its running time | After fixing | Add credit, then retry |
402 | insufficient_credit | A launch, or the prepaid time to a computer's end, costs more than the account's credit | After fixing | Add credit, or pick a shorter end |
402 | upgrade_required | The workspace owner's plan does not fund running computers | After fixing | Upgrade the plan. The disk is kept |
402 | COMPUTER_LOCKED | The account is over capacity and this Mac or phone is locked | After fixing | Bring the account under its limits |
404 | computer_not_found | An API key named a computer ID that does not resolve | No | Fetch the ID again from GET /workspaces/{id} |
400 | Desktop instance not available | The computer has no machine: it is frozen (stopped), or not created yet | After starting | POST /computers/{id}/start |
409 | computer_asleep | A read of a computer in storage, or of a Bops computer asleep for being idle | After an action | Send an action, or POST /computers/{id}/resume |
409 | computer_waking | An action is waking the computer from storage | Yes | Retry after retry_after (30 seconds) |
409 | resume_required | An hourly computer is asleep in storage, and actions do not wake it | After starting | POST /computers/{id}/start or /resume |
409 | suspend_in_progress | A suspend is still being saved | Yes | Retry once the computer shows suspended |
409 | OVER_CAPACITY | Waking it would take the owner past a plan limit; limit says computers, ram or vcpu | After fixing | Stop another computer, or add capacity |
409 | migrating | A lifecycle call on a computer being moved | Yes | Retry in a few minutes |
429 | rate_limited | A plan rate limit was reached; limit names it | Yes | Wait retry_after seconds |
503 | resuming | The computer's memory is coming back from storage | Yes | Retry after Retry-After (30 seconds) |
503 | Could not reach the desktop. Try again in a moment. | The control plane could not connect to the desktop | Read it first | Suspended and Paused or hourly: resume. Otherwise back off 1 s, 2 s, 4 s, then call /heal |
503 | Computer not ready | The computer has no connection details yet | Yes | Give a new computer a few seconds |
504 | timeout | The command outlived the time the API allows | Sometimes | Shorten 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:
| Status | Call | What comes back |
|---|---|---|
suspended, still on its host | POST /computers/{id}/resume | Memory restored, open windows and processes continue, in seconds |
suspended, moved to storage | POST /computers/{id}/resume or /start | Woken on a host with room, in about a minute |
frozen or stopped | POST /computers/{id}/start | Disk restored, cold boot |
running | Nothing | Resume 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.
# 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.
- Check health.
GET /computers/{id}/healthis read-only: it never wakes, resumes or restarts anything. It returnsoverall(healthy,degradedorstopped) and acheckslist covering the status, the agent inside the computer, the exec path, the display and VNC. A computer that is not running readsstopped, with the live checks skipped. - Heal.
POST /computers/{id}/healwith no body tries automatic recovery, then checks again. It respects a Pause and never restarts. If the computer is still not healthy, the answer'srecommendationsays what to do next: resume a paused computer, wait for one moving to or from storage, or restart. - Restart. Call
/healagain with{"action": "restart"}, orPOST /computers/{id}/restart. Files on disk survive a restart; running processes do not. The/healrestart waits up to about 45 seconds for the exec path to answer before it replies. - If restart fails too, collect the
request_idfrom a few attempts and contact support. Do not delete the computer.
# 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
frozencomputer has no host, so restart returns409withcode: "stopped"andThis computer is stopped. Use Start to turn it back on.Use/start. - A
suspendedcomputer returns409withcode: "suspended". Resume it first. - A computer being moved returns
409withcode: "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 get409withRESTART_CLEARS_DISK. With it, restart answers202with anoperationand apoll_url./healwill 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.
| Fields | Meaning | What to do |
|---|---|---|
vm_status: "suspended" | Suspended and not resumed: Paused, hourly, being moved, or not funded | POST /computers/{id}/resume |
host_reachable: false | The host running the computer is unreachable | Retry shortly |
host_reachable: true, desktop_api_reachable: false | The machine is up but its desktop service is not answering yet | Retry 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
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_idfrom the error, or theX-Request-Idheader. - 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.