Install
Requires Node.js 22 or later.codex and choose Trust all and continue at the “Hooks need review” prompt, or trust them later with /hooks.
Set up
Create~/.codex/traceroot.json:
Environment variables win over a project
.codex/traceroot.json, which wins over the global file. api_key, host_url and capture_images are read only from environment variables or the global file, so a repository you open can’t redirect your traces. The plugin README lists every setting.
Usage
Use Codex as usual. Each turn becomes one trace, sent live while Codex works. Traces from the same thread share a session ID.codex exec and other runs without a prompt, trust has to be in place first, because untrusted hooks are skipped without any message. Run codex exec --skip-git-repo-check "echo hello" < /dev/null; the output should include hook: Stop Completed. The README shows how to carry trust to CI.
Verify
Run one prompt in Codex and confirm the trace arrives:- In the traceroot UI: Navigate to Tracing > Traces in traceroot Cloud. You should see a trace with root span
Codex Turn. - Via the CLI: Run
traceroot traces listto inspect your recent traces from the terminal.
What gets captured
Prompts, tool inputs and tool outputs are sent as they are, including commands and file contents. Nothing is redacted. Self-hosted instances store images as attachments when
ATTACHMENT_ENABLED=true. See Data Capture and Privacy.
Limitations
- If no trace arrives, check that the hooks are trusted (
/hooks) and thatenabledistrue. Setdebugtotrue(TRACEROOT_CODEX_DEBUG) to log to stderr. - Codex asks you to trust the hooks again after every plugin update. Until you do, no traces are sent.
Run the example
traceroot-codex-plugin
Source, full settings and headless setup
Next steps
Sessions
See a whole Codex thread as one timeline.
Data Capture and Privacy
Control what leaves your machine.