Skip to Content

How do I track the prompts developers send in Codex (beta)?

Rius records the prompts developers send in Codex (beta) once you enable a folder with $rius:rius-enable-content-here, and every prompt appears on its turn in the session’s trace. The default $rius:rius-enable-here sends structure only, with no prompt text. Each developer turns this on per folder, and sessions show under the email they signed in with.

How it works

The Rius plugin traces each Codex (beta) CLI session as one trace. Inside it, each turn is a span for one prompt and everything that prompt caused: the model calls with their tokens, the tool calls, and any subagents. The turn is how you tie a prompt to what it cost and did.

Whether the prompt text itself leaves the machine depends on the folder mode:

  • Structure only ($rius:rius-enable-here): the span tree, timing, model names, tokens, cost, tool names, error types and subagents. No prompts and no replies.
  • With content ($rius:rius-enable-content-here): the same, plus prompts, replies, and tool inputs and outputs. The model’s thinking is never sent.

With content on, the plugin replaces the secrets it recognizes, such as cloud and API keys, tokens and private keys, with a marker before anything is sent. It caps each value at 32 KB. This is best effort: a secret in a format it does not know is sent.

Tracing is off until each developer enables a folder, and the rules apply to every Codex (beta) session on that machine. A disabled folder ($rius:rius-disable-here) beats any enabled parent. The plugin only traces after you trust its hooks in Codex, including the UserPromptSubmit hook that sees each prompt.

Set it up

  1. Install, trust the hooks and sign in. The full walkthrough is in Codex (beta). In short, install the plugin, open /hooks in Codex and trust the five rius hooks, then run $rius:rius-login and pick a workspace.

    codex plugin marketplace add glassflow/rius-coding-agents codex plugin add rius@rius-coding-agents
  2. Enable prompt capture for a folder. In the repo whose prompts you want, run the content skill. Codex asks you to approve it because it writes to ~/.codex/rius/.

    $rius:rius-enable-content-here

    Use $rius:rius-enable-here instead if you want structure only.

  3. Check it. Run $rius:rius-status. It shows whether the folder is traced and why, the account, the key and the hooks. If the Hooks: line shows fewer than 5 approved, nothing is traced, so trust the rest in /hooks.

  4. Work as usual. Each session is a trace in the trace list at console.rius-glassflow.com.

  5. Limit it from the environment if needed. Set RIUS_CAPTURE_CONTENT to false to send structure only from every folder, RIUS_CODEX_MAX_ATTR_BYTES to lower the 32 KB cap on each value, or RIUS_CODEX_ENABLED to false to turn Codex (beta) tracing off everywhere. These settings can only turn things off.

For a team, each developer repeats these steps on their own machine, because nobody can enable tracing for someone else. The Claude Code team guide shows the same rollout with the same plugin, and the overview of Coding agents compares what each agent sends.

What you get

  • One trace per session. Open it to see each turn in order, with the prompt behind it when content is on, and the model calls and tool calls it triggered.
  • Tokens and cost on each model call. Cost is worked out from token counts at API rates, so on a ChatGPT plan it measures usage and is not what you pay.
  • Developers by name. From plugin 0.6.2, every span carries user.id, set to the email used at $rius:rius-login, so sessions group on the Users page, and the Sent by column in the trace list shows whose key sent each one. Sessions sent with a key stored by use-key carry no user and land in the anonymous row.
  • Questions in plain language. Run codex mcp login rius once, a second sign-in separate from $rius:rius-login. Then ask Codex things like “Show me my last failed session and which command went wrong.”

What Codex (beta) tracing does not report:

  • Prompts from folders you enabled with structure only.
  • Sessions run with codex exec --ephemeral, which are not traced at all.
  • Cache-write tokens, because OpenAI does not report them.
  • Exact model-call start times, which are approximate.
  • Failed tool calls other than a command that exits non-zero or a failing MCP tool. Other failures look like success.

A Codex (beta) trace shows as in progress until it is closed by the next session you start on the same key, once the old session’s Codex process has exited and it has been idle for about an hour. The plugin never marks the session itself as failed.

When something else fits

If your team works in Claude Code, the same plugin and folder rules apply, with its own commands. If you only need usage and cost per developer, structure-only tracing already gives tokens, cost and tool calls without any prompt text, which is the safer default for repos with sensitive code. Windows is untested for Codex (beta).

Still stuck? Get help

Last updated on