> ## Documentation Index
> Fetch the complete documentation index at: https://ara-90a60a07.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Build an ACP editor

> Add Reason to an Agent Client Protocol app such as T3 Code. One provider runs a thread on your Mac and on a Reason cloud computer.

This recipe makes an Agent Client Protocol app run Reason. One thread can run `pwd` on your Mac and on a Reason cloud computer. The steps are generic for any ACP client, and the T3 Code example shows where each value goes.

## What you will have

* An ACP app with one **Reason** provider.
* A thread that runs `pwd` on this Mac and on a Reason cloud computer, with both results in the reply.
* That thread visible in the Reason app, and continuable with `reason send`.

## Prerequisites

Run these in a terminal:

```bash theme={null}
curl -fsSL https://reasonmachines.com/install.sh | bash
reason login --pair CODE     # CODE from Settings > Network; picks the Workspace
reason whoami                # must name the Workspace the app should use
reason connect               # this computer runs Sessions that use it
reason acp --help            # confirms the installed reason acp
```

`reason whoami` must name the intended Workspace. `reason login --pair CODE` chooses it. Use plain `reason login` to pick one in the browser.

For cloud work on a project's repository, install the Reason GitHub App on that repository. Without it, a cloud Session has no checkout of that repository.

## Configure the provider (T3 Code example)

Find the absolute path to `reason`, because a Finder-launched app gets a bare `PATH`, and T3 starts the agent without a shell:

```bash theme={null}
command -v reason
```

Add the provider to `~/.t3/userdata/settings.json`:

```json theme={null}
{
  "providerInstances": {
    "reason": {
      "driver": "acpRegistry",
      "displayName": "Reason",
      "config": {
        "source": "local",
        "commandPath": "/absolute/path/to/reason",
        "commandArgs": ["--workspace", "your-workspace-slug", "acp", "-y"]
      }
    }
  }
}
```

* `commandPath` is the absolute path from `command -v reason`.
* `commandArgs` is hidden in T3's settings screen. It is `--workspace SLUG acp -y`: `--workspace` names the Workspace slug (check it with `reason whoami`), and `-y` accepts the defaults so a thread does not stop to ask.
* The `REASON_WORKSPACE` environment variable does the same job. It arrives in the next CLI release; until then, use the `--workspace` argument above.

Use **one** provider. Do not add a separate provider for the local Mac and another for the cloud: a single Reason provider runs a thread on either, chosen by the Session's target.

## Verify

1. Start one thread and send: **Run pwd on this Mac and on a Reason cloud computer. Report both results.**
2. The reply shows two paths: one from this Mac, one from a cloud computer.
3. The Session appears in the Reason app.
4. Continue it from a terminal: `reason send SESSION_ID "Run whoami."` The reply appears in the thread after you reopen it.

> [!WARNING]
>
> Done means one thread returns `pwd` from this computer AND from a Reason cloud computer. A local-only test is not done.

If the thread shows only one result, the cloud computer did not start. Check that the GitHub App is installed when the cloud Session names a repository, then send the message again.

## Optional: your own fork identity

A fork of T3 Code can ship under its own name without colliding with the original app. Give it its own:

* bundle identifier,
* data directory,
* Electron profile,
* and no update feed, so it never installs the upstream build over itself.

## Reference fork

A working fork with the Reason provider wired in:

* Repository: [svemyh/t3code](https://github.com/svemyh/t3code), branch `reason-provider`.
* The Reason-specific code is in `seedReasonInstances` in `apps/server/src/provider/ProviderInstanceRegistryHydration.ts`. Everything else is upstream T3 Code.

## ACP Registry

When Reason is listed in the ACP Registry, choose **Reason** as the first option in the registry picker.

> [!NOTE]
>
> The ACP Registry entry is pending. Until it is listed, add the provider with the settings above.


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