Skip to main content
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:
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:
Add the provider to ~/.t3/userdata/settings.json:
  • 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.
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, 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.
The ACP Registry entry is pending. Until it is listed, add the provider with the settings above.