> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.asi1.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.asi1.ai/_mcp/server.

# Set Up ASI:One in T3 Code

> Run asi1-ultra in T3 Code through its OpenCode or Codex provider, alongside your existing setup.

## Overview

[T3 Code](https://t3.codes/) is a desktop and web app for driving the coding agents
installed on your machine. It doesn't talk to ASI:One directly. It runs ASI:One
through an agent you've already set up, either **OpenCode** or the **Codex CLI**.
Pick the one you use:

|                        | OpenCode                                                | Codex CLI                                             |
| ---------------------- | ------------------------------------------------------- | ----------------------------------------------------- |
| Set up first           | [OpenCode with ASI:One](/documentation/coding/opencode) | [Codex with ASI:One](/documentation/coding/codex)     |
| Extra setup in T3 Code | None. Models come from your OpenCode config.            | A separate Codex home, plus the models added by hand. |

## Prerequisites

* T3 Code installed.
* An ASI:One plan that includes `asi1-ultra`. The same key also works for `asi1`
  and `asi1-mini`.
* OpenCode or the Codex CLI set up with ASI:One, as described in the section for
  that agent below.

## With OpenCode

T3 Code starts its own OpenCode server and lists whatever models OpenCode knows
about, so the ASI:One provider from your OpenCode setup carries over.

### Set up OpenCode

1. Follow [Set Up ASI:One in OpenCode](/documentation/coding/opencode) through
   **Verify**. T3 Code needs OpenCode 1.14.19 or newer.
2. Put the `asi` provider in `~/.config/opencode/opencode.json`, not a project's
   `opencode.json`. T3 Code threads run in many folders, and the global config
   makes ASI:One available in all of them.

### Enable the provider

1. Open **Settings → Providers** and turn on **OpenCode**. Leave **Server URL**
   empty so T3 Code starts OpenCode for you.
2. Click **Refresh provider status**.

### Run it

Start a thread, pick the OpenCode provider, and choose **ASI1 Ultra**. The model
names are the `name` values from your `opencode.json`.

> **Info**
>
> T3 Code caches OpenCode's config while its OpenCode server is running. After
> editing `opencode.json`, wait about 30 seconds without refreshing, then click
> **Refresh provider status** so the change is picked up.

## With the Codex CLI

This path needs macOS or Linux, like the Codex setup it builds on.

Follow [Set Up ASI:One in Codex](/documentation/coding/codex) through **Run it**,
and confirm `codex exec -p asi -m asi1-mini "Reply with exactly: pong"` replies.

### Create the Codex home

We need to give it a separate Codex home to use ASI:One, built
from the profile you already made:

```bash
mkdir -p ~/.codex-asi && chmod 700 ~/.codex-asi
cp ~/.codex/asi.config.toml ~/.codex-asi/config.toml
```

T3 Code won't start Codex unless it reports a login. Log the new home in with the
same key. This reads the key out of the config file, so it never lands in your
shell history:

```bash
grep '^args = ' ~/.codex-asi/config.toml \
  | cut -d'"' -f2 \
  | CODEX_HOME="$HOME/.codex-asi" codex login --with-api-key
```

Then confirm it prints `Logged in using an API key`:

```bash
CODEX_HOME="$HOME/.codex-asi" codex login status
```

> **Info**
>
> Use `$HOME`, not `~`, inside `CODEX_HOME=...`. The tilde isn't expanded there,
> and Codex reports that the folder doesn't exist.

### Add the provider

1. Open **Settings → Providers** and add a **Codex** instance. Name it, for
   example, "Codex ASI".
2. Set **CODEX_HOME path** to `~/.codex-asi`. If T3 Code doesn't accept `~`, use
   the full path. Leave **Shadow home** empty.
3. Save, then click **Refresh provider status**.

### Add the models

T3 Code's picker lists OpenAI models only and doesn't read the default model from
`config.toml`, so add the ASI:One models by hand.

1. Still in the "Codex ASI" instance, scroll to **Models** and click **+ Add
   custom model**.
2. Enter `asi1-ultra`.
3. Repeat for `asi1` and `asi1-mini` if you want them in the picker too.
4. Make sure each one's toggle is on.

### Run it

Start a thread, pick the "Codex ASI" instance, and choose `asi1-ultra`.

Keep your regular Codex instance for OpenAI models. Threads in the ASI instance
don't show up in your normal Codex history.

## Troubleshooting

### OpenCode

| Symptom                                       | Cause and fix                                                                                                                                                                                                    |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No ASI:One models in the picker               | The `asi` provider is in a project `opencode.json` instead of `~/.config/opencode/opencode.json`, or T3 Code is still using its cached config. Move it, wait 30 seconds, then click **Refresh provider status**. |
| The provider reports a version error          | OpenCode is older than 1.14.19. Upgrade it, then refresh.                                                                                                                                                        |
| `Error: failed to authenticate user` or `401` | The key in OpenCode's `auth.json` is missing or wrong. Re-run the credential step from the [OpenCode setup](/documentation/coding/opencode#store-the-api-key).                                                   |

### Codex CLI

| Symptom                                                     | Cause and fix                                                                                                                                                  |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The instance reports it isn't logged in                     | Re-run the login step, then click **Refresh provider status**.                                                                                                 |
| `404` model not found                                       | An OpenAI model was picked in the ASI instance, or a custom model name is misspelled. Use `asi1`, `asi1-ultra` or `asi1-mini`.                                 |
| `400 web_search tool does not support: external_web_access` | `~/.codex-asi/config.toml` doesn't match the Codex profile. Copy `~/.codex/asi.config.toml` over it again.                                                     |
| `401`                                                       | The key is wrong or has been revoked. Create a new one at [asi1.ai/developer](https://asi1.ai/developer), update both config files, and re-run the login step. |

T3 Code runs the same agentic harness underneath, so anything else is covered in the
troubleshooting for [OpenCode](/documentation/coding/opencode#troubleshooting) or
[Codex](/documentation/coding/codex#troubleshooting).

## Next steps

1. **[OpenCode](/documentation/coding/opencode)**: the same models in OpenCode
2. **[Codex](/documentation/coding/codex)**: the same models in the Codex CLI
3. **[Zed](/documentation/coding/zed)**: the same models in the Zed editor
4. **[ASI:One Models](/documentation/models)**: choosing between `asi1`, `asi1-ultra` and `asi1-mini`