A T3 Code workflow wakes Grok Bot only when a coding loop needs input or ends
Source read in fullRead first
Overview
A developer who already uses T3 Code can install this durable workflow, give Grok Bot a webhook Routine, and let a local implement-and-review loop run until the bot is needed to decide or to receive the final summary.
Workflow
- What it is: A generic durable coding loop and Grok Bot webhook-callback bridge that runs inside T3 Code Durable Workflows on Windows, macOS, and Linux. The inner loop — implement, verify, independent review, revise — runs on the user's machine without waking Grok Bot on every small turn. The outer loop wakes Grok Bot, via an async webhook with exponential-backoff retries, only when human or bot input is needed (
needs_input) or when the workflow ends (onEnd). Grok Bot can resume a waiting run witht3_workflow(action="signal"). - Grok Bot parts used: A webhook-triggered Routine, whose prompt is taken from
templates/grokbot-routine-prompt.md, plus the T3 MCP toolt3_workflowso Grok Bot can start, signal, or resume a run. There is nox.ai/bot/...template link. Not part of Grok Bot: T3 Code and its Durable Workflows engine (~/.t3/workflows/), the workflow fileworkflows/grokbot-loop.ts, T3's key-value store (T3.store) for webhook URLs and Bearer keys, and the implement and review agents T3 launches. The README says all T3 providers are supported, including Codex, Claude Code, Cursor, Antigravity, Kiro, Grok Build, or any ACP agent configured in T3 Code. Grok Build is a T3 implementer option here, not a Grok Bot chat step. - You need: T3 Code v0.1.12 or later with Settings, Labs, Workflows enabled; a Grok Bot account that can create a webhook-triggered Routine; and the T3 MCP connection so the bot can call
t3_workflow. Webhook URLs and Bearer keys are stored inT3.store, not in Git. Not stated in the source: which Grok Bot plan is required. - Install: Enable T3 Workflows, install this workflow into
~/.t3/workflows/, create the Grok Bot Routine from the template, and store the webhook. The README's path, kept as sub-steps:- Step 1: In T3 Code, enable Settings, Labs, Workflows (requires T3 Code v0.1.12+).
- Step 2: Clone
https://github.com/weugit/t3-grokbot-loop.gitand runscripts/install.ps1on Windows, orbash ./scripts/install.shon macOS or Linux. T3 Code watches~/.t3/workflows/and hot-reloadsgrokbot-loop.ts. - Step 3: Create a webhook-triggered Routine in Grok Bot and paste the prompt from
templates/grokbot-routine-prompt.md. That file is long, so this case points to the path rather than repeating it. Copy the Routine's webhook URL and Authorization header. - Step 4: Store them in T3 Code's durable store, replacing
<bot-name>with a lowercase identifier such asmainbot. The README shows:
t3 workflow store set grokbot/webhook/<bot-name> '{"url":"https://your-grokbot-webhook-url","authHeader":"Bearer your-routine-key"}'
Verify with t3 workflow store list grokbot/webhook/.
- After install: Start a loop from Grok Bot via T3 MCP, or from the T3 CLI; Grok Bot is woken only for input or a final summary.
- A start call passes
project,task, andbotName(required). Optional fields includemaxRounds(default 3, clamped to 1–10),workspaceMode(defaultworktree),runtimeMode(defaultfull-access),enableReview(default true),agentTimeout(default 2 hours), anddecisionTimeout(default 24 hours) for waiting on a Grok Bot signal. - On
needs_input, the Routine prompt tells the bot to review the question and, if it can decide safely, callt3_workflowwithactionsignal; it should not interrupt the user unless the decision involves production deploy, destructive data changes, billing, or ambiguous product scope. Otherwise it should summarize the question for the user, includingrunIdandwaitName. - On
workflow_ended, the bot reports completion (includingbranchandprUrlwhen present) or explains why the run stopped or was cancelled. notifyOnRounddefaults to false; if true, non-final rounds also POSTround_feedback, which the prompt says to log without taking action.- The start payload example and the full Routine instructions stay in
templates/grokbot-routine-prompt.md.
- Did the author run it: The repository has no run records from the author. The repo includes
tests/workflow.test.mjsand a GitHub Actions test workflow; those are local or CI tests, not a record of a Grok Bot coding loop.
Key points and results
- Maturity: At fetch time on 2026-12-03 the repo was created at 2026-12-02T16:46:37Z, last pushed at 2026-12-02T17:52:38Z, with 6 commits, 0 stars, 0 forks, 0 open issues or PRs, and an MIT license. The Grok Bot Routine prompt in
templates/grokbot-routine-prompt.mdwas fetched. The README presents this as a generic bridge, with no author-run coding-loop record. - Permissions and boundaries: Webhook URLs and Bearer keys stay in
T3.store, not in Git. The Routine prompt tells the bot not to interrupt the user unless the decision involves production deploy, destructive data changes, billing, or ambiguous product scope. The defaultruntimeModefor worker threads isfull-access; other documented modes includeauto,auto-accept-edits, andapproval-required. The default workspace mode is an isolatedworktree. - Known limits: T3 Code v0.1.12+ with Workflows enabled is required, and Grok Bot is not woken on every inner-loop turn.
decisionTimeoutdefaults to 24 hours. The source does not say which Grok Bot plan is required, and the repository has no author run records. Grok Build, if used, is a T3 implementer, not the Grok Bot side of the loop. - Worth borrowing: Keep an inner coding loop on the local machine, and wake Grok Bot only for
needs_inputoronEnd. See the README's two-tier loop description and architecture diagram. - Worth borrowing: Store webhook URLs and Bearer keys in a durable host store, not in the git tree. See the Quick Start store commands in the README.
- Worth borrowing: On a
needs_inputwebhook, decide from context when it is safe, and only escalate production, destructive, billing, or ambiguous-scope decisions to the user. Seetemplates/grokbot-routine-prompt.md.
Source
- Platform
- GitHub
- Author
- weugit
- Published
- Categories
- Code and repos
What this evidence label means
Source read in full
We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.