CLI reference / Overview
CLI reference
Every command and option of the handsoff tool, each with its help and a real run.
The pages in this section quote the tool's help exactly as it prints it. Most options print no description of their own, so each page explains them in a table under the help.
The examples come from one test workspace, run at different moments. So the names, numbers, times and lists you see will differ. The tool names you by your sign-in id, a long string of letters and digits. handsoff login prints that id. handsoff whoami prints your name, or unknown when your sign-in page sends none, and then the id in brackets.
handsoff
Run handsoff --help to list the commands:
A relay for agent work
Usage: handsoff [OPTIONS] <COMMAND>
Commands:
adapter
hook
session
login
logout
whoami
workspace
handle
open
baton
save
offer
continue
retract
block
unblock
close
show
list
status
renew
end
note
history
pending
sync
instructions
checks
help Print this message or the help of the given subcommand(s)
Options:
--server <SERVER>
--workspace <WORKSPACE>
--as <HANDLE>
--session <SESSION>
--runtime <RUNTIME>
--model <MODEL>
--leg <LEG>
--account <ACCOUNT>
--json
-h, --help Print help
-V, --version Print version
The commands, by page:
| Commands | Page |
|---|---|
login, logout, whoami | Sign-in commands |
workspace, handle | Workspace and handle commands |
open, save, offer, continue, retract, renew, end, note, block, unblock, close | Carrying work |
show, list, status, history, baton | Reading work |
pending, sync | Offline commands |
adapter, hook, session, instructions, checks | Agent commands |
help | This page, below |
To print the tool's version:
handsoff --version
handsoff 0.1.0
Global options
Each command takes the global options that its help lists. Put them before or after the command's name.
| Option | What it does |
|---|---|
--server <SERVER> | The address of your Handsoff service. handsoff login keeps it, so you rarely give it again. |
--workspace <WORKSPACE> | The workspace to act in, by name or id. Without it, the tool uses the selected workspace. |
--as <HANDLE> | The handle to act as. It must be one of yours. Without it, the tool uses your selected handle. workspace create selects your owner handle, and handle claim can select the claimed one. |
--session <SESSION> | The id of the agent session that runs the command. The tool keeps each leg under its session, so two sessions never mix up their legs. |
--runtime <RUNTIME> | The runtime's name, such as claude-code. open and continue report it to the service, and the history shows it. adapter install and hook do not take this option. |
--model <MODEL> | The model's name. open and continue report it, and the history shows it. |
--leg <LEG> | The leg that a carrier's write acts on. Use it when this machine's own record cannot tell which leg you mean. A leg is one carrier's stretch on the work. |
--account <ACCOUNT> | Which stored sign-in to use, by its sign-in id. You need it only when this machine account holds more than one sign-in for the service. |
--json | Prints the result as JSON. See JSON output. |
-h, --help | Prints the help of the tool or of one command. |
-V, --version | Prints the tool's version. Only the tool itself takes it, not a command. |
A setting comes from the option first. Without the option, the tool reads an environment variable. Without that, it reads its config file, config.json in the config folder. The config file holds only the service, the workspace and the handle.
Two shells with no session id look like one session to the tool. Give each agent session its own id.
Environment variables
The tool reads these variables. The first seven stand in for an option.
| Variable | What it does |
|---|---|
HANDSOFF_SERVER | Same as --server. |
HANDSOFF_WORKSPACE | Same as --workspace. |
HANDSOFF_HANDLE | Same as --as. Give each agent its handle this way. |
HANDSOFF_SESSION | Same as --session. |
HANDSOFF_RUNTIME | Same as --runtime. |
HANDSOFF_MODEL | Same as --model. |
HANDSOFF_ACCOUNT | Same as --account. |
CLAUDE_CODE_SESSION_ID, CODEX_THREAD_ID | The session id when neither --session nor HANDSOFF_SESSION gives one, in this order. Claude Code and Codex set them. |
HANDSOFF_TRANSCRIPT | Where the session's transcript lives. open and continue report it to the service. On open, --transcript takes its place. |
HANDSOFF_RUNNER | The name of the runner that started the session. When a runner sets it, the hooks leave the end of the session to the runner. |
CLAUDE_ENV_FILE | Claude Code's file for session variables. At session start, the Claude Code hook adds the session's id, runtime and model to it. It skips this when a runner started the session. |
HANDSOFF_CONFIG_DIR | The config folder, where the tool keeps your sign-in and config.json. Without it, $XDG_CONFIG_HOME/handsoff, then ~/.config/handsoff. |
HANDSOFF_STATE_DIR | The state folder, where the tool keeps its record of legs, its queue of pending writes and adapter.log. Without it, $XDG_STATE_HOME/handsoff, then ~/.local/state/handsoff. |
HTTPS_PROXY, https_proxy | The proxy for the tool's HTTPS requests. |
ALL_PROXY, all_proxy | The proxy to use when you set no HTTPS proxy. |
NO_PROXY, no_proxy | Hosts to reach directly, with no proxy, separated by commas. |
NO_COLOR | Set it to anything but empty to turn off colour and bold in the terminal. |
TERM | When it is dumb, the tool prints no colour or bold. |
When you set both forms of a proxy variable, the uppercase one wins. The tool adds colour and bold only when it prints to a terminal. Output in a pipe and --json output never carry them.
Exit codes
| Code | What it means |
|---|---|
0 | Done. The service accepted the act, or the command finished. |
1 | Refused by a rule. The work did not change, but its history may record the refused write. |
2 | The tool could not reach the service, or could not tell what happened. |
3 | Queued on this machine as pending. The service has not accepted it yet. Offline commands explains the queue. |
A command never exits with 0 for an act the service did not accept. Every error prints two lines. The first says what happened and what to do, for you. The second gives the code, the detail and the fix, for the agent or script that ran the command.
The examples below run in the billing workspace, after the steps on Workspace and handle commands. A refusal by a rule:
handsoff handle disable dana
The owner's person handle must stay enabled; choose another handle.
not_allowed: owner handle cannot be disabled; fix: choose a member handle
echo $?
1
A service the tool cannot reach, here through a proxy that does not answer:
HTTPS_PROXY=http://127.0.0.1:9 handsoff list
The record could not be reached; the environment proxy http://127.0.0.1:9 may be refusing or unable to reach the network.
unavailable: the record or local state could not be reached; fix: check proxy settings, NO_PROXY, network access and the session's sandbox; retry
echo $?
2
JSON output
With --json, a command prints its result as one JSON object instead of plain text.
handsoff handle list --json
{"handles":[{"disabled_at":null,"id":"49","kind":"person","name":"dana","principal":"1","role":"owner"},{"disabled_at":null,"id":"50","kind":"agent","name":"build-agent","principal":"1","role":"member"},{"disabled_at":null,"id":"51","kind":"agent","name":"review-agent","principal":"1","role":"member"},{"disabled_at":"2026-10-05T04:12:46.015962+00:00","id":"52","kind":"person","name":"sam","principal":"1","role":"member"}]}
An error with --json prints its first line as usual, then a JSON object with code, message, detail and fix. Both go to standard output, so a script that reads the JSON must skip the first line:
handsoff handle disable dana --json
The owner's person handle must stay enabled; choose another handle.
{"error":{"code":"not_allowed","detail":"owner handle cannot be disabled","fix":"choose a member handle","message":"The owner's person handle must stay enabled; choose another handle."}}
handsoff help
Prints the tool's help, or the help of one command. handsoff help <command> prints the same text as handsoff <command> --help. Commands in a group take the group's name first, such as handsoff help workspace create.
handsoff help whoami
Usage: handsoff whoami [OPTIONS]
Options:
--server <SERVER>
--workspace <WORKSPACE>
--as <HANDLE>
--session <SESSION>
--runtime <RUNTIME>
--model <MODEL>
--leg <LEG>
--account <ACCOUNT>
--json
-h, --help Print help
handsoff help with no command prints the same list as handsoff --help.