DEV Community

Cover image for One Open Source Project a Day (No. 170): T3 Code — A Unified Control Surface for AI Coding Agents
WonderLab
WonderLab

Posted on

One Open Source Project a Day (No. 170): T3 Code — A Unified Control Surface for AI Coding Agents

Introduction

"If we ever go the wrong direction, we want you to have everything you need to fork."

This is the 170th article in the "One Open Source Project a Day" series. Today's project is T3 Code.

Picture your typical AI coding workflow: Claude Code is running in a terminal, Codex is open in another tab, and your phone is completely useless. Want to check progress from the couch? Open the laptop, SSH into the server, launch the right agent — five minutes of overhead just to take a look.

T3 Code solves that problem: a unified control plane for all your AI coding agents, accessible from phone, browser, or desktop app. The agents still run on your own machine, with your own subscriptions; T3 Code handles only the control surface.

21.4k Stars, MIT license, built by the team behind the T3 Stack.

What You Will Learn

  • The Driver + Adapter architectural pattern powering T3 Code
  • How three queued worker threads decouple the control layer from agent execution
  • The branch-per-thread workflow and automatic PR generation pipeline
  • How T3 Connect Relay enables cross-network remote access
  • Connecting all five supported AI coding agents

Prerequisites

  • Hands-on experience with at least one AI coding tool (Claude Code, Cursor, Codex, etc.)
  • Familiarity with basic Git workflows
  • TypeScript fundamentals (comfortable reading interface definitions)

Project Background

What It Is

T3 Code positions itself as a "control plane for coding agents".

That framing matters — this is not another AI coding tool. It is a control layer for the AI coding tools you already use. You have your Claude Code subscription, your Codex setup already configured. T3 Code adds a unified interface on top, making those agents controllable from any device.

Three core commitments from the team:

  • Bring Your Own Subscription: no API token resale, no quota caps — you use your own subscriptions
  • Multi-platform control: iOS, Android, Web, and Electron desktop — all are first-class control interfaces
  • Fully forkable: MIT license, fully open source — "if we ever go the wrong direction, we want you to have everything you need"

Author / Team

  • Team: Ping (pingdotgg) — creators of the T3 Stack
  • T3 Stack: The Next.js full-stack architecture (tRPC + Prisma + Tailwind + NextAuth) popularized by Theo Browne, one of the most widely used TypeScript full-stack setups today
  • Website: t3.codes
  • Origin: The team was inspired by Codex desktop, Conductor, and Cursor Glass but found none met their standards for performance and openness — so they built their own

Project Stats

  • ⭐ GitHub Stars: 21,400+
  • 🍴 Forks: 5,200+
  • 📄 License: MIT
  • 💻 Primary Language: TypeScript
  • 🌐 Website: t3.codes
  • 📦 Install: npx t3@latest

Core Features

What Problem It Solves

T3 Code inserts an independent control layer between the developer and their AI coding agents:

Developer device (phone / browser / desktop app)
    ↓ RPC over WebSocket / T3 Connect Relay
T3 Code control plane
    ↓ Driver + Adapter protocol
┌─────────────┬──────────┬──────────┬──────────┬──────────┐
│ Claude Code │  Codex   │ OpenCode │  Cursor  │   Grok   │
└─────────────┴──────────┴──────────┴──────────┴──────────┘
    ↑ Agents execute locally, using your own subscriptions
Enter fullscreen mode Exit fullscreen mode

Five supported agents (called "Harnesses" in official terminology):

  • Claude Codeclaude auth login
  • Codex CLIcodex login
  • OpenCodeopencode auth
  • Cursorcursor-agent
  • Grok CLIgrok login

Usage Scenarios

  1. Mobile monitoring of long-running agent tasks

    • Start a large Claude Code task, step away, check progress from your phone, approve tool calls as they come in — no need to stay at the computer.
  2. Multi-agent parallel management

    • Switch between agents from one interface. Each thread is independently managed; they do not interfere with each other.
  3. Standardized PR workflow

    • When the agent finishes, create a PR from the current thread's branch in one click. Title and description are auto-generated from commit history, respecting project conventions in AGENTS.md.
  4. Team code review

    • Check out a teammate's branch directly in T3 Code, inline-edit PR descriptions and comments in Markdown. Supports GitHub, GitLab, and Bitbucket.
  5. Cross-network remote development

    • T3 Connect Relay connects to a home dev machine from an office network without configuring VPN or port forwarding.

