The Lean Definition of Done for an AI Coding Agent Is a Merged Pull Request Not a Terminal Session

Agent work only counts once it clears review, CI, and merge.

· 8 min read
Cover illustration for “The Lean Definition of Done for an AI Coding Agent Is a Merged Pull Request Not a Terminal Session”
Cloud Agent Adoption · November 9, 2026 · 8 min read · 1,879 words

The best cloud coding agents for engineering teams are those that turn delegated tasks into tested, reviewable pull requests. OpenAI Codex provides sandboxed cloud execution, while Linear offers issue-linked coding sessions using Claude Code or Codex. The lean definition of done is a merged pull request because it makes agent work reviewable, attributable, and measurable through the same gate as human-authored code.

Why a terminal session is not evidence that anything shipped

A terminal shows commands running, files changing, and test output scrolling past. The shared codebase records none of that activity until changes are committed and merged. An agent can appear to finish a task while leaving the team with work that nobody else has reviewed or accepted.

That gap grows as coding tools take on larger assignments. Autocomplete helped with moments, such as finishing a function, while agents handle tasks, such as fixing a bug, adding tests, and opening a pull request. The scope has changed. A definition of done suited to an interactive suggestion cannot account for a delegated task whose owner may not be present during execution.

GitHub distinguishes synchronous agent mode in an IDE from an asynchronous cloud coding agent that returns a pull request. Asynchronous delegation needs a durable hand-off because the person assigning the work need not watch it happen. Even a saved transcript does not give a reviewer the same means to approve, attribute, or revert a change that a pull request provides.

What the pull request actually enforces that a terminal session cannot

A pull request places proposed changes on a branch where review and CI can act on them before they enter the shared codebase. Under the PR-as-done standard, the agent drafts and a person merges. That division is non-negotiable for customer-facing changes. The merge gate makes acceptance a separate event from generation rather than treating the agent’s own declaration of success as approval.

Tests that passed during the agent’s session do not replace tests run against the branch in a controlled environment. Those checks can catch environment-specific failures that the agent’s sandbox missed. A terminal log can describe an earlier execution, but it cannot substitute for the checks attached to the proposed change.

The pull request then preserves an audit trail of who opened it, what changed, what CI reported, who approved it, and when it merged. These records are timestamped and tied to the branch. If a merged change causes an incident, the team can revert the change represented by the PR rather than trying to turn a session transcript into a rollback plan.

How the bottleneck moved from code generation to code review — and what that means for the PR standard

Agents make code cheaper to write without giving the team more time to review it. More proposed changes reach the queue, but someone still has to check each one before accepting it. The queue becomes the constraint on delivery. A team can therefore see more code and more pull requests without seeing a corresponding increase in resolved work, even when individual coding tasks appear faster.

A Harvard working paper covering a large number of firms found that lines of code and pull request volume rose substantially after AI coding agents were introduced. The absence of a statistically significant change in the resolution rate of tracked features and issues exposes the gap between production and completion. Increased coding output does not by itself establish that the downstream process can absorb it or that more assigned work reaches resolution.

This complication makes the scope of each proposed change matter more because the team has only so much time for review. Agent PRs should be small, focused, and well-tested. Teams that already ship this way are better placed to take on agent output than teams whose changes take a lot of work to make sense of. Small changes give a reviewer less to understand at once, but the reviewer still has to understand them.

Why PR volume is the wrong metric and what to measure instead

Counting pull requests rewards more work for people to review, even when that work achieves little. An agent can generate many small changes that increase the queue without resolving assigned issues. Small scope alone is therefore insufficient. It supports reviewability, but it becomes a misleading target when the organization rewards the number of PRs regardless of what those PRs accomplish.

Microsoft’s study of Claude Code and GitHub Copilot CLI adoption across tens of thousands of engineers found that adopters merged substantially more pull requests than they otherwise would have. The paper explicitly treats merged PRs as a proxy for output, with product value still to be established. That qualification sets a useful boundary. Concerns about review load, incident risk, and low-value churn are operational implications drawn here.

Time to first review shows whether agent PRs move through the queue, while defect rates show how they compare with human-authored changes. Incidents traced to recent merges show what happened when those changes were accepted and how much they cost to fix. Anthropic’s engineering team has described source control, builds, and CI built for human scale as the bottleneck.

The measurement standard should therefore ask whether agent PRs passed CI, merged cleanly, stayed in production, and resolved their assigned issues. Opening a PR records activity. Completing that chain establishes accountability.

What the Ramp case shows about PR-as-done at team scale

Ramp’s Inspect makes the hand-off concrete by validating changes in isolated environments through Modal Sandboxes before those changes reach production. The sandbox shows how the changes ran before they reach the merge gate. This separates the agent’s attempt to solve a task from the team’s decision to accept the resulting change, rather than relying on confidence in an unattended session.

