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

# Claude Agent

> Connect Claude Agent so Sazabi can hand issue fixes to it and follow the result in the issue thread.

## Supported capabilities

Core integration

* **Core integration**: [Claude Agent](https://docs.sazabi.com/catalogs/integrations/claude.md#core-integration) — Connect Claude Agent so Sazabi can hand issue fixes to it and follow the result in the issue thread.

Each connection method has its own setup and permissions. Connecting one method does not enable the others.

## Core integration

## About

Connecting Claude Agent lets Sazabi hand an issue's fix to Claude Agent. You choose **Fix** on an issue, Claude Agent works in your repository and opens a pull request, and Sazabi follows its progress in the issue thread. Claude Agent is a **coding agent** integration: one of the agents listed under [**Settings > Integrations**](https://app.sazabi.com/settings/integrations) that Fix can hand off to.

## Prerequisites

* An Anthropic API key, or a Claude subscription.
* Organization admin access in Sazabi.
* Repository access for Claude Agent: Install [Sazabi's GitHub App](https://docs.sazabi.com/catalogs/integrations/github.md) on the repositories your projects use. Claude Agent reaches repositories through that installation.

## Set up in the dashboard

**Step 1**

### Get your credentials

Create an **Anthropic API key** from the [Anthropic Console](https://console.anthropic.com), or a Claude subscription sign-in. Use an API key for automation: subscription usage counts against the connected person's Claude plan and its rate limits.

**Step 2**

### Open the Claude Agent integration

In the dashboard, go to [**Settings > Integrations**](https://app.sazabi.com/settings/integrations) and open **Claude Agent**.

**Step 3**

### Connect your account

Choose **Connect**. Paste the Anthropic API key, or choose **Sign in with Claude** to connect a Claude subscription.

**Step 4**

### Check repository access

The connection page's **Repositories** section shows which repositories Fix can hand to Claude Agent. **Default coding agent** is set per project, so it appears only when you open the connection from a project's settings: open the project, go to its **Integrations** settings, select Claude Agent, and choose **Use this account**. Fix then hands off to it without asking.

## Set up with the CLI

You can also connect Claude Agent with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) (installed and authenticated; see [CLI reference](https://docs.sazabi.com/reference/cli/integrations.md)).

Claude Agent connects with an Anthropic API key or a Claude subscription. Pass the API key as the `apiKey` credential, reading it from an environment variable rather than pasting it inline:

```bash theme={"system"}
export ANTHROPIC_API_KEY=...   # your Anthropic API key
sazabi integrations connect claude \
  --credentials "{\"apiKey\":\"$ANTHROPIC_API_KEY\"}"
```

To connect a Claude subscription instead, run the command below. It runs `claude setup-token` on your machine, so the Claude Code CLI must be installed and on your `PATH`:

```bash theme={"system"}
sazabi integrations claude connect
```

Run `sazabi integrations list` to confirm the connection, or `sazabi integrations providers --json` to see each provider's credential fields.

## Fix issues

Open an issue in the project inbox, choose **Fix**, and pick Claude Agent. Confirm the repository, and the base branch if asked, then choose **Fix with Claude Agent**. Claude Agent works in the repository and opens a pull request; its progress, questions, and pull request appear in the issue thread.

From the CLI, hand the fix off and follow the attempt with `sazabi agent-dispatches` (see [CLI reference](https://docs.sazabi.com/reference/cli/agent-dispatches.md)):

```bash theme={"system"}
sazabi issues fix "$ISSUE_ID" --agent claude
sazabi agent-dispatches list --issue-id "$ISSUE_ID"
```

`sazabi agent-dispatches reply` answers a question from the agent, and `sazabi agent-dispatches cancel` stops the attempt.

## Verify

Choose **Fix** on an open test issue and hand it to Claude Agent. Confirm the attempt appears in the issue thread within a minute, and that `sazabi agent-dispatches list --issue-id "$ISSUE_ID"` lists it with Claude Agent as the agent.

## Troubleshooting

**Claude Agent did not accept this key** - The key is wrong, revoked, or from the wrong account. Create a new one and reconnect.

**Claude Agent can't reach any repositories yet** - Install [Sazabi's GitHub App](https://docs.sazabi.com/catalogs/integrations/github.md) on the repositories your projects use. Claude Agent reaches repositories through that installation.

**Fix doesn't offer Claude Agent** - Confirm the connection shows connected under [**Settings > Integrations**](https://app.sazabi.com/settings/integrations), and that the issue's project has a repository Claude Agent can reach.

## Further reading

> [card] [Issues](https://docs.sazabi.com/guides/detect/issues.md)
>
> Open, investigate, and resolve issues.

> [card] [Integrations](https://docs.sazabi.com/catalogs/integrations.md)
>
> Browse the core integrations.

> [card] [Claude Agent SDK](https://docs.sazabi.com/catalogs/log-sources/coding-agents/claude-agent-sdk.md)
>
> Send Claude Agent session telemetry to Sazabi.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.