T3 Code × CopilotKit Channels demo

Send a coding change from Discord, let T3 Code run it on a dedicated branch and worktree, then receive status and completion back in the same Discord thread.

Demo safety: the integration is delivered only on a draft PR. Channel tasks fail closed unless a new worktree branch is created; there is no fallback that runs an agent on main.

What the demo shows

  1. A user mentions the Discord bot with a coding request or runs /t3 <task>.
  2. The Channels adapter maps that Discord conversation to a T3 Code thread.
  3. T3 Code creates a unique branch such as demo/discord/fix-login-a1b2c3d4 from the configured base branch.
  4. Only after the worktree exists does T3 Code start the agent turn.
  5. Discord receives a native status card immediately and a completion card with changed-file count when the diff is ready.
  6. Sending status or pressing the status button checks the linked T3 Code run.

Setup inside T3 Code

The new Channels settings page keeps the demo setup in one place: select the project, paste the Discord application ID and bot token, choose the base branch and branch prefix, then enable the connection.

Configured Discord channel settings in T3 Code

Isolation guarantees

After saving and reloading, the token is empty in the browser and shown only as securely stored. The integration remains disabled unless the user explicitly enables and saves it.

Safe persisted Discord settings after reload

Implementation shape

Verification completed

Demo checklist

  1. Check out the draft PR branch.
  2. Create a Discord bot and enable Message Content and Server Members intents.
  3. Open T3 Code → Settings → Channels and save the bot configuration.
  4. Enable the channel, mention the bot with a small code change, and show the isolated branch in the first response card.
  5. Show the corresponding T3 Code thread and worktree.
  6. Wait for the completion card in the same Discord thread and inspect the diff in T3 Code.