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

# Code Runs

> Run Claude Code on tickets in Anthropic-hosted containers

<div className="img-showcase">
  <div className="cr-home-composer-doc cr-home-composer-doc--demo">
    <div className="cr-home-composer-doc-toolbar">
      <div className="cr-home-composer-doc-badge">
        <span className="cr-home-composer-doc-badge-inner">
          <span className="cr-home-composer-doc-issue-icon cr-home-composer-doc-issue-icon--bug" aria-hidden>
            <svg width={11} height={11} viewBox="0 0 24 24" aria-hidden>
              <path fill="currentColor" d="M12 2C9.24 2 7 4.24 7 7h10c0-2.76-2.24-5-5-5zM5 9v2h2v2H5v2h2c0 2.76 2.24 5 5 5s5-2.24 5-5h2v-2h-2v-2h2V9H5zm7 10c-1.66 0-3-1.34-3-3v-4h6v4c0 1.66-1.34 3-3 3z" />
            </svg>
          </span>

          <span className="cr-home-composer-doc-badge-label">ACME-42</span>
        </span>
      </div>

      <div className="cr-home-composer-doc-badge cr-home-composer-doc-badge--repo">
        <span className="cr-home-composer-doc-badge-inner">
          <span className="cr-home-composer-doc-gh-avatar" aria-hidden>
            <img src="https://mintcdn.com/janetai-2e23a3d0/AicC1Vk0hC-6wzlT/github-logo.svg?fit=max&auto=format&n=AicC1Vk0hC-6wzlT&q=85&s=454d39a86e0263172ecb0c1ffec4fb36" alt="" width={9} height={9} data-path="github-logo.svg" />
          </span>

          <span className="cr-home-composer-doc-badge-label">acme-backend</span>
        </span>

        <span className="cr-home-composer-doc-branch" aria-hidden>
          {/* lucide-react GitBranch — same as ComposerBranchBadge */}

          <svg width={11} height={11} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2.25} strokeLinecap="round" strokeLinejoin="round" aria-hidden>
            <path d="M6 3v12" />

            <path d="M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />

            <path d="M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />

            <path d="M18 9a9 9 0 0 1-9 9" />
          </svg>

          <span>main</span>
        </span>
      </div>
    </div>

    <div className="cr-home-composer-doc-textarea cr-home-composer-doc-textarea--filled">
      <p className="cr-home-composer-doc-prompt">Add retry logic to the webhook handler and cover the 429 path in tests.</p>
    </div>

    <div className="cr-home-composer-doc-footer">
      <div className="cr-home-composer-doc-footer-left">
        <span className="cr-home-composer-doc-trigger">
          <span>Edits</span>

          <svg className="cr-home-composer-doc-chevron" width={10} height={10} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2.5} aria-hidden>
            <polyline points="6 9 12 15 18 9" />
          </svg>
        </span>

        <span className="cr-home-composer-doc-trigger">
          <img src="https://mintcdn.com/janetai-2e23a3d0/AicC1Vk0hC-6wzlT/claude-color.svg?fit=max&auto=format&n=AicC1Vk0hC-6wzlT&q=85&s=077bcf2f04fc35ef60cbc84349374fb5" alt="" width={12} height={12} data-path="claude-color.svg" />

          <span>Sonnet 4.6</span>

          <svg className="cr-home-composer-doc-chevron" width={10} height={10} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2.5} aria-hidden>
            <polyline points="6 9 12 15 18 9" />
          </svg>
        </span>
      </div>

      <span className="cr-home-composer-doc-send" aria-hidden>
        <svg width={16} height={16} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2.5} strokeLinecap="round" strokeLinejoin="round" aria-hidden>
          <path d="M12 19V5M5 12l7-7 7 7" />
        </svg>
      </span>
    </div>
  </div>
</div>

**Code Runs** send tickets to **Claude Code** inside [Anthropic Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) cloud containers. Each ticket gets a **conversation** at `/code-runs/{ticketKey}` where you stream turns, review plans, accept edits, and open **draft pull requests** on connected GitHub repos.

One ticket maps to one org-wide chat thread. Repos you select are cloned into a **shared workspace** (up to six per run) so Claude can work across them; when you use **Edits** with **Auto open draft PR** enabled, Janet opens draft PRs via the **GitHub App** for repos that have changes.

## Prerequisite

* **GitHub:** Connect the GitHub App, enable repositories for your organization, and link repos to projects when you want them pre-selected. See [GitHub integration](/integrations/github).

## Start a code run

Submit from any of these entry points; Janet stashes your repo, model, mode, and instructions, then opens the ticket conversation.

| Entry point             | What happens                                                                                                        |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Code Runs** (sidebar) | Home composer — pick or create a ticket, configure repos and mode, submit. Subtitle: *Send tickets to Claude Code*. |
| **Ticket details**      | **Create PR** in the Code Runs section opens **Quick Input** in code-run mode (same composer).                      |
| **Edit ticket modal**   | Footer **Send to Claude Code** opens Quick Input in code-run mode (Kanban: right-click a card → edit).              |

Use **New Code Run** in the Code Runs sidebar (**⇧N**) to return to the home composer.

## Composer options

The composer appears on the Code Runs home page, in Quick Input code-run mode, and when starting from a ticket. On the home page it uses the same large rounded **chat-style** input as Janet Chat: **Add ticket** and **Add repos** pills on top, instructions in the middle, and **Edits** / model controls plus a send arrow in the footer.

* **Ticket:** On the home page, use the dashed **Add ticket** pill (or create a ticket from the picker). When you start from a ticket surface, the ticket is already set.
* **Repositories:** **Add repos** to choose one or more targets and set each **branch** (draft PR base). Repos linked to the ticket’s project are pre-selected when possible. At most **six** repositories per run.
* **Model:** **Sonnet 4.6** (default) or **Opus 4.8**. Your default can be set under **Account → AI settings** (coding model).
* **Mode:**
  * **Ask** — Read-only Q\&A about the code; no edits and no plan artifact.
  * **Edits** — Claude may change files in the container. Open the mode menu to toggle **Auto open draft PR** (off by default). When enabled, Janet opens draft PR(s) after a successful implement turn when there are changes.
  * **Plan** — Exploration and a written implementation plan only; plan turns do not edit repos or open PRs.
* **Instructions:** Optional text up to **8000** characters. Before you pick a ticket, the field shows *Add additional instructions...*; after a ticket is selected, *Add instructions for Claude Code (optional)*.

## Run statuses

| Status          | Meaning                                                                                                                     |
| --------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Queued**      | Turn accepted, waiting to start (legacy rows).                                                                              |
| **Running**     | Claude is actively working.                                                                                                 |
| **Needs input** | Waiting for your answer in the chat.                                                                                        |
| **Failed**      | Turn or setup failed; error details appear in the thread. Retry from **Create PR** / **Send to Claude Code** on the ticket. |
| **PR opened**   | A draft PR link is available.                                                                                               |
| **Idle**        | Last turn finished with no PR; the session stays open for more messages.                                                    |