Quick Start

Zero-install trial (requires Node.js 22.16+):

npx t3@latest
Enter fullscreen mode Exit fullscreen mode

Desktop app installation:

# macOS
brew install t3code

# Windows
winget install t3code

# Arch Linux
yay -S t3code   # via AUR

# Or download the platform installer from GitHub Releases
Enter fullscreen mode Exit fullscreen mode

Configuring agents:

After launching, add installed agents in the settings panel. Each agent is authenticated with its own login command:

claude auth login   # Claude Code
codex login         # Codex
opencode auth       # OpenCode
grok login          # Grok
Enter fullscreen mode Exit fullscreen mode

T3 Code detects authenticated agents and registers them automatically.

Core Features

1. Branch-per-thread workflow

Each conversation thread maps to a dedicated Git branch — one of T3 Code's core design decisions:

Thread #1 → branch: feature/add-auth-flow
Thread #2 → branch: fix/payment-bug
Thread #3 → branch: refactor/api-layer
Enter fullscreen mode Exit fullscreen mode

Threads and branches are in one-to-one correspondence. Every agent change has a clear Git boundary and cannot contaminate other threads. The CheckpointReactor manages workspace snapshots — if something goes wrong, roll back to the last checkpoint.

2. One-click PR creation

Agent completes task
    ↓
T3 Code reads commit history
    ↓
(if AGENTS.md exists) follows project PR conventions
    ↓
Auto-generates PR title + description + changelog
    ↓
Supports: regular / draft / stacked / amended PRs
Enter fullscreen mode Exit fullscreen mode

Works across GitHub, GitLab, Bitbucket, and Azure DevOps. Inline editing of PR descriptions and comments is supported on the first three; Azure DevOps comments are read-only.

3. Permission control and tool call approval

Before every agent tool call (file writes, command execution, network requests), T3 Code presents an approval interface. This is especially critical for remote-control scenarios — you can see exactly what the agent wants to do from your phone and decide whether to allow it, rather than running agents unsupervised.

4. Remote access via T3 Connect Relay

The built-in T3 Connect Relay enables cross-network connections:

  • Phone → T3 Connect Relay → home dev machine
  • No public IP required, no port forwarding needed
  • Exponential backoff reconnect (capped at 16 seconds; resets after 30 seconds of stability)

5. Native multi-platform experience

Platform Installation
macOS Homebrew / DMG
Windows winget / installer
Linux AUR / DEB / standalone binary
iOS App Store
Android Google Play
Web Direct browser access

Deep Dive

Driver + Adapter Architecture

T3 Code uses a Driver + Adapter pattern to provide unified control over multiple AI agents:

// What each Provider Driver must implement
interface ProviderDriver {
  driverKind: string;            // "claude" | "codex" | "opencode" | ...
  configSchema: ZodSchema;       // What config this provider needs
  create(config): ProviderAdapter; // Create the corresponding Adapter
}

// The Adapter is the abstraction layer for communicating with the actual agent
// ClaudeDriver.ts    → ClaudeAdapter.ts
// CodexDriver.ts     → CodexAdapter.ts
// OpenCodeDriver.ts  → OpenCodeAdapter.ts
// ...
Enter fullscreen mode Exit fullscreen mode

Two registries separate concerns:

  • ProviderInstanceRegistry: manages configured provider instances, indexed by ID
  • ProviderAdapterRegistry: resolves instance IDs to live Adapter objects

ProviderService sits above both, routing operations by thread rather than by provider instance — the caller doesn't need to know which agent a thread uses; everything goes through the thread ID.

Adding a new provider requires only writing the Driver and Adapter, then registering the entry in BUILT_IN_DRIVERS. No changes to the orchestration layer or client code are needed.

Three Queued Worker Threads

The control layer and execution layer are fully decoupled through three background workers:

