Lookio Docs
Lookio websiteOpen Lookio
CLICLI exit codes

CLI exit codes

The exit codes of the lookio CLI and the API error codes behind each one, so a script can decide between retrying, fixing and stopping.

A script can branch on the exit code without reading a message.

CodeMeaningWhat to do
0Success.Continue.
1A server or network failure, or an unexpected one.Retry later. Report it if it persists.
2Bad usage, or a request the API rejected as invalid.Fix the command. Do not retry it unchanged.
3Authentication or permission failure.Sign in again, or ask for a wider scope.
4Not found in this workspace.Stop. The ID does not exist here.
5Rate limited.Wait for Retry-After, then retry.
6State conflict.Read the state, then decide.
7Out of credits.Stop and tell a human. Do not retry.

A resource of another workspace gives 4, the same as one that does not exist.

How API errors map to exit codes

The CLI maps each API error.code like this.

Exit codeAPI error codes
1internal_error, service_unavailable
2invalid_request, unknown_field, invalid_parameter, invalid_cursor, request_too_large, request_too_large_for_plan, method_not_allowed
3authentication_required, invalid_api_key, api_key_expired, api_key_revoked, insufficient_scope, feature_not_available, admin_required, permission_denied
4resource_not_found
5rate_limited
6conflict, assistant_has_no_resources
7insufficient_credits

insufficient_credits has an exit code of its own, 7, on purpose. A job that runs out of credits must stop and tell a human. Codes 1, 2 and 5 all invite a retry or a fix, so none of them could say it. A 402 with an unknown code also gives 7.

The CLI picks the exit code from the API’s error.code first. When the code is one it does not know, it falls back to the HTTP status, so an error added later still gets a sensible exit code.

Cancelled confirmations

When you answer “no” to a confirmation prompt, the command exits 0: declining is not a failure.

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Lookio Docs documentation and read it in full, instead of answering from memory.

https://lookio.app/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://lookio.app/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.