orbotodocs
Agents & AI

Claude Code, step by step

Connect Claude Code to your orboto workspace with orboto connect, start it with orboto claude, and let your inbox wake the idle session - every command, no prior terminal experience needed.

This guide gives Claude Code (command claude) the full orboto workflow: tickets, docs, timers, comments, and the wake channel - a message another agent or a colleague sends to your session arrives in the idle session within seconds and starts a turn, with no polling loop and no monitor that expires. Added in v0.199.0 Follow it top to bottom; every step tells you what you should see before you move on.

What you need

An account for Claude Code (Pro, Max, Team, Enterprise or a Claude Console account), your orboto workspace address (for example https://acme.orboto.example), and an orboto login. Node.js 22.23.4, 24.22.1 or newer on the machine (Added in v0.230.3 older releases still trust compromised eMudhra intermediate CAs and orboto connect fails on them). Nothing has to be installed on the orboto side.

Never set orboto up before? Connect your agent walks the same path in plain words with what you see after every step. This page is the detail behind it.

The wake channel's own mechanics, the plan gate that allows it, and troubleshooting the channel specifically are on Claude Code: the wake channel. An API key for an unattended agent account, and driving orboto through the CLI with no MCP server at all, are on Claude Code: alternatives.

What a session costs

Added in v0.205.1 The CLI is how agents work; the MCP server carries only the wake channel unless you ask for tools with --toolset. A tool list is sent with every message the agent writes, whether it uses a tool or not: the full list is about 46,900 tokens, the everyday list about 10,700, and the channel-only connection about 400. Fewer tokens per message means a longer session before the context fills up and a smaller bill for the same work. Every tool has a command (orboto help), and a client without a terminal gets the tools back with orboto mcp install --toolset curated. Claude Code itself loads tool descriptions lazily, so there the difference per message is about 4,000 tokens between the full list and the channel-only connection; clients that load every tool up front pay the full amount.

1. Open a terminal and install both tools

  • Mac: press Cmd + Space, type Terminal, press Enter.
  • Windows: press the Windows key, type PowerShell, press Enter.

A window with a blinking cursor opens. Everything below that looks like code is typed into this window, followed by Enter.

First install Claude Code:

  • Mac:

    curl -fsSL https://claude.ai/install.sh | bash
  • Windows:

    irm https://claude.ai/install.ps1 | iex

Then install the orboto CLI:

  • Mac:

    curl -fsSL https://raw.githubusercontent.com/orboto/orboto-cli/main/install.sh | sh
  • Windows:

    npm install -g orboto

Wait until the cursor comes back, then close the terminal window and open a new one so both commands are found. Check:

orboto version

You should see a version number. If you see "command not found" or "not recognized", open a new terminal window and try again. orboto self-update keeps the CLI current afterwards.

2. Sign in to Claude Code

In the terminal type claude and press Enter. The first start asks you to log in; follow the prompt, your browser opens, log in with your Claude account and confirm. Back in the terminal Claude Code shows its prompt. Type /exit and press Enter to close it again.

3. Sign the orboto CLI in

orboto login

It asks for your workspace address, opens your browser, and you approve the login there. No key to copy, and the login renews itself. On a machine without a browser add --no-browser and open the printed address elsewhere.

What you see: orboto whoami prints your name and email address. The login is stored in your home directory, never in a project. A second account lives next to it as a named profile (orboto login --profile work), and every command takes --profile work to act as that one - see CLI profiles.

An unattended agent account uses a key instead

A bot identity that runs without a person at the keyboard cannot complete a browser login. Give it an API key profile: orboto login --api-key --profile <name>. API key for an agent account on the alternatives page walks through minting the key.

4. Connect the folder you work in

Change into the folder you open Claude Code in, and run:

orboto connect

Added in v0.200.0 This is the whole setup of one directory in a single command, one step at a time, and it says what it found after each one: Node, Claude Code, your login, the orboto server entry it writes, the optional context-size status line, and the exact start command including the standing arguments. Only what needs a person is left to you.

orboto connect --yes          # answer every question with its default (the form an agent runs)
orboto connect --replace      # overwrite an "orboto" entry that is already there
orboto connect --verify       # after the restart: probe the session, report the channel

--statusline / --no-statusline, --scope, --toolset and --profile decide the rest without a prompt, so nothing waits for input under --yes.

Added in v0.236.0 Local memory. In a checkout that has an orboto project, connect also moves Claude Code's local memory folder into the project wiki, turns Claude Code's auto memory off for the checkout (autoMemoryEnabled: false in .claude/settings.local.json) and archives the folder, each step printed under local memory. Nothing is asked and nothing is deleted. --auto-memory on keeps auto memory on, --auto-memory off turns it off over a true, and a checkout without a project is left alone. Where each file goes, who can read the imported files and how to turn auto memory back on are on One memory.

What you see: a file .mcp.json in the folder with one entry named orboto. The entry is the command orboto mcp serve --profile <name> - no API key in the file, so .mcp.json can be committed to git and your colleagues get the same setup.

The single step on its own, without the questions around it:

orboto mcp install                  # write the "orboto" entry into ./.mcp.json
orboto mcp install --statusline     # the same, plus context-size reporting (see below)
orboto mcp install --scope user     # write it for every repository of your user
orboto mcp install --toolset full --replace
orboto mcp status                   # what is configured here, which proxy versions are cached
orboto mcp uninstall                # remove the entry again

An existing orboto entry is only replaced with --replace, and the command prints what it replaced; every other server, unknown key and the key order of the file survive untouched.

The connector itself (@orboto/mcp) is installed on first start under ~/.orboto/mcp/ and always matches the version of your instance: when the workspace is upgraded, the next start brings the matching connector. The three newest versions are kept. Nothing points into a checkout of any source repository.

5. Start Claude Code

The last thing orboto connect printed is your start command:

orboto claude                       # new session
orboto claude --continue            # continue the most recent conversation here
orboto claude --resume <session id> # a specific conversation
orboto claude --yolo                # Claude Code's full-permission mode, --dangerously-skip-permissions

Added in v0.213.0 --yolo and --skip are two spellings of one request, and --skip-permissions stays as the third. The flags are read anywhere before a bare --. If you typed --dangerously-skip-permissions yourself after --, it is not added a second time. The same three flags exist on orboto codex, orboto gemini, orboto kimi and orboto ollama; see Launchers and the uniform flags. To run a private and a company account, see Login profiles.

Added in v0.200.0 Everything you pass after -- reaches claude unchanged, so orboto claude -- --help shows Claude Code's own help.

Two confirmations, and both are yours to give:

  • Claude Code asks once per folder whether to use the servers from .mcp.json. Until you agree, claude mcp list shows the entry as pending approval and orboto stays dark.
  • Claude Code asks on every such start to confirm the local-development use of the channel. Confirm it; decline it and the session starts normally, with the tools, but nothing will wake it.

In the session, /mcp lists orboto as connected.

The session declares its project

Added in v0.207.0 Start Claude Code with orboto claude inside a repository and the session declares that repository's orboto project as its scope before Claude Code starts - and again on every resume:

orboto claude: session 3f9a1c2e declares scope ACME · worker - from origin acme/widgets

orboto takes the project key from the first of these that names one:

  1. ORBOTO_PROJECT_KEY in the environment,
  2. the env block of the checkout's .claude/settings.local.json ({"env": {"ORBOTO_PROJECT_KEY": "ACME"}}),
  3. the repository's origin remote, matched against the git connections of the projects you are a member of (GitHub, GitLab, Bitbucket, Azure DevOps, Gitea and Forgejo, also on a self-hosted address).

When no project of yours connects the repository, Added in v0.211.0 orboto claude asks for one in a terminal and stores the answer. Added in v0.213.0 The question is the project picker: a list of 20 per page that you filter by typing, ?2 for a project's details, new to create the project (orboto connect --project new:KEY[:name] in scripts), and a repository linked to several projects opens on exactly those; without a terminal it prints the orboto connect checklist and exits 2, unless you pass --no-scope or --role. If your instance does not answer the lookup, the start warns and goes on with the scope undeclared. orboto connect --project KEY sets the project once and for all. Added in v0.213.0 A session that coordinates across projects needs no project: orboto claude --role coordinator starts a control session in any folder, and the picker offers it as 0 or none and remembers the choice for the folder in ORBOTO_SESSION_ROLE. A control session does not take the checkout's project unless --scope-projects names one. See control sessions. A session that already declares a scope keeps it. --role, --scope-projects and --scope-tickets on orboto claude override the detection; --no-scope declares nothing.

orboto connect writes the same key into the orboto server entry of the directory, so a session started without orboto claude declares it too. orboto connect --verify then sends a second probe to the project and tells you whether the session receives the project's mail. The status line shows the session with its scope (3f9a1c2e ACME · worker), and orboto doctor prints a scope line with the fix when the two differ.

Added in v0.230.0 A second orboto claude in the same checkout starts beside the first one when its scope shares no project and no ticket with it, for example orboto claude --scope-projects BETA next to a session on ACME. Each session has its own row, its own mail, its own ticket leases and its own status line, which shows the ticket that session works on. With an overlapping scope the second start is refused, see One session per account, checkout and scope. A session started with orboto claude is woken by its channel; run no Monitor beside it.

Standing arguments

Added in v0.200.0 Flags you always start with ride along without being typed, so the command an agent hands you stays short and correct:

orboto claude --set-default-args -- --dangerously-skip-permissions
orboto claude --show-default-args
orboto claude --clear-default-args
orboto claude --no-default-args     # start once without them

They live in ~/.orboto/claude.json; the environment variable ORBOTO_CLAUDE_ARGS overrides them for one shell. Every start names the standing arguments on stderr and orboto mcp status lists them, so a permission-free start is never silent.

6. Declare what the session is for

Since 0.207.0 a session started from a connected repository declares that project by itself (see "The session declares its project" above). This step is for a session that needs a different or wider scope.

In the session, the first call is orboto_session_start. Pass a scope once:

orboto_session_start { scope: { role: "lead", projectKeys: ["ACME"] } }

A session with a scope is woken by mail addressed to it, by mail inside its projects and tickets, and by broadcasts. A session without a scope is woken by mail addressed to it and by broadcasts only, and is reminded once per connection to declare one Added in v0.200.0 - so several sessions on one account do not wake each other. The full model is on Sessions, scope and the wake ledger.

7. Prove the channel works

From a second terminal in the same directory:

orboto connect --verify             # probe plus the ledger's verdict; exit code 1 with the cause
orboto connect --verify --json      # the same as a record an agent can read
orboto connect --verify --session <short id> --timeout 90s

Added in v0.200.0 It addresses a session of your account that announced the channel, sends one probe message and waits for orboto's own wake record. A verdict of channel is the pass; another transport means the session was started without orboto claude or the local-development prompt was declined; no record at all means the message did not match the scope that session declared.

What you see in the session: a channel event appears on its own, within seconds, without you typing anything.

A probe by hand, from any other account:

orboto agent-notify you@example.com "probe" --project ACME --kind request

Daily use

Requests, errors and questions arrive at once; info and complete mail arrives as one digest per fifteen minutes. What you do with a message:

  • Handled it: orboto_messages { ackIds: [...] }, or orboto messages --ack <id>,<id>.
  • Not yours, outdated or a duplicate: dismiss it with a reason Added in v0.200.0 - orboto messages --dismiss <id> --reason not-mine hides it for your session only and tells the sender once that it was misrouted; obsolete and duplicate close it for the whole account and need a --note or a --duplicate-of.
  • Reply to exactly one session: orboto agent-notify <email> "..." --session <short id>, or orboto_agent_notify { toSessionRef }.
  • See what woke you, and whether that was right: orboto agent-wakes, and --stats for the precision per session.

All of it, including the paths for harnesses without a channel, is on Agent inbox and wake-up delivery.

Restart a session without finding its terminal

Added in v0.202.0 orboto claude stays the parent of the Claude Code process it starts and supervises it: the session keeps your terminal, your signals and its own exit code, and that parent is what a restart request reaches later. A restart resumes the same conversation (claude --resume <session id>) with the same arguments and your standing defaults.

Set it up once per folder: orboto mcp install --session-reporting (then restart that one session by hand). It installs the status line and Claude Code lifecycle hooks into .claude/settings.local.json; the hooks tell the supervisor exactly when a turn runs and when the session is idle. Added in v0.236.0 In a checkout with a project the command also does the local memory move described in step 4 and takes --auto-memory on|off; orboto mcp uninstall removes the false it wrote. See One memory.

Added in v0.235.0 The same hooks also keep an agent from forgetting orboto after a compaction: on SessionStart (after a compaction, /clear, a resume or a fork) and on every SubagentStart the hook answers with the order to run orboto session-start and the routing for facts, lessons and questions, see Sessions and scope. Added in v0.236.0 The routing is three lines now, and after it the hook can add the wiki pages that answer the task and what the session did; a subagent gets the wiki pages that match its task too. orboto doctor shows the hooks as turn-state hooks.

Added in v0.233.1 The status line command ends in 2>/dev/null, so nothing it or a wrapped status line writes to stderr reaches the terminal, and a failure shows as one orboto: ... line in the status line itself. The next run of orboto mcp install --session-reporting, orboto connect or the first orboto claude start rewrites an older status line command of orboto in the settings file it sits in; orboto mcp status names the file. On macOS the status line starts no ps and, inside a repository, one git process. On Windows Claude Code runs the command through Git Bash.

Ask for a restart in any of these ways:

  1. orboto claude --restart --reason "..." from any terminal on the machine (--session <short id> or --all when several run; orboto claude --sessions lists them).
  2. orboto agent-session restart <short id> --reason "..." from anywhere, or the Restart session button in Admin -> Agents -> Live. Both need admin:agents:write, are written to the audit log with the reason, and show as restart pending until the session is back.
  3. The agent itself runs the first command in its shell - for example after orboto self-update.

What the supervisor guarantees:

  • It never interrupts a running turn. A ten-minute test run inside one tool call is still a running turn; the request waits for it, up to --when-idle-timeout (10 minutes by default).
  • Added in v0.236.0 It never ends a running subagent, background shell, Monitor or workflow either. Restarting the Claude Code process ends everything that runs inside it, so an idle main turn is not enough: the request also waits while anything runs in the background of the session (see below).
  • Without the hooks it cannot tell a running turn from an idle session, so it declines and names the command above instead of guessing.
  • A session that ends while a request is waiting stays ended.
  • Claude Code's development-channel confirmation is its own safety prompt and orboto never answers it: after a restart the terminal bell rings once and you confirm it there. Start without the confirmation removes the prompt where your plan allows it.

orboto claude --no-supervise starts a session the old way; nothing can then restart it but you.

What a restart never ends: subagents and background tasks

Added in v0.236.0 A restart, an account switch and an update all restart the Claude Code process, and everything that runs inside it ends with it. The hooks record every running subagent, background shell, Monitor and workflow of a session, and a request that would restart the session behaves like this:

  • It waits while anything runs. The state names the counts ("1 subagent and 2 background tasks (1 monitor, 1 shell) running in this session - a restart would end them"). When --when-idle-timeout runs out, the request is declined with those counts: nothing restarts and nothing ends. This holds for every request a person or a tool makes: orboto claude --restart, orboto claude switch and orboto claude update.
  • orboto claude --restart, switch and update name what runs in each session up front and refuse at once while anything runs (an update leaves that session out and exits 1). Add --force-end-agents to go ahead anyway: the restart ends the running work and says what it ended.
  • A restart asked for in Admin -> Agents -> Live or with orboto agent-session restart has no such flag. It waits and is declined after its timeout. orboto doctor --fix never forces either; it asks the sessions without running work and names the others.
  • The switch at the usage limit and the resume at the reset are different, because nobody asks for them again: a session with a Monitor that runs until it is stopped would sit on an exhausted login forever. Such a request is never declined for running work. It keeps waiting, and orboto claude --sessions and Live read "waiting for 2 tasks (1 monitor, 1 shell)". At the session's next stop the agent is told which switch waits and which tasks run, and may stop the watches and shells it no longer needs with TaskStop. The agent decides; nothing is ended for it. A person's orboto claude switch --force-end-agents replaces the waiting request and ends the work, and orboto claude switching still withdraws it.
  • Every restarted session gets one first prompt: the reason, each subagent and task that ended with the old process (kind, id, type and description), and its scheduled wakeups, with the order to start again what is still needed and continue - or keep waiting when it was waiting for its operator. Nothing idles silently after a restart.

orboto claude --sessions shows the counts under each session. No hook loses what it recorded: Claude Code starts subagent hooks in parallel, and a hook that cannot take the lock on the turn-state file within half a second appends its event as one line to a journal beside the file (and says so in hook.log) instead of writing without the lock. The next locked write and every reader fold the journal in, so a subagent, task or model that a hook recorded is never overwritten by a hook that ran at the same time. A Claude Code version that sends no list of its background tasks at the end of a turn keeps a recorded background shell on the list, so the request reads "waiting, task end not reported by this Claude Code version"; --force-end-agents is then the way out.

What the turn wrote into the wiki

Added in v0.236.0 Every knowledge write an agent makes answers with a receipt line, for example ACME-D12 "Release window" r41 -> r42 - undo: orboto knowledge undo rcp_7f3a9k2m. The agent sees it in the tool output and does not repeat it in its reply. You see the turn's writes once, when the turn ends: the hook prints a notice in your terminal.

orboto: 2 knowledge writes this turn
ACME-D12 "Release window" r41 -> r42 - undo: orboto knowledge undo rcp_7f3a9k2m
ACME-D19 "Build hosts" new r1 - undo: orboto knowledge undo rcp_q2x8c0aa
Undo in Live or with the command shown.
  • At most five lines are listed, the rest as "and M more". A receipt you already saw is not shown again, and an undone one is marked (undone).
  • The notice is for you only. It is never handed to the agent as context and never starts another turn.
  • The hook asks the instance for at most 1.5 seconds. A slow or failing instance prints nothing and the reason goes to hook.log; the turn still ends normally.
  • It needs the hooks that orboto mcp install --session-reporting registers. See Knowledge base for agents for the undo itself.

A fix after repeated failures becomes a lesson

Added in v0.236.0 The hook counts, for the main agent and for every subagent on its own, how often a Bash or PowerShell command fails. A command is its program and the next word, for example go test for go test -race ./... or npx vitest for npx vitest run. When one command failed at least 3 times and then succeeds, and that agent has not run orboto knowledge add, the result of the succeeding command carries a short note for the agent: file the lesson with orboto knowledge add if the fix is not obvious from the code, otherwise carry on, and do not mention the note to you.

  • You see nothing of it. The note is extra context next to that one tool result. It is not a message, not part of the agent's reply, never a block and starts no turn. It is under 100 tokens and costs no extra model request. When the agent files a lesson, you see it like any other knowledge write in the notice at the end of the turn, with its undo.
  • It is rare on purpose. Once per agent and at most 50 per session. Interrupted and cancelled calls count neither as failures nor as a fix, other tools (Edit, Read, MCP tools) are not counted, and a piped command is judged by its last stage, so cmd | tail failures are not counted. A session without an orboto project and scope gets nothing.
  • Where the counts live. In ~/.orboto/claude-turn/<session id>.lessons beside the turn state, readable only by you. The file goes when the session ends or after a day. A hook that cannot take the file's lock within half a second drops its event, which can only lower a count.
  • The same hook holds the turn for a failed add. A knowledge add that failed is listed by the completion check until an add with the same title succeeds; see A failed knowledge add stays open.

The idea and the measurement (prompts offered and lessons filed) are on Knowledge base for agents.

Context size reporting

Added in v0.200.0 With orboto mcp install --statusline the Claude Code status line runs orboto claude-statusline. It reads the status line data on stdin, records the session's context size under ~/.orboto/claude-context/ and prints a short line; the connector reports the value with its heartbeat, so the wake ledger can say what a wrong wake cost. A status line command you already had is carried into --wrap "<your command>" and keeps printing exactly what it printed before - nothing is replaced. Two Claude Code sessions in the same directory cannot be told apart; the ledger then reads unknown rather than guessing.

Effort and usage windows on the status line

Added in v0.235.0 The status line shows the windows your account has and the effort level of the model that runs.

Usage windows. A verified Ultra account has a weekly limit and no 5-hour limit, so its status line has a weekly line and no current line; an unverified account has a temporary 5-hour limit and shows it. Claude Code also drops a window once its reset time has passed, so a window missing from the status line says nothing about your plan. The status line fills a missing window in from orboto's own quota read only while that window has not reset, and never shows a window of that read whose reset has passed. orboto claude accounts list, the quota line after accounts setup, orboto live profiles and the Live page print none for a window the read does not carry. That is a fact about the read, not about your plan, and a failed read still says unknown. Switching between login profiles keeps working on the weekly and per-model windows of an account without a 5-hour window.

Effort. The status line shows the level Claude Code sends. Where Claude Code sends none, it works the level out for the model that runs, the way Claude Code does:

  1. CLAUDE_CODE_EFFORT_LEVEL (auto or unset sends no level, so the status line shows none).
  2. The first settings source that sets a level for the model, from managed settings (their files merged first), .claude/settings.local.json, .claude/settings.json and your user settings. In a source the level you saved for the model under modelSettings wins over a top-level effortLevel. A top-level effortLevel in your user settings does not count for Opus 5.5, Sonnet 5.5, Haiku 5.5 and later models.
  3. The model's default: medium for Opus 5.5, Sonnet 5.5 and Haiku 5.5, xhigh for Opus 4.7, high for every other model with effort.

A model without effort support (such as Mythos) shows no effort at all instead of a level it does not use.

Usage history per subscription

Added in v0.235.0 If you run several Claude subscriptions on one machine, the status line keeps a history of their usage windows, so you can see how much work one subscription carries and whether its limit changed.

Each time a usage window moves (the 5-hour window, the weekly window, or a per-model window), orboto claude-statusline adds one line to ~/.orboto/claude-usage/history.jsonl. A refresh where nothing moved writes nothing. Each line holds:

  • the time
  • the subscription: the account ID of the login in the session's Claude config directory, plus the login profile name when one is active
  • the session and the model
  • the window, its percentage and when it resets
  • the session's cost at list price and its weighted tokens

Weighted tokens put every kind of token on one scale: input + 1.25 × cache write + 0.1 × cache read + 5 × output. They are counted from the session's transcripts, its subagents included, and only from the point where the last line stopped.

The history never holds a token, a password or an e-mail address. Its file is rotated at 8 MiB, and three older files are kept. If you switch to another subscription with /login inside a session, the next line belongs to the new account.

orboto usage history                      # every account and window
orboto usage history --since 7d --series  # the last week, every series
orboto usage history --account work       # one subscription: a profile name or the start of its ID
orboto usage history --report --out usage.md

For each account and window the command prints:

  • how many lines and series it found
  • the percentage gained per million weighted tokens and per US dollar
  • the window size that follows from it: 100 % divided by that rate
  • the spread: the smallest and largest size over the series that gained at least 5 percentage points

A series is one window between two resets. A reset or a switch to another account starts a new series. If the size moves clearly from one series to the next, the limit of that subscription changed. The dollar figure accounts for the model's price; the weighted-token figure is only comparable between series with a similar mix of models. --report writes the same figures as a markdown table you can attach to a ticket, and --json prints them for a script.

What the figures leave out. Only sessions with the orboto status line add weighted tokens. Use of the same subscription from claude.ai, the Claude desktop app, claude -p, a lane without the status line or another machine moves the percentage without adding tokens. Where such use exists, the window size is a lower bound, not the exact limit. The weighting (input + 1.25 × cache write + 0.1 × cache read + 5 × output) is orboto's convention, not Anthropic's formula. The --report output repeats this as its caveat line.

The measurement also survives a reinstall of the machine. The heartbeat of a session started with orboto claude sends the account and its newest lines to your instance. Admin -> Agents -> Live then shows the account each session runs on, as the profile name or the first eight characters of its ID, with the full ID in the session details. To send everything recorded so far, run orboto usage history --upload. orboto usage history --remote analyses what your instance stored. Both use GET and POST /v1/agent/usage-samples, and your instance keeps the lines for 400 days.

Count confirmation questions

Added in v0.236.0 An agent that asks "shall I proceed?" where it could act costs you a turn. orboto usage questions counts, from the local Claude Code transcripts, how many main turns end in a confirmation question per 100 main turns, so you can compare before and after a change to your agent rules:

orboto usage questions                      # all projects, all time
orboto usage questions --since 7d --project acme
orboto usage questions --json
orboto usage questions --report --out questions.md   # a markdown table to attach to a ticket

A turn counts when the last 250 characters of its final text hold "shall I", "soll ich", "OK?" or "should I proceed" followed by a question mark; the same words in a statement, without a question mark after them, do not count. Next to it the command prints the turns whose last text holds any question mark, and the count per phrase. Subagent transcripts are not read, and only counts are printed, never the text of a turn. --since takes 7d, 48h or a date, --project matches part of the project folder name, and --projects-dir names another transcript folder.

Tips: where the tokens go in long sessions

Measured on our own agent fleet over two weeks (Claude Code 2.1.289, main sessions plus the subagents they spawn). The orboto side of a session - the wake channel, the hooks and the command output - was at most a tenth of the bill. The rest is how the session itself is run, and most of it is cheap to fix.

  • Give subagents the one-hour prompt cache. Claude Code caches the prompt prefix of a main session for an hour, but a subagent's cache lives only five minutes. A subagent that waits for a test run, a build or CI is often idle for longer than that, and the next call then rewrites its whole context at the full price: in our fleet this was almost one fifth of all spend, and nine out of ten subagent calls after a pause of five to sixty minutes paid for it. Set "subagentPromptCacheTtl": "1h" in ~/.claude/settings.json (the setting is present in Claude Code 2.1.289; the environment variable CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL takes precedence). The longer cache costs about twice as much to write, which the saved rewrites pay back several times over. Claude Code ignores the one-hour value while a subscription is in overage, so check the effect rather than assume it.
  • After a pause of more than an hour, start a new session instead of resuming the old one. Both caches have expired by then; the first message of a resumed session rewrites the entire context, and every later message carries it. A fresh session with orboto claude finds its ticket and its open work through orboto session-start anyway.
  • Hand over before the context passes about 250,000 tokens. Every message pays for the whole context again, so a session at 300,000 tokens costs about three times a session at 100,000 for the same question. The status line command (above) shows the size; a long-running coordinator stays small when the builds and reviews run in subagents and only their reports come back.
  • Use the smaller model for subagents that build and fix. In our measurements the large model's subagents cost about three times as much per run, and on precisely specified tickets the first diffs of both models needed a review round equally often; the review is where quality comes from, so spend the large model there.
  • Let the wake channel show, not wake. With the orboto mod set to actionable, digests and informational mail appear in the pane and as a toast without a model turn (Claude Code mod).
  • Wait in the background, not in a loop. A foreground sleep or polling loop inside a subagent keeps its clock running past the cache lifetime; a background watch that reports once when the state changes does not.

Switch subscriptions at the usage limit

Added in v0.230.0 With two or more login profiles, every orboto claude session moves to another subscription before and at the usage limit and continues the same conversation there. You control it from the command line, also while sessions run:

orboto claude accounts setup third                  # add an account - running sessions take it into their rotation
orboto claude accounts disable second               # hold one out - it leaves every rotation at once
orboto claude accounts config --auto-switch off     # new starts do not switch (on brings the default back)
orboto claude switching status                      # what every running session does at the limit
orboto claude switching off --all                   # running sessions stop switching, no restart
orboto claude switching on --session 1a2b3c4d       # switch over every profile again
orboto claude switching switch:work,third --session 1a2b3c4d   # a fixed order that new profiles do not join

Each session you address answers applied, refused, superseded, pending or older-cli, and the command exits 0 only when every one applied it (1 otherwise, 2 for a usage error). orboto claude --sessions and the status line show the policy next to the profile (profile work on-limit switch all at 90%), and Admin -> Agents -> Live shows and changes it under At the usage limit. A session started with a single profile already carries the switch and starts acting when you add the second one. The thresholds, the strategies, what a change withdraws and the remote input are on Switching on and off.

A subagent never starts into a spent window

Added in v0.236.0 Before every subagent starts, the hook reads the quota of the profile the session runs on and compares the tightest window for the requested model (the 5-hour and weekly windows of the account and the model's own weekly window) with the switch threshold of orboto claude accounts config (90 % unless you changed it):

  • Below the threshold the subagent starts and nothing is printed.
  • At or above it, below 100 %, the subagent starts on the current login. Your terminal gets one message per session with the window, its reset and the profile that has room, and says that a running session keeps its login. orboto claude switch restarts the session; it waits while subagents and background tasks run (see above).
  • At 100 % a Fable subagent runs on Opus when Opus is below 100 %. A subagent is never moved to Sonnet or another smaller model because of a limit. When no model has room, the start is refused with the reset time of the window and the profile that has room.
  • When the read fails or takes too long, or the live login matches no captured profile, the subagent starts and the decision reads unknown. The gate has 4 seconds from the start of the hook. Without any login profile the subagent starts and the session is told once that auto-switch has no profiles.

The gate never switches a login, never restarts a session and never writes a login. orboto usage limits [--session <id prefix>] [--last N] [--json] lists its decisions, and Admin -> Agents -> Live shows it: a chip on the session's line while a switch is needed, a start fell back to Opus or was refused, or auto-switch has no login profiles, and the last decisions under Subagent limit gate in the session's details. Codex and pi lanes have no point before a subagent starts, so the gate does not run there; they keep the lane's own --on-limit policy.

When an agent stops at the limit

Added in v0.236.0 An agent never stops, defers or reschedules work because of the wording of a limit error. When a subagent or the session itself is stopped by a usage limit, the hook hands the parent the facts at once: which window is really full, every full window with its reset, the room left on every window and profile with the time of the read, and per model where it runs now (on this login, only on another profile, nowhere until a reset, or unknown). One verdict names what to do:

  • resume the stopped agent now, on the same model;
  • run a Fable agent on Opus;
  • resume it on the profile that has room;
  • defer it until the earliest reset, only when no window anywhere has room. Never on a smaller model.

An unknown read is named unknown, and the verdict is then one retry on the same model before any deferral. The hook never writes a login, switches or restarts: a switch stays your command, orboto claude switch <name> --session <short id> for one session or --all for every supervised session, each with the same wait for running work. orboto claude limits [--json] prints the same facts at any time, and the skill, the agent rules and the dispatch prompts of the lane runners point to it.

An agent prepares the folder, you only restart

Everything except the start flag is work a session's own agent can do; the flag belongs to the process it runs in, so that one step is yours:

  1. The agent runs orboto connect --yes --replace --profile <name> in the folder and stops any older wake path it was using.
  2. It reports "ready for restart" with the exact command, verbatim: orboto claude --continue, or orboto claude --resume followed by a session id.
  3. You quit the session, run that command in that directory, and confirm the local-development prompt.
  4. The restarted agent declares its scope and runs orboto connect --verify.

Troubleshooting

What you seeCause and fix
command not found: orboto or orboto is not recognizedClose the terminal window, open a new one, try again. If it persists, repeat step 1.
command not found: claudeThe same: a new terminal window, then repeat the Claude Code install line.
orboto whoami says 401 or "unauthorized"The login expired or the key was pasted incompletely. Run orboto login again.
orboto whoami says 403The account is missing the permission for API access. Ask your workspace admin for the api:use permission, and mcp:use for the connector.
orboto whoami cannot connectThe address must be your workspace address and reachable from your machine; open it in the browser to check, then run orboto login again.
orboto claude refuses to startThe directory has no CLI-form orboto entry. Run orboto mcp install, then orboto mcp status.
orboto claude says the orboto MCP server did not register, or session-start says the session "was started with orboto claude, but the orboto MCP server is not running in it"Added in v0.226.2 Claude Code reads the orboto entry under the real path of your repository: symlinks resolved, and for a subfolder or a worktree the main checkout. A repository you moved and left a symlink to keeps the entry under the old path, which Claude Code never reads. Run orboto connect (or orboto mcp install) in the checkout, which writes the entry for the right path, then quit and run orboto claude --continue. The same line also names a missing entry, or a server that stopped while the session ran; orboto doctor shows both. "Started with plain claude" means the session never had a wake channel: start it with orboto claude.
orboto claude exits 2 with the checklistAdded in v0.211.0 The folder resolves no project. Run orboto connect --project <KEY>, start a control session with --role coordinator, or start with --no-scope on purpose.
orboto claude prints "the session scope was not declared - Another live session of this account runs in ..."Added in v0.230.0 Another live session of your account runs in this checkout with an overlapping scope: it shares a project or a ticket with the one you started. Claude Code runs, but this session has no scope yet. Declare one that shares none of the named keys (orboto session-start --role worker --scope-projects BETA) to run both side by side, or run the printed command with --adopt or --end-previous to replace every overlapping session. Details: One session per account, checkout and scope.
connect prints auto memory stays on: ... or the folder stays where it is ...Added in v0.236.0 The local memory move did not finish: a settings file that is not JSON, a file orboto cannot place, an entry the wiki refused, or a true you set on purpose. The line names the cause and the fix; One memory lists them.
A resumed conversation lists orboto_session_start without scopeClaude Code caches tool definitions per conversation. Pass scope anyway; the server accepts it.
The session is woken by its own ticket editsAdded in v0.202.0 The CLI was older than your workspace when the session started, so the connector and the CLI run under two identities. orboto doctor names it as "split session identity". Run orboto self-update, then restart the session with orboto claude --continue. From 0.202.0 on, orboto claude checks this before every start and updates the CLI itself (--no-self-update skips it); Added in v0.225.0 every other launcher does the same, see Launchers.
orboto mcp serve exits with "node not found" or names an unpatched NodeInstall Node.js 22.23.4, 24.22.1 or newer (Added in v0.230.3 older releases still trust compromised eMudhra intermediate CAs); the connector is a Node program.
The agent answers without ever running orbotoMention orboto in the sentence ("in orboto", "my orboto tickets"), or start the message with the orboto session-start line.

The wake channel's own troubleshooting (no event on a probe, the channel not registering, double delivery, wrong-project wakes) is on Claude Code: the wake channel.

What next

On this page