Grok Bot: per-turn usage accounting and hooks/webhooks (like Codex)

Feature request for product/service

– Other –

Describe the request

Accounting is the top priority. For every Grok Bot turn, including routine runs and subagents, please expose the model, input tokens, cache-read tokens, cache-write tokens, output tokens, and wall-clock time. Each turn should also carry a turn id and the bot and routine it belongs to. Per-bot percentage shares in Usage aren’t enough to cost a task, work package or release, or to see where to make savings.

Delivery: ideally, push these as signed webhook events to an endpoint we host (turn start and stop, session end, question card asked and answered), or offer a per-turn usage API.

Hooks: we’d also like hooks similar to Codex’s: before and after tool use, permission requests, and subagent start and stop. That would let us log, gate and automate around bots the way we already do with Codex.

Our use case is running many bots plus Codex, where we cost every turn at API rates (via models.dev) to make repeat work cheaper and turn it into deterministic tools. Codex already gives us this, but Grok Bot is a black box.

yes! agreed 100%

hooks are imperative.. so are usage & metrics for oversight and analysis.

please add these ASAP. need ways to FORCE bots to do “the thing I want” and not “whatever they decide to do”

can not trust a bot to run a script or verification check.

nor can we understand the logic or do much in terms diagnosing issues when the underlying mechanics are hidden from the users.

kindly consider that folks don’t want to simply throw more money at silicon without knowing what the silicon is going to do.