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

# Fix issues

> Configure a coding agent to prepare a fix from production evidence.

Configure the coding agent Struct Agent should use to prepare fixes from investigation evidence. Select the authorized repository, execution environment and trigger policy. Review, merge and deployment remain separate steps in the team’s process.

## Inspect the current configuration

```bash theme={null}
struct build-agent settings show --json
struct build-agent repos list --json
struct build-agent repos available --json
```

Workspace admins configure the executor. Connect [GitHub](https://docs.struct.ai/integrations/github.md) and select a repository the installation can access.

## Configure the executor

```bash theme={null}
struct build-agent repos add --repo your-org/your-repo --node 24
struct build-agent settings set --provider struct --trigger manual
```

Use a supported Node version and reuse an existing repository configuration. For Cursor or Devin, save their credentials through `struct build-agent keys set cursor --stdin` or `struct build-agent keys set devin --stdin`; Devin also needs its organization ID. Never print the key. Select the provider through `struct build-agent settings set` after the credentials are present.

Use `struct build-agent scripts set REPO --pre --file setup.sh` for setup and `--post --file check.sh` for validation. Use `struct build-agent prompt set REPO --file instructions.txt` for repository instructions. Store required environment variables with `struct build-agent secrets set NAME --stdin` rather than embedding values in scripts.

Keep automatic triggers off unless requested. If the person chooses automatic fixes, inspect `struct build-agent settings set --help` for trigger and confidence options and read back the chosen configuration.

## Verify a bounded fix

Start a requested fix from its investigation or teammate conversation. Check the resulting PR, the code change and the validation it ran. Do not describe a PR as a production fix before it has been reviewed, deployed and verified.

To work on a fix yourself, [connect to Struct MCP](https://docs.struct.ai/mcp/connect.md) and read the existing investigation and its evidence before changing code.

## Provider permissions

### Cursor

A Cursor API key: a user or service-account API key that can start and follow up on Cloud Agents

#### Build agent

Hand fixes to Cursor Cloud Agents on your team plan.

| Scope | Used for |
| - | - |
| `Cloud Agents` | a user or service-account API key that can start and follow up on Cloud Agents |

Permission catalog version `2026-11-04.1`. See [permission changes](https://docs.struct.ai/reference/permission-changes.md).

### Devin

A Devin service user API key and your organization ID: a service user key (cog\_…) whose role can create, read and message sessions in your organization

#### Build agent

Hand fixes to Devin sessions in your organization.

| Scope | Used for |
| - | - |
| `Sessions` | a service user key (cog\_…) whose role can create, read and message sessions in your organization |

Permission catalog version `2026-11-04.1`. See [permission changes](https://docs.struct.ai/reference/permission-changes.md).


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