> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Coding Agent

> CodeRabbit's Coding Agent turns a user request, a review finding, a coding plan or a failing CI check into a task that CodeRabbit's agent implements in the cloud, then delivers as a direct commit or a stacked pull request for you to approve.

export const OpenBetaBadge = ({tip = "This feature is currently in open beta. We are actively improving it based on your feedback. If you encounter any issues or have suggestions, please share them on our Discord community or visit the support page.", title = "Open Beta", cta = "Contact support", href = "/support", disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="badge-alert" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

export const BitbucketBadge = ({tip = "This feature is available on Bitbucket.", title = "Bitbucket", cta, href, disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="bitbucket" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

export const AzureBadge = ({tip = "This feature is available on Azure DevOps.", title = "Azure", cta, href, disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="microsoft" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

export const GitLabBadge = ({tip = "This feature is available on GitLab.", title = "GitLab", cta, href, disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="gitlab" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

export const GitHubBadge = ({tip = "This feature is available on GitHub and GitHub Enterprise.", title = "GitHub", cta, href, disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="github" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

<GitHubBadge /> <GitLabBadge /> | <OpenBetaBadge tip="Coding Agent is in beta." />

<Info>
  Coding Agent is in beta. Availability of each starting point described here depends on your plan, platform, and organization settings.
</Info>

## Overview

Coding Agent is the part of CodeRabbit that writes code. It takes a request — typed by you, or raised by a CodeRabbit review finding, a failing check, a merge conflict, or a security finding — clones the repository into an isolated sandbox, works there, and shows you what it did. The results can be delivered as a direct commit or a stacked PR for a review.

Find it in the sidebar under **Code**, or go directly to [app.coderabbit.ai/code](https://app.coderabbit.ai/code).

<CardGroup cols={1}>
  <Card title="Start a coding task" href="/code/start-a-task" icon="play" horizontal>
    Choose a repository, write a request, and review the result before any changes reach your branch.
  </Card>
</CardGroup>

## What a coding task is

Every agent run is a **coding task**: one durable unit of work bound to an organization, a repository, and either a pull request or a branch. A task has its own page, its own address, and its own history, so you can leave it, come back to it, and share it with a teammate.

<Frame caption="Starting a new coding task by describing the outcome, choosing a repository and branch, or starting from a Linear or Jira issue">
  <img src="https://mintcdn.com/coderabbit/aowZ2ehpT4frOX_J/assets/images/coding-agent-new-task.png?fit=max&auto=format&n=aowZ2ehpT4frOX_J&q=85&s=dc1cd150b417a64bd30eb77c2d119ca1" alt="Starting a new coding task by describing the outcome, choosing a repository and branch, or starting from a Linear or Jira issue" width="1510" height="512" data-path="assets/images/coding-agent-new-task.png" />
</Frame>

A task can be started from different points. A button on a pull request, a request typed in the app, and a security finding's **Fix with AI** all create tasks and all land on the [app.coderabbit.ai/code](https://app.coderabbit.ai/code) page, so whatever started the work, you steer it, read it, and deliver it the same way.

Three properties hold for every task:

* **It works in its own sandbox.** The task gets a prepared checkout of your repository. It does not act on your working copy, and it does not touch the remote repository until delivery. What that sandbox contains is configurable — see [Coding environments](/code/environments).
* **It proposes, you decide.** By default a finished task produces a proposed patch: a diff you read, comment on, revise, reject, or accept. Delivery is a separate, explicit step.
* **It pushes with your credentials and signs its own commits.** Delivery uses your Git provider authorization, so your branch protections and permissions apply exactly as they would to a push you made yourself. The resulting commit names CodeRabbit as its author, so agent-written code stays visible in `git log`. See [Who pushes, and who wrote it](/code/deliver-changes#who-pushes-and-who-wrote-it).

Sending the same request twice does not start two tasks. CodeRabbit identifies a request by the organization, the requester, the repository, and the request itself, so a retried or double-clicked request resolves to the task that already exists.

<Frame caption="A list of coding tasks, each showing its title, repository, requester, age, and status">
  <img src="https://mintcdn.com/coderabbit/aowZ2ehpT4frOX_J/assets/images/coding-agent-task-list.png?fit=max&auto=format&n=aowZ2ehpT4frOX_J&q=85&s=3df59b0e81dd027081e2c0dcb9d89e8c" alt="A list of coding tasks, each showing its title, repository, requester, age, and status" width="1320" height="646" data-path="assets/images/coding-agent-task-list.png" />
</Frame>

## Lifecycle of a task

<Steps>
  <Step title="Start">
    A request enters from one of the starting points below. You choose whether the agent should write code directly or produce a reviewable plan first.
  </Step>

  <Step title="Work">
    The task prepares a sandbox and starts working, one **turn** at a time. A turn is a single run of the agent against one instruction; every message you send afterwards starts another one. You can watch the work, answer its questions, and steer it while it runs.
  </Step>

  <Step title="Review">
    The task produces a plan or a proposed patch. You read it, comment on specific lines, ask for a revision, reject it, or accept it.
  </Step>

  <Step title="Deliver">
    You choose how accepted changes land: as a commit on the pull request branch, or as a new branch and a stacked pull request. Until then, your repository is untouched.
  </Step>
</Steps>

Turns are also the unit of billing: a few first turns are free, and the rest draw on metered agent minutes. See [Access and billing](/code/access-and-billing).

## Where a task can start

| Starting point                                                       | Where it lives                                                                                                                 |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| The Coding Agent app                                                 | Write a request at [app.coderabbit.ai/code](https://app.coderabbit.ai/code) against any repository and branch or pull request. |
| [Autofix](/finishing-touches/autofix)                                | Turn selected CodeRabbit review findings on a pull request into one task.                                                      |
| [Finishing Touches](/finishing-touches/index)                        | Fix CI failures, add docstrings, add unit tests, simplify code, repair pre-merge checks, or run a custom recipe.               |
| [Resolve merge conflicts](/finishing-touches/resolve-merge-conflict) | Reconcile a conflicted pull request branch.                                                                                    |
| [CodeRabbit Security](/security/index)                               | Fix a security finding with **Fix with AI**.                                                                                   |
| CodeRabbit's chat                                                    | Ask for a change in chat and hand it to a coding task.                                                                         |
| [Change Stack](/pr-reviews/change-stack)                             | Collect several review findings into one task from the review panel.                                                           |
| An approved plan                                                     | Implement a reviewed and approved implementation plan.                                                                         |

See [Start a coding task](/code/start-a-task) for what each one carries into the sandbox and which providers support it.

## Code mode and Plan mode

Every task runs in one of two modes, chosen when you start it.

| Mode     | What the agent produces                                                                      |
| -------- | -------------------------------------------------------------------------------------------- |
| **Code** | Changes to the repository, delivered as a proposed patch. This is the default.               |
| **Plan** | A written, versioned implementation plan for a person to approve before any code is written. |

Plan mode puts a human approval gate in front of implementation. Once a plan is approved, the agent implements exactly what was approved. See [Review a plan](/code/work-with-a-task#review-a-plan).

## Collaboration

A task is visible to your team by default, so anyone in your organization can open it, follow its progress, and see its prompts, files, and activity. Mark a task **private** and only you can see it — including anyone who follows a direct link. Only the task's author can change this, and it can be changed back at any time.

Set this when you start a task, or switch it afterwards from the task page. See [Control who can see a task](/code/work-with-a-task#control-who-can-see-a-task).

## Names that collide

"Coding agent" means several things across this site and across the industry. Four collisions are worth knowing before you read further.

| This                                                                                                                                 | Is not this                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Coding Agent** — the CodeRabbit feature documented in this tab. Runs in CodeRabbit's cloud and delivers through your Git provider. | **your coding agent** — the tool you run yourself: Claude Code, Codex, Cursor, Devin. CodeRabbit hands work to it by giving you a prompt to paste. See [Handing off to an agent](/plan/agent-handoff). |
| **Fix with AI** in [CodeRabbit Security](/security/index) — starts a coding task.                                                    | **Fix with AI** in the [IDE extension](/ide/index) — hands the fix to your own local agent, and creates no coding task.                                                                                |
| **CodeRabbit Agent** — the [Slack and Discord product](/agent/index). No Slack or Discord action creates a coding task.              | **Coding Agent** — this feature.                                                                                                                                                                       |

## What's next

<CardGroup cols={1}>
  <Card title="Start a coding task" href="/code/start-a-task" icon="play" horizontal>
    Every way to start a task, what to write in a request, and where each starting point is available.
  </Card>

  <Card title="Work with a running task" href="/code/work-with-a-task" icon="activity" horizontal>
    Follow the work, steer it, answer its questions, and review its plan or patch.
  </Card>

  <Card title="Coding environments" href="/code/environments" icon="container" horizontal>
    Set up before you start: give your repositories a sandbox with the right toolchains and setup.
  </Card>
</CardGroup>