Ramp reports a substantial increase in per-person pull request throughput, with the majority of engineering and product staff freed to build new product lines. The structural detail is that agent sessions end in reviewable artifacts. The output enters the team’s existing acceptance process. Higher throughput is therefore not presented as a reason to abandon review or to treat generated code as production-ready merely because the agent finished running.

Non-engineers merging agent-authored PRs makes that structure especially significant. The hand-off must work even if the person receiving it has not followed every command or seen the context the agent worked with. It must be legible outside the session. A pull request gives the recipient a defined change and a place to inspect its validation before accepting it.

This does not mean that a PR’s existence proves correctness. The proposed change must arrive with evidence from execution.

How the agent's environment determines whether the PR it opens can be trusted

An agent running in a shared, unconfigured environment does not produce the same evidence as one running in an isolated VM with the team’s dependencies, test suite, and tooling pre-loaded. Both may open a pull request. Only the latter has what it needs to test the change against the team’s development requirements before handing it over.

The environment determines what the agent can verify. If a task needs to install packages, run services, or drive a browser, an environment that blocks those actions leaves that part of the work untested. The PR may still contain a plausible solution, but its readiness is speculative. A capable model cannot compensate for execution conditions that prevent it from checking its own work.

Isolation addresses a different concern, namely the scope of what the agent can access or change. Filesystem and network restrictions limit what the agent can reach beyond its assigned task, including other projects and paths for data exfiltration. Anthropic released Sandbox Runtime as an open-source research preview developed for Claude Code. It uses OS-level filesystem and network restrictions to limit what arbitrary processes can do without a container.

A restricted environment can limit the damage an agent could cause, while a properly configured environment lets it exercise the proposed change. Model capability and execution conditions are co-equal inputs to PR quality. Trustworthy hand-off depends on both, with branch CI and human review still determining whether the change is accepted.

How do Claude Code, Codex, Cursor, and Opencode differ in their PR hand-off?

OpenAI Codex’s cloud coding agent runs in an isolated container in the cloud rather than depending on a developer’s local environment. It can set up dependencies and run tests in the cloud before the hand-off. OpenAI states that internet access is disabled during task execution, which is a relevant constraint when assessing environment requirements. An open-source CLI is also available, but the cloud agent is the option described here that directly removes the local execution requirement.

Codex’s environment is structurally closer to CI than an agent working only on a developer’s machine. That similarity supports review readiness. The branch still needs its own checks and review. For a team seeking cloud execution without maintaining a local agent session, this is a concrete distinction rather than a claim that one model always produces better code.

Cursor takes an editor-first approach, with the agent operating on files, symbols, and project structure inside an AI-native editor. It suits developers who want to inspect and accept changes in context before opening a PR. The developer remains close to the work. That interaction differs from delegating a task asynchronously and waiting for a reviewable artifact to return.

Claude Code has a documented role in Linear’s coding sessions and is the harness for which Sandbox Runtime was developed. Those facts show how Claude Code can connect to other tools and run in isolation, but they do not show that every Claude Code deployment has the same cloud hand-off. The supplied product details do not establish another coding agent’s hosting, isolation, or PR behavior, so a factual comparison cannot rank it on those criteria. The comparison should turn on where the agent runs, what checks it can run, its isolation, and how the reviewer gets the change.

How integrations with Slack, Linear, and GitHub make PR-as-done operationally real

PR-as-done becomes a team workflow when assignment starts where work is tracked and acceptance happens where code is reviewed. Slack, Linear, and GitHub represent the entry and review points that such a workflow needs to connect. The intended pattern is straightforward. An engineer assigns a task, an agent executes it in an isolated environment, and a pull request returns for review without requiring the engineer to supervise a terminal.

Linear documents a concrete version of that pattern. Its coding sessions use Claude Code or Codex, and its agent reads an issue and the surrounding discussion before investigating the codebase. It then proposes an approach, writes the code, and opens a pull request. The issue supplies the task context, while the PR supplies the reviewable hand-off.

But a claim that a platform can use workplace chat messages or GitHub issues as triggers needs evidence about that product. The documented Linear workflow does not show that every harness can do those things. Integration claims must be as precise as claims about sandboxing or testing.

Delegated work can enter the existing engineering process with its context, proposed change, and validation available for review. Human and agent work may begin differently. Their accountability structure becomes the same when both paths end at the same human-reviewed, CI-checked merge gate.

Sources

  1. Adoption and Impact ofCommand-Line AI Coding Agents A Study of Microsoft’s Early 2026 Rollout of Claude Code and GitHub Copilot CLI

More in Cloud Agent Adoption