Skip to Content
Rius

How do I record the full prompts and replies of Codex (beta) sessions?

Rius records the full prompts and replies of Codex (beta) sessions in any folder where you run $rius:rius-enable-content-here. In Codex (beta), that command adds your prompts, the replies, and tool inputs and outputs to the span tree, tokens and cost that structure-only tracing already sends. Rius replaces the secrets it recognizes before anything leaves your machine, on a best-effort basis. Every other folder stays off or structure only.

How it works

Tracing for Codex (beta) is off until you turn it on for a folder, and you choose how much each folder sends:

  • $rius:rius-enable-here traces the folder and everything under it, structure only. That means the span tree, timing, model names, tokens, cost, tool names, error types and subagents.
  • $rius:rius-enable-content-here does the same and adds your prompts, Codex’s replies, and tool inputs and outputs, with secrets removed.
  • $rius:rius-disable-here stops tracing a folder. A disabled folder beats any enabled parent, so you can exempt a sensitive subfolder of a repo that sends content.

Before anything is sent from a content folder, the plugin replaces recognized secrets with a marker. These include cloud and API keys, tokens and private keys. It also caps each captured value at 32 KB.

The removal is best effort. A secret in a format the plugin does not recognize is sent as written, so treat content mode as sending whatever appears in the session.

The skills are Codex (beta) skills that only you can start, because Codex never runs them on its own. They write to ~/.codex/rius/, so Codex asks you to approve them. The rules apply to every Codex (beta) session on that machine and are separate from the Claude Code rules.

Set it up

  1. Install, trust the hooks and sign in once. Codex (beta) runs no plugin hook until you trust the five rius hooks in /hooks. Until you do, nothing is traced. The Codex (beta) guide covers install, hooks and sign-in in full.

    codex plugin marketplace add glassflow/rius-coding-agents codex plugin add rius@rius-coding-agents
  2. Open Codex (beta) in the repo you want recorded. Start it from inside that repo.

  3. Turn content on for the folder. Type the skill and approve the prompt Codex shows:

    $rius:rius-enable-content-here
  4. Check the folder. Run $rius:rius-status. It shows whether the folder is traced and why, the account, the key and the hooks. If the Reason line says no path rule matches, the folder is not enabled yet.

  5. Work as usual. Open the session in the trace list in the console. Each model call shows its input and output, and each tool call shows its input and output.

  6. Agree on the repos as a team. Everyone in the workspace can read what a content folder sends, and each developer enables folders on their own machine. Nobody can switch a repo on for the team. Write down which repos may send content, for example:

    • Repos where prompts and replies help debugging and hold nothing sensitive: run $rius:rius-enable-content-here.
    • Repos with customer data or credentials in the working tree: run $rius:rius-enable-here for structure only, or leave them off.
    • Sensitive subfolders inside an enabled repo: run $rius:rius-disable-here there.
  7. Set a machine-wide limit if you need one. Setting RIUS_CAPTURE_CONTENT to false sends structure only from every folder. RIUS_CODEX_ENABLED set to false turns Codex (beta) tracing off everywhere. Both can only turn things off, so they work as a safety net over the folder rules.

What you get

  • Full prompts and replies on each turn of a Codex (beta) session, next to the model name, tokens and cost of the call.
  • Tool inputs and outputs on each tool call. A command that exits non-zero is marked as an error.
  • Subagents that Codex (beta) started, nested under the call that started them, with their own turns and calls.
  • Per-folder control. You can mix content, structure-only and disabled folders on one machine.
  • A cost figure worked out from token counts at API rates, so on a ChatGPT plan it measures usage and is not what you pay.

Sessions you run with codex exec --ephemeral are not traced at all, with or without content, because Codex (beta) keeps no record of them for the plugin to read.

When something else fits

  • If you only need to see what Codex (beta) did, how long it took and what it cost, $rius:rius-enable-here gives the span tree, tokens and cost with no prompts or replies.
  • If your secrets come in formats a pattern-based remover is unlikely to know, keep those folders on structure only or disabled.
  • If you are rolling out Claude Code instead, see Track Claude Code usage and cost across a team. The Coding agents page compares which agents send content only from folders you opt in.

Still stuck? Get help

Last updated on