Example: T3 Code inbox
Bots write coding requests into a record app. You read each request, pick a T3 Code project and start it there yourself. Nothing reaches T3 Code until you choose to start it.
This example uses the same parts as any plugin: two record apps and a skill. The connection to T3 Code is not part of the plugin. It runs on your computer, in the desktop app or a command-line companion, after you approve it.
What you'll learn
- How several app parts and a skill split a job between bots and people.
- Why a part a bot should never write stays ungranted.
- How retries stay safe when a local program writes records through the registry API.
Requirements
- A Superbot server where the T3 Code inbox is in Discover. A server publishes the bundled inbox, slug
t3-code-inbox, unless another publisher already holds that slug. - T3 Code on your computer or reachable over HTTPS, with its MCP address from Use T3 Code in another app (MCP).
- For the desktop path, the Superbot desktop app. For the terminal path, a Superbot checkout with Node.js and the workspace dependencies installed.
The manifest
The repository keeps it in examples/plugins/t3-coding/manifest.json. It is the same manifest the server publishes.
| Part | Kind | Fields or content | Who uses it |
|---|---|---|---|
requests | app | title, brief (text, required) | Bots propose; people read and add |
dispatches | app | request-id, thread-id, run-id, thread-link, status (text, required) | Receipts written for the operator. Keep it ungranted |
request-guide | skill | How to write a short title and a self-contained brief, with no credentials | Bots |
Step 1: Install and grant
- In Store → Plugins → Discover, install T3 Code inbox in the Space where bots should propose work.
- On its page, grant Requests and Request guide to each bot that proposes requests. Leave Dispatches off for every bot, so only you write receipts.
- Ask the bot to propose a coding request. Check the title and brief on the approval card and choose Allow once. You can also add a request yourself in the Requests app.
Step 2: Start a request from the desktop app
- Open Store → Plugins → Installed → T3 Code inbox.
- Paste T3's MCP address and choose Connect T3. It must be an
https://address ending in/mcp, orhttp://127.0.0.1:PORT/mcpon this computer. In the T3 page that opens, check that the client is Superbot T3 Code inbox and that the callback is on127.0.0.1, choose Supervised and approve. - Under Start in, choose the T3 project. Open a request to read its full brief, choose Start in T3, check the project and choose Start.
- The request shows Started. Use Open in T3 to follow the thread and answer its approvals in T3 Code.
T3 Code runs the thread in Supervised mode with the project's default model and workspace settings. Only the request's title and brief are sent. The T3 token stays in your system credential store, and Disconnect removes it from this computer.
The special view opens only for the bundled inbox, version superbot-t3-code-inbox-v1. A plugin you publish with the same name or slug opens as an ordinary record app and can't reach T3 Code.
Step 2, in a terminal instead
The companion in examples/plugins/t3-coding does the same from a Superbot checkout. Sign in to T3 once, then list, add and dispatch requests. Use your real addresses; the ones below are placeholders.
$inbox = 'examples/plugins/t3-coding/companion.mjs'
node $inbox login --t3 'http://127.0.0.1:3773/mcp'
node $inbox projects
$account = @('--server', 'https://superbot.example.com', '--email', 'operator@example.com')
node $inbox spaces @account
node $inbox installations @account --space SPACE_ID
$scope = @($account + @('--space', 'SPACE_ID', '--installation', 'INSTALL_ID'))
node $inbox list @scope
node $inbox dispatch @scope --record REQUEST_ID --project PROJECT_ID
node $inbox receipts @scope
The companion asks for your Superbot password and signs out when it exits. Add --email-code on a server that sends sign-in codes. Each dispatch is one approval by you. The companion is a one-shot command: it never dispatches in the background and offers no remote service.
Retries and receipts
- Each start uses one T3 request ID, saved before T3 is called. If T3's reply is lost, start the same request again with the same connection and project. T3 returns the original thread instead of starting a second one.
- A retry with another project, a changed brief or a different T3 connection is refused. Check T3 Code before doing anything else.
- If T3 started the thread but the receipt couldn't be saved, the desktop offers Save receipt and the companion keeps the receipt locally until it can write it. Neither calls T3 again.
When something fails
| Message | What it means | What to do |
|---|---|---|
| Couldn't reach T3 | T3 Code isn't running, or the address is wrong. | Start T3 Code and copy the MCP address again. |
| This address didn't ask for a T3 sign-in | The address isn't T3's MCP endpoint, or T3 Code needs an update. | Use the address from T3's MCP settings. |
| T3 no longer accepts this connection | The grant expired or was revoked. | Disconnect, then connect again. |
| T3 couldn't do t3_thread_launch | T3 rejected the start, for example because the project is gone. | Check the project in T3 Code. |
| T3 didn't answer | The reply was lost. | Start the request again. It reuses the same request ID. |
Test it locally
The companion's tests run Superbot and T3 fixtures on fresh loopback ports with synthetic data and tokens:
node --test examples/plugins/t3-coding/companion.test.mjs
They check newest-first paging, account isolation, explicit record approval, the exact Supervised launch arguments, a lost reply and recovery from a failed receipt write.
Next steps
- People, bots and permissions: why
dispatchesstays ungranted. - Registry API: the record procedures the companion calls.