Guide · Verified October 31, 2026

T3 Code target guide

Short answer: A Hooks destination POSTs JSON to your T3 Code task's On a webhook URL; T3 Code answers 202 when the agent run is accepted. Keep the URL (it carries a token) in a project secret and sign the body when the task requires it.

T3 Code scheduled tasks with the On a webhook schedule expose one URL per task, optionally behind a signature check. Hooks stores that URL as a secret, renders the body from the normalized event, and maps T3 Code's placeholders ({{body.url}}, {{body.repo}}) onto the fields it sends.

1. Expose the task webhook URL

Open T3 Code → Settings → Scheduled tasks, edit the task, choose On webhook as the schedule. A public URL needs a T3 Connect managed tunnel; the URL looks like https://<tunnel>/api/hooks/<hookId>/<token>. The token is part of the URL, so the whole URL is a credential — rotating it in T3 Code invalidates the old one, so update the secret afterwards.

2. Store the URL and signing secret

Settings → Security → Project secrets → add T3CODE_WEBHOOK_URL (the full URL) and, when the task requires signatures, T3CODE_SIGNING_SECRET. Literal URLs are rejected so the token never lands in config JSON or logs. Match header, encoding, and prefix to the task's Require signature settings (GitHub-style defaults: x-hub-signature-256, hex, sha256=).

Destination config

{
  "url": "{{secret.T3CODE_WEBHOOK_URL}}",
  "signature": {
    "secret": "{{secret.T3CODE_SIGNING_SECRET}}",
    "header": "x-hub-signature-256",
    "encoding": "hex",
    "prefix": "sha256="
  },
  "body": { "title": "{{event.subject.title}}", "url": "{{event.subject.url}}" }
}

3. Map the body to the task prompt

Hooks sends title, body (truncated to 2000 chars), url, repo, actor, and type by default; your body map merges over these and drops fields that render empty. The task prompt reads them as T3 Code placeholders, for example Review this PR: {{body.url}} from {{body.repo}} — a placeholder with no matching field renders empty, so keep names in sync.

Request Hooks sends

POST https://<tunnel>/api/hooks/<hookId>/<token>
Content-Type: application/json
x-hub-signature-256: sha256=<hmac>

{"title": "Login fails on Safari", "url": "https://github.com/acme/app/issues/7"}

4. Test, then watch delivery

T3 Code answers 202 when the run is accepted and the agent works asynchronously. Signature mismatches and unknown hooks fail permanently; rate limits and server errors retry with backoff. The delivery log shows the rendered body per attempt, so a misnamed placeholder is visible in one glance.

Frequently asked questions

Why is the whole URL a secret?

The URL embeds the task token (<hookId>/<token>), so anyone with it can trigger runs. Hooks rejects literal URLs in configs; only {{secret.NAME}} references are allowed.

Which signature settings do I use?

Whatever the task's Require signature panel shows. GitHub-style (x-hub-signature-256, hex, sha256= prefix) is the default; mismatched header, encoding, or prefix fails verification on the T3 Code side.

How do placeholders map to the body?

One level: {{body.url}} reads the url field Hooks sent. Send exactly the field names the prompt uses, and remember empty-rendered fields are dropped — guard prompts against missing values.

What does 202 mean?

Accepted: the agent run started asynchronously. Poll the T3 Code task run for the outcome; Hooks marks the delivery succeeded on acceptance.

Reference

Keep going