Cloud coding agent CLI cheat sheet: 8 tools side by side
Every cloud coding agent CLI side by side: the commands to start, check, pull, reply to and stop hosted tasks in Codex, Claude Code, Jules, Copilot and more.
Most coding agent CLIs run the agent on your laptop. You type, it edits files in your checkout, and it stops when you close the terminal. For a lot of work that's what you want. A cloud coding agent CLI hands the task to a sandbox on the vendor's machines instead and gives your prompt back right away. The agent comes back later with a branch or a pull request, so it suits the ticket you'd rather not babysit. What a background coding agent is covers the difference in more detail.
For each tool below, the commands are the ones its vendor documents for the cloud path: install, log in, start a cloud task, check on it, bring the result back, reply, and stop. Where a step isn't documented from the terminal, we say so rather than guess. We build Sinatra, the last entry.
Commands checked October 2026 against each vendor's own docs, linked in each section. Several of these are labeled experimental or preview by their vendors, so flags may move.
Cloud coding agent CLI commands at a glance
| Tool | Start a cloud task | Check on it | Bring the result back | Reply from the terminal | Stop from the terminal |
|---|---|---|---|---|---|
| Codex | codex cloud exec --env ID "..." | codex cloud list | codex apply ID | Not documented | Not documented |
| Claude Code | claude --cloud "..." | claude --teleport picker | claude --teleport ID | claude -p "..." --cloud ID | Not documented |
| Jules | jules remote new --repo . --session "..." | jules remote list --session | jules remote pull --session ID | Not documented | Not documented |
| Copilot | gh agent-task create "..." | gh agent-task list, view --log | Draft PR | Not documented | Not documented |
| Cursor | & prefix in an interactive session | cursor.com/agents | Not documented | Not documented | Not documented |
| Devin | devin --cloud -p "..." | devin --cloud -r | /pickup in a session | devin --cloud -r ID (interactive) | /archive (archives the session) |
| OpenHands | openhands cloud -t "..." | Web interface | Web interface | Not documented | Not documented |
| sinatra | sinatra "..." | sinatra tasks, sinatra show ID | PR on GitHub | sinatra reply ID "..." | sinatra stop ID |
Codex
Install with npm install -g @openai/codex or brew install --cask codex, then run codex login, which opens a browser for the ChatGPT sign-in. Cloud tasks need a ChatGPT login: OpenAI's pricing page lists "No cloud-based features" for an API-key sign-in, and lists Codex in the CLI from Plus up.
codex cloud exec --env ENV_ID "fix the flaky retry test"
codex cloud exec --env ENV_ID --attempts 3 "fix the flaky retry test"
codex cloud list --json
codex apply TASK_ID
Per the CLI reference, codex cloud exec "submits a task directly," and --env is required; bare codex cloud opens an interactive picker where you can find the id. --attempts runs best-of-N, from 1 to 4. None of the other CLIs here has that, and it helps when a fix could go a few ways. codex cloud list prints each task's URL and status, with --json for scripts. codex apply applies the task's latest diff to your local checkout and "exits non-zero if git apply fails." OpenAI labels codex cloud experimental, and the reference doesn't document a way to reply to or stop a cloud task from the CLI.
Claude Code
Install with curl -fsSL https://claude.ai/install.sh | bash or brew install --cask claude-code, then claude auth login. Cloud sessions need a claude.ai sign-in rather than an API key, and Anthropic's web docs say they're "available on Pro, Max, and Team plans, and for Enterprise users with premium seats or Chat + Claude Code seats."
claude --cloud "Fix the authentication bug in src/auth/login.ts"
claude --teleport # pick a session
claude --teleport SESSION_ID # check out its branch locally
claude -p "also add a test" --cloud SESSION_ID
The cloud VM "clones your current directory's GitHub remote at your current branch, not your local checkout, so push first if you have local commits." If you forget, the cloud session works on code without your latest commits. --remote still works as a deprecated alias for --cloud. claude --cloud "..." without a session id starts a new session each time.
You check progress on claude.ai or in the mobile app, or with the --teleport picker. --teleport with an id "fetches and checks out the branch from the cloud session, and loads the full conversation history," and you create the PR from claude.ai/code when the session is done. Follow-ups work from the terminal: claude -p "..." --cloud SESSION_ID "queues the message into the session and exits without waiting for a reply," and --output-format json returns {ok, session_id, url}. Archiving or deleting a session happens in the web sidebar; the CLI has no command for either.
Jules
Install with npm install -g @google/jules and run jules login, which opens a Google sign-in.
jules remote new --repo . --session "write unit tests for the parser"
jules remote new --repo torvalds/linux --session "..." --parallel 3
jules remote list --session
jules remote pull --session 123456
Per the CLI reference, --repo . means the current directory's repository, --parallel starts several sessions on the same task, and jules remote pull fetches the changes from a completed session. Replying and stopping aren't documented from the CLI. The base Jules plan allows 15 tasks a day and 3 at once, per Google's usage limits, and paid Jules plans are currently only for individual Google accounts. See our Jules review for the rest.
GitHub Copilot
Copilot's cloud agent is reachable from the regular GitHub CLI. The agent-task commands need gh 2.80.0 or later and are a public preview, per GitHub's CLI guide.
gh agent-task create "add rate limiting to the export endpoint" -R acme/web -b main
gh agent-task create -F task.md --follow
gh agent-task list --json state,pullRequestUrl
gh agent-task view TASK_ID --log --follow
-F reads the task from a file, or from stdin with -, and --follow streams the session log. The result is a draft pull request in the repository. In the separate Copilot CLI, /delegate hands the current session to the cloud agent, which opens a draft pull request; it first asks to commit any unstaged changes to a new branch. The gh manual doesn't document a stop or reply command. The cloud agent is on by default for Copilot Pro, Pro+ and Max, and an administrator has to enable it on Business and Enterprise.
Cursor
Install with curl https://cursor.com/install -fsS | bash and log in with agent login. The cloud handoff happens inside an interactive session: per Cursor's CLI docs, you "prepend & to any message" to push the conversation to a Cloud Agent.
agent
# then, at the prompt:
& refactor the auth module and add tests
After that you "pick up your Cloud Agent tasks on web or mobile at cursor.com/agents." There's no documented --cloud flag or non-interactive cloud launch, and no documented terminal command to list, pull or stop a cloud agent, so from scripts you'd use the Cloud Agents API instead. Cursor's pricing page puts cloud agents on Premium, at $30 a month, and above, and they're charged at API pricing for the model.
Devin
Install with curl -fsSL https://cli.devin.ai/install.sh | bash or brew install --cask devin-cli, then devin auth login.
devin --cloud -p "fix flaky CI tests"
devin --cloud -r # pick a recent cloud session
devin --cloud -r SESSION_ID # reopen one
Per the Devin CLI docs, --cloud -p "starts a session, sends one prompt, prints Devin's response to stdout, and exits. The session persists." Inside a session, /repo, /platform and /model set things up before the first message, /pickup "checks out the session's pull request branch and starts a local session on it," and /archive archives it. Devin also goes the other way: /handoff moves a local session to the cloud with its branch, context and uncommitted changes. Devin's pricing is Pro at $20 a month and Max at $200. Teams has an $80 monthly minimum that covers two full seats, then $40 per seat.
OpenHands
Install with uv tool install openhands --python 3.12, then openhands login.
openhands cloud -t "Fix the authentication bug in login.py"
openhands cloud -f task.txt
Per the OpenHands CLI docs, this creates a new conversation in OpenHands Cloud, and you "continue in the web interface." The command takes the task as text or a file and has no repository or branch flags.
Factory's Droid CLI isn't on this list because its docs don't describe starting a hosted session from the terminal. Hosted Factory sessions start in the Factory app or from a delegation such as a Slack mention.
Sinatra
Sinatra's CLI only does the cloud half. It never runs an agent on your machine: every command talks to the hosted agent, which works in its own sandbox and comes back with an answer or a pull request.
Install and log in. It needs Node 22 or newer.
npm i -g sinatra.dev
sinatra login
sinatra login opens a Sinatra page in your browser, you click Approve, and the CLI is signed in. If you belong to more than one workspace it asks you to pick a default. On a machine with no browser, or one you reach over SSH, use sinatra login --token and paste a personal access token from the dashboard's CLI & API page.
Start a task by giving it a sentence:
sinatra "fix the flaky retry test"
sinatra "explain why this fails" -f err.log -f notes.md
Inside a git checkout, the task runs on that checkout's GitHub repository. The CLI looks at the origin remote first, then upstream, so running it inside a fork falls through to the repository it forks when the fork isn't connected. -r owner/name names the repository explicitly and is never replaced. -f attaches text files to the message, up to 80 KB together.
After you start a task, the CLI prints what Sinatra posts until the turn is done, then tells you how to reply. What it prints is the agent's answer or question for the turn, not a log of every step. Ctrl-C stops waiting and the task keeps going.
sinatra tasks # the 20 most recently active tasks
sinatra show <task-id> # the task and its conversation
sinatra reply <task-id> "also update the docs" # follow up, then follow the task
sinatra stop <task-id> # stop the running turn
A reply sent while a turn is running doesn't change that turn. It waits and runs as the next one. sinatra stop works on any task in the workspace, including ones started from Linear, GitHub or Slack, and keeps the task. To continue, reply where it started: sinatra reply for a CLI task, the ticket or thread for the others.
Tasks started from the CLI count against the workspace's plan like any other task: Free is 1 task at a time, plus 1 queued, with no daily limit and no card, and Pro is $20 a month for the whole workspace, with 3 tasks at a time, plus 10 queued, any number of people. The model work runs on a Claude or ChatGPT subscription you connect, or on a workspace API key, and Sinatra never bills for model usage. For a small team the cheapest honest path is the subscriptions you already pay for, plus $20 a month for the whole workspace.
Scripting and CI
To run one of these in a pipeline, it has to log in without a browser, return right away with output a script can parse, and exit with documented codes.
Start with logging in. Codex has codex login --with-api-key and --with-access-token, but OpenAI says an API-key sign-in gets no cloud features, so plan on a ChatGPT login wherever codex cloud exec runs. Claude Code's cloud sessions likewise need a claude.ai sign-in rather than an API key. gh agent-task uses whatever gh is authenticated with. Sinatra takes a personal access token on stdin, and that's how to log it in on CI:
sinatra login -w "$WORKSPACE_ID" < token-file
sinatra "the nightly build failed, see the log" -f build.log --no-wait --json
Most of them can hand off and return. codex cloud exec, claude --cloud, jules remote new, gh agent-task create without --follow, devin --cloud -p and openhands cloud all do. sinatra ... --no-wait --json starts the task and prints it as JSON. codex cloud list --json and gh agent-task list --json give you something to poll, and so do sinatra tasks --json and sinatra show ID --json.
Few of these document their exit codes. Codex says submission failures exit non-zero, and codex apply exits non-zero on a conflict. OpenHands documents 0, 1 and 2 for its CLI. Sinatra documents four:
| Code | Meaning |
|---|---|
0 | The turn finished, or the command succeeded. |
1 | An error: bad arguments, not logged in, an invalid token, a refused request, or a network failure. |
2 | The task failed, was cancelled, or is paused on access or billing. |
3 | Still working when the CLI stopped waiting, or Sinatra hasn't picked up your reply yet. |
By default sinatra follows a task for 30 minutes before it exits with 3, and --timeout changes that. Every request that changes something carries an idempotency key, and the CLI tries up to three times on a dropped connection or a server error without starting a second task. For anything more involved than a single command, the API comparison covers calling the same services over HTTP.
Which cloud agent CLI to use
Use the CLI that belongs to the subscription you already have. If you're on a ChatGPT plan, codex cloud exec is right there, and --attempts is a nice extra. On a Claude plan, claude --cloud plus --teleport is the smoothest loop between a cloud session and your own checkout, as long as you remember to push first. If your team pays for Copilot, gh agent-task is the one you can put in a script today, with JSON output and a live log. Our Codex, Claude Code and Copilot comparisons cover the rest of each product.
Codex, Claude Code, Cursor, Devin, Copilot and OpenHands also run their agents locally and interactively. Sinatra's CLI never does. If you want to watch an agent edit your files and interrupt it at the keyboard, use one of those.
sinatra runs on whichever Claude or ChatGPT subscription or API key your team connects, so the CLI isn't tied to one vendor's plan. The task it starts is the same kind of task as a Linear assignment, a Sinatra label on a GitHub issue or a Slack mention, and it shows up on the same dashboard where a teammate can read it and reply. Its exit codes and --no-wait --json output are documented for scripts. The trade is that a reply sent while a turn is running waits for the next turn, and nothing runs on your machine. If you'd rather hand work off from a chat window, the claude.ai and ChatGPT post uses the same tasks through MCP.
Common questions
What's the difference between a local agent and a cloud task?
A local agent runs on your machine and edits your working tree; it stops when you close the terminal. A cloud task runs in a sandbox on the vendor's machines, keeps going when you disconnect, and comes back as a branch, a diff to apply, or a pull request.
Is claude --remote still a thing?
It still works, as a deprecated alias for claude --cloud.
Which of these CLIs can reply to a running cloud task?
Claude Code queues a message into a cloud session with claude -p "..." --cloud SESSION_ID. Devin reopens a cloud session with devin --cloud -r. sinatra reply sends a follow-up that runs as the task's next turn. The others don't document a reply from the terminal.
Can I stop a cloud task from the terminal?
sinatra stop stops the current turn of any task in the workspace, and Devin's /archive archives a session. For the others, stopping is documented in their web apps.
Does the sinatra CLI need a repository?
It works best inside a git checkout, where it uses the origin remote, then upstream. Outside one, name the repository with -r owner/name, or the agent picks one of the workspace's connected repositories.
To try it, run npm i -g sinatra.dev and sinatra login, start free if you don't have a workspace yet, and give it a sentence from inside a repository you've connected. The CLI and API page has the overview, and the CLI reference has every command and flag.