Skip to Content

How do I find sessions that hit errors in Codex (beta)?

Rius marks a Codex (beta) session as failed when any span in it errors, so you filter the trace list by status failed and the agent codex to see them. Each session is one trace. Open it to see the failed command or tool call highlighted in the waterfall.

How it works

Each Codex (beta) session arrives in Rius as one trace. Rius derives the trace status from the spans, so your agent never reports it. A trace is failed when at least one span carries an OpenTelemetry ERROR status.

The plugin marks a span as an error in two cases:

  • A command run by a tool call exits non-zero.
  • An MCP tool call fails.

Other kinds of failure are recorded as success, so a session can read completed even though something went wrong in it. Keep that in mind when a session you expected to fail is missing from the list.

Two more things shape what you see:

  • A failed trace whose root span finished clean is badged recovered. Child spans errored, but the run itself completed. The errors are still counted. For Codex (beta), this is every failed session.
  • A session stays running… until it is closed. The next Codex (beta) session you start on the same key closes it, once the old session’s process has exited and it has been idle for about an hour. The agent’s error figures on the Agents page count a session only after that.

codex exec --ephemeral sessions are not traced, so they never appear in any of these views.

Set it up

  1. Check that the session was traced. In Codex (beta), run $rius:rius-status. The Hooks: line must show all five approved, and the folder must be enabled with $rius:rius-enable-here. The Codex (beta) guide covers install, hooks and sign-in in full.
  2. Open Traces in the console. Set the time range, which defaults to 7d, then filter the status to failed and select the agent codex. Sessions appear as one row each, with the error count, token total, cost and latency.
  3. Narrow the list. Click a cell in the Sent by or User column to filter to one developer. Or click Add filter and combine fields with AND. Save the search with Saved if you come back to it. All of this is described in Exploring traces.
  4. Open a failed row. The waterfall highlights the path from the root to the error, and the detail panel for an error span leads with the exception. Press ]e to jump to the next failed span.
  5. To look at the steps themselves, switch to the Spans tab. Pick Tool in the All kinds menu and filter by status to list every failed tool call. Paste a session ID into the search box to list every span in one session.
  6. Or ask Codex (beta) directly. The plugin registers the Rius MCP server as rius. Sign in to it once:
codex mcp login rius

Then ask: “Show me my last failed session and which command went wrong.”

What you get

  • A list of failed Codex (beta) sessions, filtered by status and by the codex agent, with the developer who sent each one.
  • The exact step that failed, with its exception, reached from the waterfall or from the Spans tab filtered to tool calls.
  • A recovered badge on these sessions. The plugin never marks the Codex session itself as failed, so every Codex session with an errored step reads as failed and recovered.
  • A per-developer view. From plugin 0.6.2, every span carries the email you signed in with as user.id, so the Users page shows each developer’s error rate and cost. Use Error rate, not Failed traces: Failed traces counts only runs whose root span failed, and a Codex session root never does.
  • A link you can share. Share on the trace list freezes the filtered view into a read-only link with metadata only, never span content.
  • Plain-language answers from Codex (beta) itself through the Rius MCP server.

When something else fits

  • If a session went wrong without a non-zero exit or an MCP failure, it reads as success. Enable the folder with $rius:rius-enable-content-here to read the prompts, replies and tool output in the session.
  • For the same view across a team using Claude Code, see Track Claude Code usage and cost across a team. The wider set of agents is on the Coding agents page.

Still stuck? Get help

Last updated on