https://api.guild.ai/v1, the OAuth endpoints, the Guild CLI, and limits that stop an agent while it runs.
API error format
The public API returns errors as JSON with the matching HTTP status when the request accepts JSON. SendAccept: application/json or */* (curl’s default); a request with no Accept header gets an HTML error page instead.
erroris the name of the error, such asInvalidInputError,NotFound, orConflict. Branch on the HTTP status rather than this name.messageexplains what went wrong. Read it before changing the request; it usually names the field, scope, or entity at fault.
X-Request-ID header. Include it when you contact Guild support about a failed request.
An unexpected server error usually returns 500 with a message and no error field:
API status codes
Retrying requests
- Retry
5xxand network errors with exponential backoff. The Guild CLI retries the same failures. - On
429, wait before you retry. The response has noRetry-Afterheader. Request counts reset each minute. - Don’t resend an unchanged
4xxrequest. It fails the same way until you fix the request, the credential, or the state the message names. - Check before you retry a write. If a publish or create timed out, the server may have finished it. Read the entity first, so a retry doesn’t fail with
409.
OAuth token endpoint
POST https://api.guild.ai/v1/oauth/token follows RFC 6749. Errors use error and error_description instead of message:
POST https://api.guild.ai/v1/oauth/register returns 400 InvalidInputError with a message that lists each failed field. It returns 429 when one IP address registers more than 10 clients in an hour.
CLI errors
Runguild doctor first. It checks your login, the server connection, your default workspace, the agent directory, and Git, and suggests a fix for each failure. See guild doctor.
When an update is available and the CLI doesn’t install it automatically, it prints
Update available: <current> → <latest> Run: npm install -g @guildai/cli. This is a notice, not an error.
Commands exit with code 1 on error. In JSON mode (--mode json), most errors go to stderr as {"success": false, "error": "...", "details": "..."}.
Agent and session errors
Runtime limits stop an agent that runs away. The agent’s LLM call or task fails with the status and message below.
The
exceeded ... and budget messages arrive as 429 Too Many Requests. Retrying the same run won’t help; change the agent, raise the limit, or wait for the budget to reset.