Client (phone / browser)
    ↓ orchestration.dispatchCommand()
Command queue
    ↓
ProviderCommandReactor      ← handles intent events, dispatches provider calls
    ↓
Provider (Claude Code / Codex / ...)
    ↓ streaming output
ProviderRuntimeIngestion    ← consumes provider streams, emits internal commands
    ↓
CheckpointReactor           ← manages workspace snapshots and rollback points
    ↓
orchestration.subscribeThread()
    ↓
Client subscription (real-time updates)
Enter fullscreen mode Exit fullscreen mode

The key property: clients never contact providers directly. All operations go through orchestration.dispatchCommand; results arrive via orchestration.subscribeThread. Network interruptions only require the client to re-subscribe — the server-side task keeps running unaffected.

Connection Runtime: RPC and Exponential Backoff

The connection runtime handles four target types:

Target type Description
Primary Direct local server connection
Bearer Token-authenticated connection
Relay T3 Connect cross-network relay
SSH SSH tunnel connection

RPC Session establishment follows three states: preparing → opening → synchronizing. Sessions don't retry internally — all retry logic lives in the Supervisor layer:

  • Offline: releases the active session and waits without consuming retry attempts
  • Transient failures: exponential backoff, capped at 16 seconds
  • Stable for 30 seconds: resets accumulated backoff
  • Auth/config failures: blocks until external input changes

OpenCode's Special Infrastructure

Among the five providers, OpenCode requires the most infrastructure:

  • Each instance owns a lazy local server that shuts down 30 seconds after the last borrower releases it
  • Every connection must pass an authenticated /global/health check (version ≥ 1.14.19 required)
  • Each thread maintains its own server instance to avoid MCP connection conflicts between threads sharing a directory
  • T3 Code does not manage external OpenCode processes — "native configuration changes there can require an external reload"

This "more complex providers need more complex adapters" pattern is precisely the value of the Driver + Adapter separation: complexity is isolated, not leaked.

Positioning vs. Cursor Glass / Conductor

The T3 Code README notes that the team was inspired by Codex desktop, Conductor, and Cursor Glass — but found none of them satisfactory:

Tool Positioning Limitation
Cursor Glass Floating overlay for Cursor Tied to a single agent
Conductor Agent orchestration layer Closed source, not forkable
Codex desktop Desktop client for Codex Tied to a single agent
T3 Code Multi-agent control plane Early-stage, features still landing

T3 Code's differentiation is three things: multi-agent support, fully open-source and forkable, and native mobile clients.


Project Links & Resources

Official Resources

Related Projects

  • T3 Stack — the same team's full-stack Next.js architecture
  • Claude Code — Anthropic's AI coding tool, the most fully supported provider in T3 Code
  • OpenCode — open-source AI coding agent with native T3 Code support

Summary

Key Takeaways

  1. Control plane, not an agent: T3 Code doesn't replace Claude Code or Codex — it adds a unified control interface above them
  2. Bring Your Own Subscription: your quota, your subscription, T3 Code never touches it
  3. Driver + Adapter layering: adding a new provider changes one place; the orchestration layer is untouched
  4. Branch-per-thread: every agent conversation maps to a Git branch — bounded, rollback-capable
  5. Remote access is first-class: T3 Connect Relay plus exponential-backoff reconnect; controlling a dev machine from a phone is a design goal, not a feature add-on

Who This Is For

  • Developers using multiple AI coding tools: Claude Code + Codex users who don't want to context-switch between multiple terminals and UIs
  • Engineers who want to monitor long-running agent tasks from mobile: start a large task, walk away, approve operations from your phone
  • Teams that care about auditability: every agent action has a full trace; tool calls can be approved one by one
  • Developers who want to fork and customize AI tooling: MIT license, fully open, the T3 team explicitly invites forks

One-Line Verdict

T3 Code builds the "cloud console" for the AI coding era: your agents run locally, and you control them from anywhere.


Check out PrimeSkills — a curated marketplace of AI agents and skills that have been validated in real-world, enterprise-grade workflows. No fluff, just what actually works.

Find more useful knowledge and interesting products on my Homepage

Top comments (0)