> ## Documentation Index
> Fetch the complete documentation index at: https://cortex-foundation-add13747-droid-2a5c5e50-docs-ferndesk-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cortex Code

> A coding agent that works inside your repository on an isolated runtime — sessions, Ask / Plan / Agent, GitHub, Cloud guests, and review.

Cortex Code is a coding agent, not a chat with a different icon. You point it at a repository, describe the change, and it works through the task inside an isolated runtime — reading, editing, running your build and tests — while you watch a timeline of what it did and decide how much it may do on its own.

It is available in the web app, the desktop app, and the CLI, with one account across all three.

<Frame caption="The four commitments on the public Code page: one repository per runtime, reviews that stay failed when they fail, no pasted diff, the same account as Chat.">
  <img src="https://mintcdn.com/cortex-foundation-add13747-droid-2a5c5e50-docs-ferndesk-pro/MqnMpE_oEu2JSRan/images/product/code-public-features.png?fit=max&auto=format&n=MqnMpE_oEu2JSRan&q=85&s=6a7dfb854662c108e3821f3bf61de5f9" alt="Cortex Code feature grid — One repository per runtime, Reviews that stay failed when they fail, No pasted diff, The same account as Chat" width="1280" height="800" data-path="images/product/code-public-features.png" />
</Frame>

## What Code is

| Commitment                             | What it means for you                                                                                                                                          |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **One repository per runtime**         | Each session gets an isolated guest on the same farm as Cortex Bot, without a desktop. The environment is installed by the agent, not guessed from a filename. |
| **Reviews stay failed when they fail** | A Cortex Security review is one pass over a diff. A failed review is stored as failed — never rewritten as an approval.                                        |
| **No pasted diff**                     | Code writes the change in the repository; Cortex Security reads the pull request in place. Neither asks you to paste a patch into a box.                       |
| **The same account as Chat**           | Sign in on cortex.foundation. No second identity.                                                                                                              |

## Who can open it

Code is a member surface. A guest visiting `/code` sees the public product page, and deep links show **This space is reserved** with **Continue in Chat** or **Sign in**. Once signed in, `/code` opens Code Home: connect GitHub, pick a repository, start a session. See [Accounts](/getting-started/accounts).

<Frame caption="cortex.foundation/code — the public product page a guest sees. Sign in to open the working UI.">
  <img src="https://mintcdn.com/cortex-foundation-add13747-droid-2a5c5e50-docs-ferndesk-pro/MqnMpE_oEu2JSRan/images/product/code-public.png?fit=max&auto=format&n=MqnMpE_oEu2JSRan&q=85&s=e767529b33ab35e78bba1a1c33b98ace" alt="Cortex Code public page — a coding agent that works inside the repository" width="1280" height="800" data-path="images/product/code-public.png" />
</Frame>

## Start here

<CardGroup cols={3}>
  <Card title="Quickstart" img="https://mintcdn.com/cortex-foundation-add13747-droid-2a5c5e50-docs-ferndesk-pro/MqnMpE_oEu2JSRan/images/banners/code.png?fit=max&auto=format&n=MqnMpE_oEu2JSRan&q=85&s=094a8e38779955fbe5947f64240f9cf2" href="/code/quickstart" width="1280" height="853" data-path="images/banners/code.png">
    Sign in, connect GitHub, start a Cloud session, review the timeline.
  </Card>

  <Card title="Sessions" icon="list" href="/code/sessions">
    A timeline of the work — files read, edits, commands, plans.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli">
    The same Code sessions from your terminal, scripts, and CI.
  </Card>
</CardGroup>

## Where it runs

| Surface     | Host                                        | Notes                             |
| ----------- | ------------------------------------------- | --------------------------------- |
| Web app     | **Cloud**                                   | Web Code is Cloud-only            |
| Desktop app | Cloud, **This PC**, **SSH**                 | [Code on desktop](/code/desktop)  |
| CLI         | Cloud by default; This PC and SSH by opt-in | [Code in the terminal](/code/cli) |

## Modes in one line

**Ask** reads and explains. **Plan** proposes without changing anything. **Agent** edits files and runs commands. Pick per turn; the session row holds the default. See [Ask, Plan, Agent](/code/interactions).

## Core guides

<CardGroup cols={2}>
  <Card title="Sessions" icon="list" href="/code/sessions">
    A session is a timeline of the work — files read, edits, commands, plans — with Stop always one click away.
  </Card>

  <Card title="Ask, Plan, Agent" icon="sliders-horizontal" href="/code/interactions">
    Choose how much a turn may change. Ask reads, Plan proposes, Agent edits and runs.
  </Card>

  <Card title="Connect GitHub" icon="github" href="/code/github">
    Reach repositories through Connect GitHub. No pasted tokens; Reconnect when a grant lapses.
  </Card>

  <Card title="Cloud runtimes" icon="cloud" href="/code/cloud">
    One isolated guest per session on the same farm as Bot, prepared by the agent.
  </Card>
</CardGroup>

## Desktop and terminal

<CardGroup cols={2}>
  <Card title="Code on desktop" icon="monitor" href="/code/desktop">
    This PC and SSH hosts exist on the desktop app and the CLI. The browser stays Cloud-only.
  </Card>

  <Card title="Code in the terminal" icon="square-terminal" href="/code/cli">
    How the CLI maps onto Code sessions, and where the full CLI documentation lives.
  </Card>
</CardGroup>

## What Code is not

| Not this                    | Use instead                                                                                              |
| --------------------------- | -------------------------------------------------------------------------------------------------------- |
| A Chat transcript           | A [session](/code/sessions) is a turn timeline — files read, edits, commands, plans                      |
| Chat's Python sandbox       | [Cloud runtimes](/code/cloud) — an isolated guest with your repository                                   |
| A Chat plugin               | [Connect GitHub](/code/github) — the repository connection lives in Code                                 |
| The public `/security` page | [Cortex Security](/code/security) — the signed-in review inbox at `/code/security`                       |
| A place to store secrets    | There is no Secrets page. Environment for a guest belongs to that guest; `/code/secrets` sends you home. |

## Advanced

* [Cortex Security](/code/security) — GitHub App pull-request review that stays failed when it fails.
* [How Code works](/code/how-it-works) — workspace tools execute inside the attached guest; modes withhold mutating tools.
* [Code troubleshooting](/code/troubleshooting) — gates, Reconnect, Cloud availability, and what a failed review means.
* [Security and privacy](/security/overview) — what Cortex stores and where code runs.

## Next

1. [Code quickstart](/code/quickstart) — sign in, connect GitHub, start a Cloud session.
2. [Sessions](/code/sessions) — read the timeline.
3. [Ask, Plan, Agent](/code/interactions) — decide how much a turn may change.
4. [Code in the terminal](/code/cli) — the same sessions from the CLI.
