Background coding agents: tools, task design and a review flow that works

Background coding agents: tools, task design and a review flow that works

Background coding agents are AI agents that take a coding task, work on it in a separate environment without you watching, and come back with a branch or pull request to review. This guide compares the main options as of October 2026, shows how to write tasks that finish unattended, and lays out a review flow that keeps quality high.

In shortTL;DR
  • A background agent runs in its own environment (a cloud VM, a container or a server), so it keeps working after you close your laptop.
  • Claude Code cloud sessions, Codex cloud, Copilot cloud agent, Cursor cloud agents and Jules all follow the same pattern: task in, branch or pull request out.
  • Tasks that finish unattended are small, specific and self-checking: clear acceptance criteria plus a command that proves the work.
  • Set up the environment once (dependencies, setup script, instruction file) or every task will waste time and tokens on setup.
  • Review agent pull requests like a contributor's: read the diff, run it, and keep branch protection on main.

What are background coding agents?

Background coding agents are AI coding agents that work asynchronously. You give one a task, it runs in its own environment (usually a cloud virtual machine), and it returns a branch or a pull request when it is done. You do not watch each step or approve each command, and your laptop does not need to stay open.

That changes how you use AI for coding. Instead of pairing with an agent on one task, you queue several well-defined tasks, do other work or go to sleep, and review the results later. The skill shifts from prompting in real time to writing tasks that finish without help and reviewing what comes back.

Interactive agent (local)Background agent
Where it runsYour machineCloud VM, container or server
Your attentionWatching, approving stepsWriting the task, reviewing the result
ParallelismOne or two sessionsSeveral tasks at once
Stops when laptop sleepsYesNo
Best forExploration, unclear problems, designWell-scoped features, fixes, chores

Which background coding agents are available?

As of October 2026 the main vendors all offer a hosted background agent, and they work in similar ways: connect a repository, describe a task, get a branch or pull request back. The differences are in where you start tasks, how the environment is configured and how usage is billed.

ToolStart tasks fromEnvironmentBilling model
Claude Code cloud sessionsclaude.ai/code, Claude mobile app, desktop app, claude --cloudIsolated Anthropic-managed VM per sessionCounts toward Claude plan usage limits
Codex cloudChatGPT web, desktop and mobile, CLIPublished environment, own workspace per taskThrough your ChatGPT account
Copilot cloud agentGitHub issues and PRs, chat, agents panel, automationsEphemeral cloud environment, 59-minute session capGitHub AI credits
Cursor cloud agentsCursor desktop, web, mobile, Slack, GitHub, Linear, APIIsolated cloud VM with snapshots or a DockerfileAPI pricing for the chosen model
Jules (Google)Jules web appCloud VM that clones your repoSee Jules usage limits

A few details from each vendor's docs that affect real use:

  • Claude Code cloud sessions are available on Pro, Max and Team plans and for Enterprise premium seats. They keep running after you close your laptop, and claude --teleport pulls a finished session and its branch into your terminal. Auto-fix can watch a pull request and push fixes for CI failures and review comments.
  • Codex cloud has you set up and publish an environment first: Codex inspects your repositories, installs dependencies and tests the workflow, then each task runs from that environment.
  • Copilot cloud agent caps each session at 59 minutes and can only change the repository the task started in. It fits issue-sized work.
  • Cursor cloud agents run in isolated VMs, can return screenshots and videos of how they verified the change, and need a paid plan.
  • Jules generates a plan you review and approve before it changes code, and reads AGENTS.md from the repository root.

There is also the do-it-yourself route: run Claude Code or Codex in tmux on your own server, or headless with claude -p from a script or CI job. The guide to running Claude Code 24/7 compares those options.

How do you start a background task with Claude Code?

You can start a Claude Code cloud session from the browser, the mobile app or your terminal. From the terminal, --cloud creates a new session for the current repository:

