Using Krometrail with OpenAI Codex
Krometrail gives Codex runtime debugging via MCP or the CLI — the same tools, two interfaces.
Setup: MCP (Recommended)
Add to your Codex config at ~/.codex/config.toml (global) or .codex/config.toml (per-project):
toml
[mcp_servers.krometrail]
command = "krometrail"
args = ["--mcp"]Or add via the CLI:
bash
codex mcp add krometrail -- krometrail --mcpCodex discovers the debug_*, chrome_*, and session_* tools automatically.
Focused tool sets
bash
# Debug tools only
codex mcp add krometrail-debug -- krometrail --mcp --tools=debug
# Browser tools only
codex mcp add krometrail-browser -- krometrail --mcp --tools=browserSetup: CLI with Skill
For CLI-based usage, install the krometrail skill:
bash
npx skills add nklisch/krometrail --skill krometrail-debug krometrail-chromeExample Workflow
Ask Codex:
The
calculate_discountfunction returns wrong values for gold tier customers. Debug it.
Codex will:
debug_launch(orkrometrail debug launch) withpython3 -m pytest tests/ -k test_goldand a breakpoint atdiscount.py:42- Continue to the breakpoint
- Evaluate
tierandtier_multipliers['gold'] - Step into the function
- Identify the bug and explain it
Tips
- MCP is zero-config — Codex discovers tools automatically from the server
- CLI path is transparent and scriptable — Codex can run multiple commands in parallel via bash
- Session persistence — sessions are managed by a background daemon across multiple turns
- Multiple sessions — use
--session <id>to target a specific session when multiple are active
Verifying Setup
bash
krometrail doctorThis checks which language adapters are installed.