Repository navigation
orca sessions sleep: put a session's sandbox to sleep now (D6.7) - #54
Merged
Merged
Conversation
… (D6.7)
- sessions sleep <id> [--no-wait]: POST /api/sessions/{id}/sandbox/sleep,
then reads GET /api/sessions/{id}/sandbox every second for up to 10
minutes. Exit 0 for asleep, already asleep, none, --no-wait and the
10-minute limit; exit 1 with the server's message for too_large, failed,
interrupted and a 409 refusal. --json prints the final session.sandbox.
- sessions get and get_session gain sandbox (the state), left out when the
server cannot say.
- MCP tool sleep_session: waits up to 60 seconds, returns the view.
- README, cheatsheet and use-orca skill list the command and tool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it adds
orca sessions sleep <id> [--no-wait]: puts a session's sandbox to sleep now; its next message wakes it. It callsPOST /api/sessions/{id}/sandbox/sleep, then readsGET /api/sessions/{id}/sandboxevery second for up to 10 minutes while the sandbox is going to sleep.--no-wait, and the 10-minute limit (the sleep goes on on the server).too_large,failed,interrupted(last_sleep.message) and a 409 refusal (a turn is running, or the sandbox is waking up). 404 stays exit 4.--jsonprints the finalsession.sandboxobject, with the same exit codes.orca sessions getgains asandboxline (awake, going to sleep, asleep, waking up, none). If the read fails, as on a server without the route, the line is left out and the command still succeeds.sleep_session(waits up to 60 seconds, returnsstateandlast_sleep; the last poll starts by 55 seconds so the answer lands inside the 60-second request timeout MCP clients default to).get_sessiongainssandbox.ApiClient.sessionSandbox/sleepSessionSandbox, typeSessionSandbox(last_sleep.reasonis an open string; an unknown reason is shown like any other).Design: https://github.com/okikorg/orca-design/blob/main/designs/sandbox-sleep.md (orca-design #123).
Needs the server first: the orca-agent-server PR for D6.7 (being opened in parallel) must be deployed before this is released. Until then the routes do not exist:
sessions sleepfails as not found, andsessions getjust leaves out the sandbox line.Local CI
GitHub Actions minutes are used up, so these ran locally on a985348:
Also checked the built CLI against a local mock server: the wait-then-asleep path,
--json,--no-wait, and a 409 refusal (exit 1, the server's message).The D6.7 PRs
🤖 Generated with Claude Code