Skip to content

Codex tracing support#226

Open
db-nethra wants to merge 2 commits into
databricks:mainfrom
db-nethra:codex/ucode-codex-uc-tracing
Open

Codex tracing support#226
db-nethra wants to merge 2 commits into
databricks:mainfrom
db-nethra:codex/ucode-codex-uc-tracing

Conversation

@db-nethra

Copy link
Copy Markdown

What

With the MLflow 3.14 release, the MLflow TypeScript tracing packages now support sending Codex traces to Unity Catalog-backed storage. This PR wires that support into Ucode.

Change

The Codex agent setup now installs and validates @mlflow/codex, configures Codex to invoke MLflow after a completed turn, and supplies the required tracing environment when Codex launches. It also removes Ucode-managed tracing configuration when tracing is disabled.

The shared tracing flow now recognizes Codex as tracing-capable and supplies the selected MLflow experiment ID and UC trace location. This routes Codex sessions into the configured UC-backed ucode-traces experiment.

Tests

  • tests/test_agent_codex.py verifies MLflow hook configuration, runtime installation, launch environment, and cleanup.
  • tests/test_tracing.py and tests/test_e2e_tracing.py verify Codex traces reach the configured UC-backed experiment with the expected spans and model attribution.
$ uv run pytest
912 passed, 6 skipped

$ uv run ruff check .
All checks passed!

Related

Built on the Codex UC trace-location support added in [mlflow/mlflow#23771]

The upstream instrumentation currently includes Codex harness context, such as system instructions and discovered AGENTS.md content, in the initial trace. Filtering this context belongs upstream in MLflow’s Codex tracing package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant