Skip to main content
The Bitfab Codex plugin brings the full evaluation workflow into Codex. It provides MCP tools for trace inspection and diagnostics, skills for authentication and setup, and automatic notifications so you never have to leave your terminal.

Installation

Run the CLI from your project directory:
This installs the Bitfab plugin, opens your browser to log in, and launches $bitfab:setup. Pass an initial setup request with --prompt (or -p) to send it straight to the agent:
The CLI checks that Codex is signed in before it launches the Bitfab agent. If needed, run codex login first.
For the experimental terminal-native flow, run npx bitfab-cli init --v2 instead. It does not launch Codex: setup choices and tool permissions stay in the CLI while the Claude Agent SDK performs repository analysis and approved edits. Set ANTHROPIC_API_KEY or configure a supported Agent SDK cloud provider first. Use npx bitfab-cli setup --v2 instrument to run one setup mode, or add --diagram to print its declarative state graph without starting the agent.
Set your API key as an environment variable:
Then add this to ~/.codex/config.toml (global) or .codex/config.toml (project-level):
Visit the setup page to get your API key and see the full configuration steps.

What the Plugin Does

Automatic Setup

The $bitfab:setup skill runs a multi-phase workflow:
  1. Login — Opens your browser for OAuth authentication, saves credentials securely
  2. Explain — Walks through opt-out withTrace/trace, withNode/node, supported withSpan fallbacks, and replay, including the five ways replay can change a method’s execution. Everything after this asks you to make per-method decisions, so it comes first
  3. Approach — Asks whether the agent should walk you through instrumenting or hand you the docs so you can do it yourself
  4. Instrument + Replay (in parallel, per workflow) — Reads your codebase, finds all AI workflows (LLM calls, agents, AI-driven decisions), and presents them as a numbered list. You choose which to instrument, or name a file, function, or directory yourself and it reads only that instead of scanning. Either way it adds tracing with minimal diffs and creates a registry module for the replay command shipped with the SDK
For supported TypeScript and Python workflows, setup defaults to opt-out tracing. If the selected call stack already contains manual spans, setup removes redundant wrappers and converts policy-bearing spans to nodes instead of treating MixedTracingError as a reason to stay opt-in. Before converting a shared helper, it checks every production caller so existing opt-in callers keep a separate surface; TypeScript node wrappers also use named functions as required by withNode. A TypeScript client that uses a dedicated organization or environment key also gates captureEnabled on that key being present, so an empty value cannot fall back to an unrelated BITFAB_API_KEY. You can run individual phases:
The setup is interactive: it presents 2-5 concrete options per decision point with a recommended choice, so you stay in control throughout.

Assistant (retired)

The $bitfab:assistant skill has been retired. Running it now only explains that it is gone. You don’t need a special command: tell your agent what you want, and it uses the Bitfab tools to do it. For example:
To instrument new code or set up replay, use $bitfab:setup.

MCP Tools

The plugin registers MCP tools that Codex can call during conversations. These let you inspect traces, diagnose failures, and improve your code without leaving the terminal. If a tool call includes a parameter that the installed plugin does not support, Bitfab ignores only that parameter and continues the call with the supported ones. The result includes a warning that names each ignored parameter and the receiving plugin version. Update the plugin before relying on those parameters.

Core

Trace Inspection

Verdicts and Datasets

Experiments

Templates

Instrumentation

Skills

Example Workflows

Instrument a new project

The agent detects your project language, finds AI workflows, presents options, and instruments your chosen workflows, all interactively.

Diagnose and fix a failing function

Ask Codex naturally:
The plugin calls search_traces and get_traces to inspect failing traces and suggests code fixes directly.

Replay after a code change

After updating a function, pass your registry module to the replay command installed by the SDK:
Or ask Codex to do it for you.

Configuration

Credentials

Credentials are stored in .bitfab/credentials.local.json when that project-local file exists, otherwise in ~/.config/bitfab/credentials.json (created by $bitfab:setup login with owner-readable permissions).

Environment Variables

Troubleshooting

Not authenticated

If you see “Not authenticated” on session start:
  1. Run $bitfab:setup login to authenticate via browser
  2. Check that ~/.config/bitfab/credentials.json exists and contains your API key
  3. If using an environment variable, verify BITFAB_API_KEY is set

MCP tools not available

If Codex can’t access the Bitfab tools:
  1. Verify the MCP server configuration in ~/.codex/config.toml or .codex/config.toml
  2. Check that BITFAB_API_KEY is set in your environment
  3. Try restarting Codex

Plugin updates

Run $bitfab:update to install the latest version.