terminal
claude --cloud "Fix the flaky test in auth.spec.ts"claude --cloud "Update the API documentation for the /v2/orders endpoints"claude --cloud "Refactor the logger to use structured output"

Each command starts an independent session, so all three run in parallel. The cloud VM clones your GitHub remote at your current branch, not your local working copy, so push first.

For bigger work, plan interactively, then execute in the background. The Claude Code docs suggest this pattern:

terminal
claude --permission-mode plan

Agree on the plan, save it to the repo (for example docs/plans/orders-export.md), commit and push, then:

terminal
claude --cloud "Execute the plan in docs/plans/orders-export.md. Run the tests after each step."

You can send a follow-up to a running session from any machine with claude -p "your message" --cloud <session-id>, and pull it into your terminal with claude --teleport when you want to finish by hand.

How do you write tasks that finish unattended?

A background task finishes well when it is small, specific, and checkable by the agent itself. The agent cannot ask you a quick question at 2 a.m., so everything it needs must be in the task or the repository.

The difference in practice:

Weak background taskStrong background task
"Improve the checkout flow""In app/checkout, show a field-level error when the postal code is invalid for the selected country. Use the existing validatePostalCode in lib/address.ts. Add tests for US, UK and DE formats. Done when npm test passes."
"Fix the bugs in search""Searching with a trailing space returns no results (issue #412). Trim the query in api/search.ts, add a regression test, run npm test."

A template that works across tools:

background task template
Goal: [one sentence, one outcome]Context: [files, functions or docs to start from; link to issue or plan]Acceptance criteria:- [observable behavior]- [edge case and expected behavior]Constraints: [don't add dependencies; don't change public API; stay in these folders]Verify: run [exact test/lint/typecheck commands] and fix failures before finishing.If blocked: stop, explain what is missing, and do not guess.Output: open a pull request with a summary of changes and open questions.

The "If blocked" line prevents the most expensive failure: an agent that guesses at a missing requirement and builds the wrong thing confidently. The full guide on how to write tasks for AI coding agents has more templates.

Good and bad task types

Good fits for background agents:

  • Bug fixes with a reproduction or failing test
  • Small features with clear acceptance criteria
  • Test coverage for a specific module
  • Dependency upgrades with a test suite to confirm
  • Documentation updates, lint cleanups, type fixes
  • Mechanical migrations split into batches

Poor fits:

  • Anything where you have not decided what you want
  • Large rewrites across many modules in one task
  • Work needing production data or credentials
  • UI changes judged only by taste, without a reference design

How do you set up the environment for background agents?

Set up the environment once so every task starts ready to work. An agent that spends the first ten minutes figuring out how to install dependencies wastes time and tokens on every run, and may give up on running tests.

  1. Instruction file. Add a CLAUDE.md or AGENTS.md with install, build, test and lint commands, plus conventions. Most background agents read one of these.
  2. Setup script. Configure the environment's setup script (Claude Code cloud environments, Codex environments, Cursor's environment config, Copilot's copilot-setup-steps.yml) to install dependencies and seed a test database.
  3. Fast, reliable tests. A flaky or slow test suite is the biggest drag on unattended work. Fix flakes before scaling up.
  4. Network rules. Allow package registries and the services tests need; block the rest. Claude Code cloud environments default to a trusted-domains level of access.
  5. Secrets. Use test keys only. Never give a background agent production credentials.
Tip

Run one trivial task (for example "run the test suite and report the result") after setting up a new environment. If that fails, every real task will too.

How do you review background agent pull requests?

Review agent pull requests like contributions from a capable new teammate: assume good intent, verify everything. The speed of background agents is only useful if review keeps up and quality holds.

A review flow that scales:

  1. Triage by summary. Read each PR description and close anything that misunderstood the task. Rewrite the task and requeue instead of fixing by hand.
  2. Check CI first. Do not read a diff whose tests fail. Ask the agent (or auto-fix) to get CI green.
  3. Read the diff. Look at scope (did it touch files outside the task?), new dependencies, deleted tests, changes to CI config or auth code.
  4. Run it. Check out the branch or open the preview deploy and try the feature for two minutes.
  5. Comment, don't rewrite. Leave review comments and let the agent address them. With Claude Code, inline comments in the diff view go back to the session.
  6. Merge with protection on. Keep branch protection on main so nothing merges without your approval.

