From 82e543c988878b0aeb2894790d7f8b57d26a1b29 Mon Sep 17 00:00:00 2001 From: ahokik Date: Tue, 20 Oct 2026 18:58:52 +0100 Subject: [PATCH] Docs: put a sandbox to sleep now; idle sandboxes are asleep, not paused (D6.7) - guides/environments: "Idle sandboxes are paused" becomes "When a sandbox sleeps" (what comes back, what does not) and a new "Put a sandbox to sleep now" section. - reference/overview: two rows in Orca extensions and a "Session sandbox" section with the session.sandbox object, last_sleep.reason, the POST statuses and a curl example. - cli/commands (sessions sleep, --no-wait, --json; sessions get shows the sandbox), cli/mcp (sleep_session), dashboard/agents-and-sessions (Put a sandbox to sleep), guides/sessions (one paragraph). - "paused" and "resumes" for a sandbox's state become asleep, goes to sleep and wakes in turn-lifecycle, plans, start-here, wallet, troubleshooting and kits/cram-coach. - check_docs.py: the idle-time number check also catches "sleep after N minutes". Co-Authored-By: Claude Opus 5.5 --- cli/commands.mdx | 16 ++++++++- cli/mcp.mdx | 4 ++- dashboard/agents-and-sessions.mdx | 4 +++ guides/environments.mdx | 22 +++++++++++-- guides/sessions.mdx | 2 ++ kits/cram-coach.mdx | 2 +- plans.mdx | 16 ++++----- reference/overview.mdx | 54 +++++++++++++++++++++++++++++++ scripts/check_docs.py | 2 +- start-here.mdx | 4 +-- troubleshooting.mdx | 4 +-- turn-lifecycle.mdx | 6 ++-- wallet.mdx | 6 ++-- 13 files changed, 118 insertions(+), 24 deletions(-) diff --git a/cli/commands.mdx b/cli/commands.mdx index 3259c51..2735e7e 100644 --- a/cli/commands.mdx +++ b/cli/commands.mdx @@ -50,11 +50,12 @@ orca agents delete [agent] [--yes] orca models [--payer orca|] # every model you can use, grouped by who pays orca sessions list [--agent agent] -orca sessions get # includes the session's cost, tokens, and machine time +orca sessions get # includes the session's cost, tokens, machine time, and sandbox orca sessions create --agent [--sandbox] [--template t] [--vault v]... [--file path[:dest]]... orca sessions items [--limit n] orca sessions artifacts # the files its turns saved under /workspace/outputs orca sessions artifacts download [artifact] [-o path|-] [--all] +orca sessions sleep [--no-wait] [--json] # put its sandbox to sleep now orca sessions delete [--yes] ``` @@ -89,6 +90,19 @@ orca sessions artifacts download sess_123 --all -o results Deleting the session stops its sandbox and deletes its artifacts. +### Put a sandbox to sleep + +`orca sessions sleep ` puts a session's sandbox to sleep now, instead of waiting for the idle time the [pricing page](https://orcapods.ai/pricing) shows. Everything in `/workspace` is saved and machine time stops; the conversation stays, and the session's next message wakes it. Running programs stop and do not come back. See [when a sandbox sleeps](/guides/environments#when-a-sandbox-sleeps). + +It waits until the sandbox is asleep and prints "Asleep. Session session_... keeps its conversation and the files in /workspace; machine time has stopped. Its next message wakes it." It checks every second for up to 10 minutes; past that it exits 0 and the sandbox still goes to sleep. `--no-wait` returns once the sandbox starts going to sleep, and `--json` prints the server's `session.sandbox` object. When the request is refused, such as while a turn is running, or the sandbox stays awake, such as when its files are too large to save, it prints the server's message and exits 1. It needs CLI 1.5.0 or later. + +`orca sessions get ` shows the sandbox as awake, going to sleep, asleep, waking up, or none. + +```bash +orca sessions sleep sess_123 +orca sessions sleep sess_123 --no-wait +``` + ## Skills, vaults, and files ```text diff --git a/cli/mcp.mdx b/cli/mcp.mdx index b7bac17..ee56750 100644 --- a/cli/mcp.mdx +++ b/cli/mcp.mdx @@ -57,7 +57,7 @@ args = ["mcp", "serve"] | --- | --- | | Identity and keys | `whoami`, `list_keys`, `create_key`, `revoke_key` | | Agents and models | `list_agents`, `get_agent`, `create_agent`, `update_agent`, `delete_agent`, `list_models` | -| Sessions | `list_sessions`, `get_session`, `create_session`, `list_session_items`, `delete_session`, `chat`, `list_artifacts`, `download_artifact` | +| Sessions | `list_sessions`, `get_session`, `create_session`, `list_session_items`, `delete_session`, `sleep_session`, `chat`, `list_artifacts`, `download_artifact` | | Skills | `list_skills`, `get_skill`, `create_skill`, `delete_skill` | | Vaults | `list_vaults`, `create_vault`, `delete_vault`, `list_credentials`, `add_credential`, `delete_credential` | | Files | `list_files`, `upload_file`, `download_file`, `delete_file` | @@ -70,6 +70,8 @@ For a new session, `chat` also takes `sandbox`, `template`, and `vaults`, as `cr `chat` and `create_session` take `files`, a list of `{path, dest}` on your machine, and put them in the session's sandbox as [`--file`](/cli/commands#files-in-and-out-of-a-sandbox) does. `list_artifacts` and `download_artifact` bring back what the agent saved under `/workspace/outputs`: one artifact by ID or path, or with `all` every file of the newest turn into a folder. +`sleep_session` puts a session's sandbox to sleep now. Files in `/workspace` are saved and machine time stops; the conversation stays, and the next message wakes it. Running programs stop and do not come back. It is refused while a turn runs. It waits up to 60 seconds and returns `state` and `last_sleep`; `get_session` includes `sandbox`, the sandbox's state. These need CLI 1.5.0 or later; see [put a sandbox to sleep now](/guides/environments#put-a-sandbox-to-sleep-now). + `show_kit` returns a kit's review: what it runs, reaches, and spends, then each agent, skill, and template in full, and the `version` it describes. `copy_kit` takes `publicId`, that `version`, and `assets`, and copies nothing if the kit has changed since. Have the coding agent show you the review first, and copy only after you say yes. These two need CLI 1.4.0 or later; see [kits](/kits). `add_credential` takes `type`: `static_bearer` (the default) with `token`, or `static_basic` with `login` and `password`, which Orca sends to the server as HTTP Basic (see [a login and password](/guides/credentials#a-login-and-password)). Its `vault` is the vault's ID. diff --git a/dashboard/agents-and-sessions.mdx b/dashboard/agents-and-sessions.mdx index 624e6e5..f1e5109 100644 --- a/dashboard/agents-and-sessions.mdx +++ b/dashboard/agents-and-sessions.mdx @@ -64,6 +64,10 @@ Nothing switches on its own. The switch applies from the session's next turn, and to this session only. The agent and its other sessions keep their model. The session details then show the new model, the agent's own model beneath it, and who pays. To run a session on your own key you need a saved key; see [providers and API keys](/dashboard/providers-and-keys). The same switch is `POST /api/sessions/{session_id}/model` in the [API](/providers#switch-who-pays-for-one-session). +## Put a sandbox to sleep + +A session's ⋯ menu has **Put sandbox to sleep** while its sandbox is awake. The sandbox saves its files and stops using machine time; the conversation stays, and the next message wakes it. Running programs do not come back. The header shows **Sandbox asleep** until it wakes. See [put a sandbox to sleep now](/guides/environments#put-a-sandbox-to-sleep-now). + ## Delete An agent's or session's row menu has **Delete agent** or **Delete session**. Deleting a session deletes its conversation, its artifacts, and its sandbox. Deleting an agent does not delete its sessions. diff --git a/guides/environments.mdx b/guides/environments.mdx index ec1c15c..5bb3288 100644 --- a/guides/environments.mdx +++ b/guides/environments.mdx @@ -118,9 +118,27 @@ print(agents.environments.files.list(env_id, path="/workspace").data) If many sessions need the same setup, save it once as an **environment template** and pass `environment_template_id` when creating a session. A template accepts the same fields as above. Fields you also set on the session override the template's, with one exception: a session can tighten the template's network policy but not loosen it. See [skills and templates](/guides/skills). -### Idle sandboxes are paused +### When a sandbox sleeps -A sandbox that has not been used for the idle time the [pricing page](https://orcapods.ai/pricing) shows is paused to free resources. Until then it counts as machine time; while paused, it does not. Its status becomes `disconnected`. The next time the session needs it, Orca restores it automatically, with all files in `/workspace` intact. Programs that were running inside it, such as a server the agent started, do not survive the pause. Declared packages, environment variables, and network policy come back, and `setup_commands` run again during the restore, so keep setup commands safe to repeat. +A sandbox that has not been used for the idle time the [pricing page](https://orcapods.ai/pricing) shows goes to sleep on its own. You can also put it to sleep yourself, at once ([below](#put-a-sandbox-to-sleep-now)). Awake, it counts as machine time; asleep, it does not. The session keeps its conversation, and its environment's status becomes `disconnected`. + +The next message, or a request for one of its files, wakes it. Waking takes a few seconds, longer for a large workspace, and the message waits for it. + +**What comes back:** everything in `/workspace`, declared packages, environment variables and network rules. Setup commands (`setup_commands`) run again while it wakes, so keep them safe to repeat. + +**What does not:** running programs and their memory, such as a server the agent started. Start them again after it wakes. + +### Put a sandbox to sleep now + +When you are done for now, put the session's sandbox to sleep instead of waiting for the idle time. From the CLI, `orca sessions sleep `; in the dashboard, **Put sandbox to sleep** in the session's ⋯ menu; from an agent, the `sleep_session` tool; over HTTP, `POST /api/sessions/{session_id}/sandbox/sleep` (see [session sandbox](/reference/overview#session-sandbox)). + +- It is refused while a turn is running. Wait for the turn to end, or stop it, then try again. +- Saving the files can take a few seconds to a few minutes for a large workspace. The CLI waits and tells you when it is asleep. +- Running programs stop first, so they are stopped even if the sandbox then stays awake. +- A sandbox whose files are too large to save stays awake, and you are told. Delete files in `/workspace` and try again. +- Opening the session does not wake a sandbox you put to sleep. Sending a message does. +- Nothing extra is charged: machine time stops, and the saved files count as storage, as with idle sleep. +- Deleting the session is different: it deletes the conversation, the artifacts and the sandbox's files. ## Self-hosted environment diff --git a/guides/sessions.mdx b/guides/sessions.mdx index 2f4ba6b..d7e091b 100644 --- a/guides/sessions.mdx +++ b/guides/sessions.mdx @@ -145,6 +145,8 @@ print(session.status, session.required_actions) Check `status` before you send anything. If it is `requires_action`, the agent is waiting for you; see [`required_actions`](/turn-lifecycle#when-the-session-needs-you). +A session with a managed sandbox does not need to keep it awake while you are away. The sandbox goes to sleep on its own after the idle time, or you can [put it to sleep](/guides/environments#put-a-sandbox-to-sleep-now) at once. The conversation stays, everything in `/workspace` is saved, and the next message wakes it. Running programs do not come back. See [when a sandbox sleeps](/guides/environments#when-a-sandbox-sleeps). + ## Delete when finished `sessions.delete(session_id)` deletes the conversation, its artifacts, and its sandbox. Download anything you need first. Deleting a session does not delete its agent, and deleting an agent is a separate call. diff --git a/kits/cram-coach.mdx b/kits/cram-coach.mdx index 24254b7..a0747fb 100644 --- a/kits/cram-coach.mdx +++ b/kits/cram-coach.mdx @@ -695,7 +695,7 @@ orca billing wallet # your balance and plan `orca sessions get session_...` shows one session's cost, tokens, and machine time. Do it before you delete the session. - **Model tokens** are paid from your Orca credit, since Cram Coach's model starts with `orca/`. The run in the example above cost $0.01 in tokens. A longer chapter costs more. -- **Machine time** comes from your plan, since every run has a sandbox. It counts from the sandbox's start until it pauses or you delete the session, not only while Cram Coach works. Runs on the sample chapter, with the session deleted as soon as the files were saved, used one minute each. Sandboxes also need a small balance of credit, your plan's [minimum balance](/plans#paid-work-needs-a-minimum-balance). Delete each session when you have your files. +- **Machine time** comes from your plan, since every run has a sandbox. It counts from the sandbox's start until it goes to sleep or you delete the session, not only while Cram Coach works. Runs on the sample chapter, with the session deleted as soon as the files were saved, used one minute each. Sandboxes also need a small balance of credit, your plan's [minimum balance](/plans#paid-work-needs-a-minimum-balance). Delete each session when you have your files. The numbers for each plan are on the [pricing page](https://orcapods.ai/pricing). See [usage and wallet](/wallet#read-the-wallet-and-your-usage) for the rest. diff --git a/plans.mdx b/plans.mdx index a439396..9ed6887 100644 --- a/plans.mdx +++ b/plans.mdx @@ -11,7 +11,7 @@ Each plan sets: - **Machine time included** in each period. - **Extra machine time**, past the included time, at an hourly rate. Pro and Max have one; Free has none. - **Sessions at once**, which is also how many sandboxes can run at once. -- **Storage** for your files, skills, artifacts and paused sandboxes. +- **Storage** for your files, skills, artifacts and sandboxes that are asleep. - **A minimum balance** for paid work. The numbers for each plan are on the [pricing page](https://orcapods.ai/pricing), which is built from the numbers Orca charges with. Every new account starts with a [signup credit](/wallet#where-credit-comes-from). Credit is bought separately; see [wallet and credit](/wallet). @@ -31,7 +31,7 @@ Machine time is the time your sessions' managed sandboxes run. Sessions with `en - **Every sandbox is the same machine,** the size the [pricing page](https://orcapods.ai/pricing) shows. - **It is counted in whole minutes** while a sandbox is connected, whether the agent is working or waiting. Each minute a sandbox is running counts as one minute. -- **An idle sandbox is paused** after the idle time the [pricing page](https://orcapods.ai/pricing) shows. Paused time is not counted. The sandbox resumes, with its files, the next time the session needs it. See [execution environments](/guides/environments#idle-sandboxes-are-paused). +- **An idle sandbox goes to sleep** after the idle time the [pricing page](https://orcapods.ai/pricing) shows, and you can [put it to sleep](/guides/environments#put-a-sandbox-to-sleep-now) sooner. Time asleep is not counted. The sandbox wakes, with its files, the next time the session needs it. See [when a sandbox sleeps](/guides/environments#when-a-sandbox-sleeps). - **The period** is your subscription's billing period on Pro and Max, and the calendar month (UTC) on Free. Included time is counted per period and does not carry over. When the included time is used up: @@ -51,19 +51,19 @@ Orca checks it when a turn starts. If the limit is already reached, the message ## Sandboxes at once -Your organization can have as many managed sandboxes running as its plan runs sessions at once. A sandbox counts while it starts and while it runs, working or idle; a paused sandbox does not. Orca checks before it starts a sandbox or resumes a paused one. Past the limit, the request is refused with HTTP 429 `rate_limit_exceeded` and `Retry-After: 60`: "Your plan runs 1 sandbox at once. A session's sandbox goes to sleep after 10 minutes idle; delete a session you no longer need, or wait.", with your plan's number and idle time. +Your organization can have as many managed sandboxes running as its plan runs sessions at once. A sandbox counts while it starts and while it runs, working or idle; a sandbox that is asleep does not. Orca checks before it starts a sandbox or wakes one. Past the limit, the request is refused with HTTP 429 `rate_limit_exceeded` and `Retry-After: 60`, and a message that gives your plan's sandboxes at once and idle time and asks you to delete a session you no longer need, or wait. To free a place now, [put a sandbox to sleep](/guides/environments#put-a-sandbox-to-sleep-now). -Before a sandbox starts or resumes, Orca also checks what it checks each minute a sandbox runs: the [minimum balance](#paid-work-needs-a-minimum-balance), and on Free the [included machine time](#machine-time). If either would stop the sandbox, it does not start. +Before a sandbox starts or wakes, Orca also checks what it checks each minute a sandbox runs: the [minimum balance](#paid-work-needs-a-minimum-balance), and on Free the [included machine time](#machine-time). If either would stop the sandbox, it does not start. ## Storage -Each plan has a storage limit, on the [pricing page](https://orcapods.ai/pricing) and in `GET /api/public/plans` as `stored_bytes`. It counts your uploaded files, skill versions, artifacts, and the saved workspaces of paused sandboxes. +Each plan has a storage limit, on the [pricing page](https://orcapods.ai/pricing) and in `GET /api/public/plans` as `stored_bytes`. It counts your uploaded files, skill versions, artifacts, and the saved workspaces of sandboxes that are asleep. - **At the limit,** an upload, a new skill or skill version, a kit copy with skills, and a new sandbox are refused with HTTP 403 `storage_quota_exceeded`: "Your organization stores X of its Y. Delete files, skills or sessions to free space." -- **Your sessions keep working.** A sandbox's workspace is always saved when it pauses, and a paused sandbox still resumes, even past the limit. Delete files, skills or sessions you no longer need to make room. +- **Your sessions keep working.** A sandbox's workspace is always saved when it goes to sleep, and a sandbox that is asleep still wakes, even past the limit. Delete files, skills or sessions you no longer need to make room. - **Uploads need credit.** While paid work is paused, a file or skill upload is refused with HTTP 429 `insufficient_quota`: "Out of Orca credit: add credit to upload files". Copying a kit needs no credit. -When Orca's own storage is nearly full, uploads, skill uploads, kit copies and new sandboxes are refused for a while with HTTP 503 `storage_unavailable` and `Retry-After: 300`: "Orca's storage is nearly full. Try again later." Paused sandboxes still resume. +When Orca's own storage is nearly full, uploads, skill uploads, kit copies and new sandboxes are refused for a while with HTTP 503 `storage_unavailable` and `Retry-After: 300`: "Orca's storage is nearly full. Try again later." Sandboxes that are asleep still wake. ## How many you can keep @@ -86,7 +86,7 @@ An agent's `instructions` can be at most 256 KiB, and its `tools` at most 256 Ki ## Paid work needs a minimum balance -Even included machine time needs Orca credit in the wallet. When your balance is below your plan's **minimum balance** (on the [pricing page](https://orcapods.ai/pricing), and in the wallet as `min_balance_micro_usd`), Orca pauses paid work: model calls and web searches on Orca credit, and managed sandboxes. A turn on an Orca credit model, or in a session with a managed sandbox, is then refused. A managed sandbox does not start or resume, and file and skill uploads are refused. Turns on your own provider key in a session without a sandbox keep working, their web searches included. See [wallet and credit](/wallet#when-credit-runs-low). +Even included machine time needs Orca credit in the wallet. When your balance is below your plan's **minimum balance** (on the [pricing page](https://orcapods.ai/pricing), and in the wallet as `min_balance_micro_usd`), Orca pauses paid work: model calls and web searches on Orca credit, and managed sandboxes. A turn on an Orca credit model, or in a session with a managed sandbox, is then refused. A managed sandbox does not start or wake, and file and skill uploads are refused. Turns on your own provider key in a session without a sandbox keep working, their web searches included. See [wallet and credit](/wallet#when-credit-runs-low). ## Schedules diff --git a/reference/overview.mdx b/reference/overview.mdx index 1120c5b..acfe9d8 100644 --- a/reference/overview.mdx +++ b/reference/overview.mdx @@ -91,6 +91,8 @@ These routes are Orca's own, outside the OpenAI Agents API. They live at `https: | GET | `/v1/models` | Orca credit models, as `orca/openrouter/` | [Models](/providers#discover-orca-credit-models) | | GET | `/api/models` | Every model you can pick, grouped by who pays, with Orca credit prices | [Models](/providers#discover-orca-credit-models) | | GET, POST | `/api/sessions/{session_id}/model` | Read or switch the model one session's next turn uses | [Switch who pays](/providers#switch-who-pays-for-one-session) | +| GET | `/api/sessions/{session_id}/sandbox` | Whether a session's sandbox is awake, going to sleep, asleep or waking up, and how its last sleep went | [Put a sandbox to sleep now](/guides/environments#put-a-sandbox-to-sleep-now) | +| POST | `/api/sessions/{session_id}/sandbox/sleep` | Put a session's sandbox to sleep now | [Put a sandbox to sleep now](/guides/environments#put-a-sandbox-to-sleep-now) | | GET | `/api/providers`, `/api/providers/{provider}` | Supported providers and whether you have a key | [Provider keys](/providers#connect-a-provider) | | PUT, DELETE | `/api/providers/{provider}/key` | Set or remove a provider key (admin) | [Provider keys](/providers#connect-a-provider) | | GET | `/api/providers/{provider}/models` | That provider's model list | [Provider keys](/providers#connect-a-provider) | @@ -104,3 +106,55 @@ These routes are Orca's own, outside the OpenAI Agents API. They live at `https: | POST | `/api/billing/portal` | A link to Polar's billing portal (admin) | [Plans](/plans#change-your-plan) | | GET | `/api/usage`, `/api/usage/events` | Usage totals and rows, with their cost | [Wallet](/wallet#read-the-wallet-and-your-usage) | | | `/api/public/kits/...`, `/api/kits/{public_id}/copy` | Read Orca's kits and copy one | [Kits](/kits#routes) | + +### Session sandbox + +`GET /api/sessions/{session_id}/sandbox` reads a session's sandbox, and `POST /api/sessions/{session_id}/sandbox/sleep` puts it to sleep now (see [put a sandbox to sleep now](/guides/environments#put-a-sandbox-to-sleep-now)). Both need the member role and return the same object: + +```json +{ + "object": "session.sandbox", + "session_id": "session_…", + "environment_id": "env_…", + "state": "asleep", + "last_sleep": { + "reason": "requested", + "started_at": 1792483200, + "finished_at": 1792483209, + "outcome": "asleep", + "message": null + } +} +``` + +| Field | Meaning | +| --- | --- | +| `state` | `awake`, `going_to_sleep`, `asleep`, `waking`, or `none` when the session has no managed sandbox (no environment, a self-hosted one, or one that failed to start). | +| `environment_id` | The session's environment, `null` when `state` is `none`. On `/v1` its `status` reads `disconnected` while asleep and `pending` while waking. | +| `last_sleep` | The last time the sandbox went to sleep, or tried to, since it last woke; `null` if it has not. | +| `last_sleep.reason` | Why it went to sleep: `requested` (someone put it to sleep), `idle` (the idle time passed), or `out_of_credit`, `hours_used_up` or `unpriced` (Orca stopped its machine time; see [when credit runs low](/wallet#when-credit-runs-low)). More reasons may be added; show one you do not know as asleep. | +| `last_sleep.outcome` | `null` while going to sleep, then `asleep`, or why it stayed awake: `too_large` (its files are too large to save), `failed` or `interrupted` (a message or a file request reached it first, or the server restarted). | +| `last_sleep.message` | For an outcome other than `asleep`, a message to show the user. | + +The POST takes an empty body or `{}`. It returns as soon as the sandbox starts going to sleep; poll the GET to see it finish. + +| Case | Status | Body | +| --- | --- | --- | +| Awake, sleep started | 202 | The object, `state: "going_to_sleep"`, `last_sleep.outcome: null` | +| Already going to sleep | 202 | The object | +| Already asleep | 200 | The object | +| No managed sandbox | 200 | The object, `state: "none"` | +| A turn is running | 409 `conflict` | "A turn is running; put the sandbox to sleep once it ends." | +| Starting up or waking up | 409 `conflict` | "The sandbox is waking up; put it to sleep once it is awake." | +| Unknown session | 404 | | + +```bash +export ORCA_ORIGIN="https://api.orcapods.ai" +curl --fail-with-body -X POST "$ORCA_ORIGIN/api/sessions/$SESSION_ID/sandbox/sleep" \ + -H "Authorization: Bearer $ORCA_API_KEY" +``` + +```json +{"object": "session.sandbox", "session_id": "session_…", "environment_id": "env_…", "state": "going_to_sleep", + "last_sleep": {"reason": "requested", "started_at": 1792483200, "finished_at": null, "outcome": null, "message": null}} +``` diff --git a/scripts/check_docs.py b/scripts/check_docs.py index fb2cbae..8ba7049 100644 --- a/scripts/check_docs.py +++ b/scripts/check_docs.py @@ -23,7 +23,7 @@ r"\d+ vCPU|\d+ GiB of (?:memory|disk)" r"|\$\d[\d,.]* (?:a|an|per) (?:month|hour)|\| \$\d" r"|\$\d[\d,.]* (?:of (?:Orca )?credit|minimum|pack)|(?:below|under|at least) \**\$\d" - r"|\d+(?:\.\d+)?% of the price|(?:paused after|used for) \d+ minutes" + r"|\d+(?:\.\d+)?% of the price|(?:(?:paused|sleeps?) after|used for) \d+ minutes" r"|\d[\d,]* hours of machine time|runs \d+ sessions? at once" ) diff --git a/start-here.mdx b/start-here.mdx index 0188ecc..d2c0c6c 100644 --- a/start-here.mdx +++ b/start-here.mdx @@ -18,7 +18,7 @@ In about ten minutes you'll have a research agent of your own that looks things Point the official `openai` package at Orca and keep your code standard. No new SDK. - A session can have its own sandbox to run commands and write files. Idle sandboxes pause with their files kept. + A session can have its own sandbox to run commands and write files. Idle sandboxes go to sleep with their files kept. Any model on OpenRouter on your Orca credit, or your own provider key. The model name says which, and Orca never switches it. @@ -253,7 +253,7 @@ orca sessions artifacts download session_... --all orca sessions delete session_... --yes ``` -`--all` saves every file from Scout's last turn here, so you now have `python-releases.csv`. To keep working in the same sandbox first, with the files where Scout left them, run `orca chat scout --session session_...` before you delete it. A sandbox that sits idle pauses itself and stops using machine time, with its files kept for when the session needs it again. +`--all` saves every file from Scout's last turn here, so you now have `python-releases.csv`. To keep working in the same sandbox first, with the files where Scout left them, run `orca chat scout --session session_...` before you delete it. A sandbox that sits idle goes to sleep and stops using machine time, with its files kept for when the session needs it again. To hand Scout a file of yours, add `--file data.csv` to `orca chat`: it lands in the sandbox at `/workspace/data.csv`. diff --git a/troubleshooting.mdx b/troubleshooting.mdx index 95afb3e..9c85e6f 100644 --- a/troubleshooting.mdx +++ b/troubleshooting.mdx @@ -31,7 +31,7 @@ Check that the URL is `https://api.orcapods.ai/v1`, spelled exactly, with `https "Too many event streams open: 32 at once per key or person. Close one and retry." (or "64 at once per organization"): close streams you no longer read. See [how many streams](/guides/streaming#how-many-streams). "Too many uploads at once: 2 per organization. Retry when one finishes.": wait for an upload to finish, then send the next. -"Out of Orca credit: add credit, then continue the session". Your balance is under your plan's minimum balance, so Orca credit models and managed sandboxes are paused. [Add credit](/wallet#buy-credit), or use a model on your own key in a session without a sandbox. +"Out of Orca credit: add credit, then continue the session". Your balance is under your plan's minimum balance, so paid work is paused: turns on Orca credit models or with a managed sandbox are refused, and a running sandbox goes to sleep with its files kept. [Add credit](/wallet#buy-credit), or use a model on your own key in a session without a sandbox. "The server is receiving too many uploads right now. Retry in a few seconds." Orca is receiving many uploads at once, from all organizations. Nothing is wrong with your file: retry after the `Retry-After` seconds. @@ -109,7 +109,7 @@ On hosted Orca, `self_hosted` environments are coming soon, and `network.access: Only with an Orca server you run yourself. `workspace_directory` must be an absolute path with no symbolic links in it. On macOS `/tmp` is a symlink; use the real path. -HTTP 429 `insufficient_quota` means the sandbox could not run a minute: your balance is below the [minimum](/plans#paid-work-needs-a-minimum-balance), or on Free the included machine time is used up. HTTP 429 `rate_limit_exceeded` means your plan's [sandboxes at once](/plans#sandboxes-at-once) are running: wait for an idle one to pause, or delete a session you no longer need. HTTP 403 `storage_quota_exceeded` means your organization is at its [storage limit](/plans#storage): delete files, skills or sessions. +HTTP 429 `insufficient_quota` means the sandbox could not run a minute: your balance is below the [minimum](/plans#paid-work-needs-a-minimum-balance), or on Free the included machine time is used up. HTTP 429 `rate_limit_exceeded` means your plan's [sandboxes at once](/plans#sandboxes-at-once) are running: wait for an idle one to go to sleep, put one to sleep now with `orca sessions sleep `, or delete a session you no longer need. HTTP 403 `storage_quota_exceeded` means your organization is at its [storage limit](/plans#storage): delete files, skills or sessions. "This plan's included machine hours for this period are used up": a Free plan has used its included machine time (on the [pricing page](https://orcapods.ai/pricing)). Upgrade to Pro or Max, or wait for the next month. See [plans](/plans#machine-time). diff --git a/turn-lifecycle.mdx b/turn-lifecycle.mdx index 33f0396..afe3e8e 100644 --- a/turn-lifecycle.mdx +++ b/turn-lifecycle.mdx @@ -116,13 +116,13 @@ Sessions with a sandbox also have an environment. Read its current status with ` | Status | Meaning | | --- | --- | -| `pending` | Being created, restored, or (for self-hosted) waiting for your executor to connect. | +| `pending` | Being created, waking up, or (for self-hosted) waiting for your executor to connect. | | `connected` | Ready. Turns can use it. | | `failed` | The sandbox could not be created, or a self-hosted executor failed to register. Create a new session. | -| `disconnected` | Not currently reachable. A managed sandbox that has been idle for a while is paused to save resources and shows this status; it resumes automatically the next time it is used. A self-hosted executor that dropped its connection shows this until it reconnects. | +| `disconnected` | Not currently reachable. A managed sandbox is asleep: it fell asleep after the idle time, or someone put it to sleep. It wakes the next time the session needs it. A self-hosted executor that dropped its connection shows this until it reconnects. | -When a paused managed sandbox resumes, files in the workspace are restored, but running processes (such as a dev server the agent started) are not. Ask the agent to start them again if needed. +When a managed sandbox wakes up, everything in `/workspace` comes back, but running programs (such as a dev server the agent started) do not. Ask the agent to start them again if needed. See [when a sandbox sleeps](/guides/environments#when-a-sandbox-sleeps). ## A complete wait loop diff --git a/wallet.mdx b/wallet.mdx index b75f824..3e13b72 100644 --- a/wallet.mdx +++ b/wallet.mdx @@ -54,8 +54,8 @@ curl --fail-with-body -X POST "$ORCA_ORIGIN/api/billing/checkout" \ Orca pauses **paid work** when your balance is below your plan's **minimum balance**, on the [pricing page](https://orcapods.ai/pricing) and in the wallet as `min_balance_micro_usd`. Paid work is model calls and web searches on Orca credit, and managed sandboxes, including their included machine time. - **A new message** that needs paid work is refused with HTTP 429 `insufficient_quota`: "Out of Orca credit: add credit, then continue the session". -- **A new sandbox**, or resuming a paused one, is refused the same way, and so is a file or skill upload: "Out of Orca credit: add credit to upload files". -- **A running turn** that reaches the minimum ends `failed` with `usage_limit_exceeded` and `param: "orca_credit"`. The conversation is saved. A managed sandbox is paused with its files kept. +- **A new sandbox**, or waking one that is asleep, is refused the same way, and so is a file or skill upload: "Out of Orca credit: add credit to upload files". +- **A running turn** that reaches the minimum ends `failed` with `usage_limit_exceeded` and `param: "orca_credit"`. The conversation is saved. A managed sandbox goes to sleep with its files kept. - **Turns on your own provider key** in a session without a sandbox keep working. A call on Orca credit whose cost OpenRouter did not report when it ended, such as a call you cancel, a session deleted mid-reply, a stream cut short or a restart on Orca's side, is charged later from OpenRouter's own record of that call, usually within minutes and at most an hour after it, never from an estimate. Its charge is dated by the call and shows in your usage as **Charged later**. Until it arrives, the call still counts among the paid calls your organization can have running at once, so with several calls cancelled in a row a new call may wait a moment for its turn. Because the charge arrives after the call, it can take your balance below the minimum or below zero; paid work is then paused until credit brings the balance back to the minimum, and a top-up pays what is below zero first. @@ -69,7 +69,7 @@ The dashboard shows this as **Out of Orca credit** on the turn, with **Add credi | Route | Returns | | --- | --- | | `GET /api/billing/wallet` | Balance, total credited and charged, the minimum balance, `paid_work_paused`, your plan and period, included and used machine time, and every field of `GET /api/public/plans` | -| `GET /api/public/plans` | Every plan fact, with no key needed: each plan's price, included machine time, extra machine time rate, sessions at once, minimum balance and storage limit (`stored_bytes`); the signup credit; OpenRouter's fee (`openrouter_fee_bps`); the processing fee and the packs on sale; the machine; and `idle_seconds`, how long a sandbox idles before it is paused. The pricing page is built from it. | +| `GET /api/public/plans` | Every plan fact, with no key needed: each plan's price, included machine time, extra machine time rate, sessions at once, minimum balance and storage limit (`stored_bytes`); the signup credit; OpenRouter's fee (`openrouter_fee_bps`); the processing fee and the packs on sale; the machine; and `idle_seconds`, how long a sandbox idles before it goes to sleep. The pricing page is built from it. | | `GET /api/usage` | Totals per meter for a period (30 days by default, or `start` and `end` in Unix seconds), a `series` over time (below), and totals grouped by `model`, `provider`, `credential`, `session`, or `agent` with `group_by`. With `group_by`, `group_costs` gives each key's cost across every meter; they add up to the period's `cost_micro_usd`. `session=` narrows it to one session. | | `GET /api/usage/events` | The newest usage rows, each with its cost. Filter with `meter`, or `charged=true` for only the rows that cost something; page with `limit` and `after`. A row at cost 0 whose money is on another row of the same operation has `charged_on`: `call` when its call's row carries the money (a token row), `search` when the search's row does (the search's tool call, or its call when the whole cost is on the search), `late` when the operation was [charged later](#calls-charged-later) and its `late_charges` row does (every row of that call or search, its call or search row included). Any other row has none, and its own cost is what it was charged. Each row also has `charge_for`: on a `late_charges` row, the id of the row it charges; `null` on every other row. |