All videos
0:00 / 0:00
ai

Trace Every Codex Session in LangSmith in Minutes

LangChain14 July 2026Watch on YouTube

Part of series

Ep. 5 · LangChain Deep Agents

Stap-voor-stap uitleg en tutorials over het bouwen, configureren en deployen van Deep Agents met het LangChain-framework.

View the series

What you'll learn

  • Learn how to integrate Codex CLI with LangSmith using a tracing plugin from the Codex marketplace
  • Discover how to configure config.toml and environment variables to enable full tracing functionality
  • See how nested sub-agents, tool calls, shell commands and API requests are captured in LangSmith as hierarchical traces
  • Learn what to check when traces don't appear on screen, including cancellations and configuration issues

Frequently asked questions

What steps do you need to follow to enable Codex CLI tracing in LangSmith?
You install the tracing plugin from the Codex marketplace, turn on plugin hooks in config.toml, enable the critical flag that actually activates tracing, and then set the necessary environment variables to connect with LangSmith.
What can you see in LangSmith after running a Codex task with tracing enabled?
You see a complete trace with turns, tool calls, shell commands, web searches, model metadata and token usage. Nested sub-agents appear as hierarchical traces beneath the main session.
How can you verify that the tracing plugin is correctly installed and active?
You run a realistic Codex task and check whether it appears in LangSmith as a complete trace. If the screen is empty, this could be due to a cancelled run or a configuration error in config.toml or environment variables.
What two configuration blocks are essential for enabling Codex tracing?
The two configuration blocks are the plugin hooks in config.toml and the environment variables for LangSmith connection. Together with the critical flag that activates tracing, these form the minimum setup required.

Topics

Description from the channel

Amy Ru from the LangChain Product team walks through wiring up the Codex CLI so every session lands in LangSmith as a full trace, including turns, tool calls, model metadata, token usage, and nested sub-agents. She sets up the tracing plugin from the Codex marketplace, configures config.toml and environment variables, runs a real multi-step Codex task, and shows exactly what to check if traces don't show up. Chapters: 0:00 Wiring up Codex tracing in LangSmith 0:19 What you need before you start 0:28 Installing the tracing plugin from the Codex marketplace 0:52 Turning on plugin hooks in config.toml 1:15 The one flag that actually enables tracing 1:37 Setting environment variables for tracing 1:57 Running a real Codex task with tool calls 2:38 What a Codex trace looks like in LangSmith 3:09 Inspecting tool calls, shell calls, and web searches 3:18 How sub-agents show up as nested traces 3:30 What happens if you cancel a run 3:37 Fixing an empty trace screen 4:05 Recap: two config blocks, one flag 4:14 What's next: Claude Code and Cursor