Batch reviews into one or two fixed times a day. Starting more tasks than you can review that day leads to stale branches and merge conflicts. The overnight AI agent workflow describes a morning review routine in detail, and if several agents touch the same repository, git worktrees for parallel agents explains how to keep their changes apart.

Warning

A background agent reads issues, docs and web pages without anyone watching. Treat that content as untrusted and limit what a fooled agent could reach. See the guide to prompt injection in coding agents.

Where a hosted box fits

Hosted background agents from model vendors run each task in a fresh VM that is reclaimed after a period of inactivity. That suits independent tasks. Some workflows want a persistent machine instead: an environment that stays set up between tasks, long-running jobs, several agents (Claude Code and Codex) on the same projects, and one place to steer them from a phone.

Orkio rents that kind of always-on, isolated cloud box. Agents run on your own Claude account, so there is no markup on model usage. You give tasks from your phone or the web, close the app, and review the pull requests later, and Insights shows what the agents cost per project and per merged pull request. The Starter box (2 GB memory, 1.5 vCPU) is $19 a month. If you prefer to build this yourself, a VPS with tmux works too; you take on the security and maintenance.

How to start with background agents this week

  1. Pick one tool you already pay for (Claude, ChatGPT, Copilot or Cursor) and connect one repository.
  2. Add or tidy CLAUDE.md or AGENTS.md with exact build, test and lint commands.
  3. Configure the setup script and run a trivial "run the tests" task to prove the environment.
  4. Write three small tasks with the template above: a bug fix, a test-coverage task and a docs update.
  5. Start all three, then do something else for an hour.
  6. Review with the six-step flow, note what each agent misunderstood, and fold the fixes into your instruction file.
  7. Increase volume only when your review time keeps up.

Frequently asked questions

What is the difference between a background agent and agent mode in my editor?

Agent mode in an editor runs on your machine while you watch and approve steps. A background agent runs somewhere else, usually a cloud VM or server, works without supervision and hands back a branch or pull request, so you can start several tasks and do other work.

Do background coding agents cost extra?

It depends on the product. Claude Code cloud sessions count toward your Claude plan's usage limits with no separate VM charge, Copilot's cloud agent draws on AI credits, and Cursor bills cloud agents at API pricing for the model. Parallel agents use your allowance faster.

How many background agents can I run at once?

Most hosted options let you start several tasks in parallel, limited by your plan's usage limits rather than a fixed count. In practice your review capacity is the limit: starting more tasks than you can review the same day creates a backlog of stale pull requests.

Are background coding agents safe?

They are safer than running an unattended agent on your laptop, because each task runs in an isolated environment without your personal files. Risks remain: prompt injection from content the agent reads, overly broad tokens and unreviewed merges. Use scoped credentials, restricted network access and branch protection.

What tasks should I not give a background agent?

Avoid tasks with unclear requirements, product decisions, large cross-cutting rewrites, anything needing production access, and work that depends on information only you have. Keep those interactive and hand off the well-defined pieces.

SOURCES

  1. Claude Code docs: Use Claude Code in the cloud
  2. Codex docs: Cloud
  3. GitHub Docs: About Copilot cloud agent
  4. Cursor docs: Cloud agents
  5. Jules docs
  • #background agents
  • #coding agents
  • #claude code
  • #async
  • #pull requests
Orkio team

The team building Orkio. We write about putting AI to work: coding agents that run overnight, always-on boxes and pull requests ready by morning.

Keep reading

All posts

07:06 · YOU MERGED #128

Go to sleep. Wake up to pull requests.

Start for $19 a month
© 2026 Orkio · Hosted in Europe TürkçeStatus