Route MLflow tracing to a shared, UC-backed Claude Code experiment#134
Merged
Conversation
Collapse the per-agent, per-user tracing model into one shared experiment (/Shared/ucode-traces) so every agent and every user's coding sessions converge in one place. The first user to configure tracing creates the experiment; everyone after resolves the same one by name. Also includes the `configure --tracing` flag for enabling tracing on just-configured workspaces without re-prompting. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Stop creating the MLflow experiment. ucode now asserts that an admin has already provisioned a `ucode-traces` experiment whose traces are stored in Unity Catalog, identified by the `databricksTraceDestinationPath` tag holding a catalog.schema.table value. Any UC destination qualifies. If none exists (or the match isn't UC-backed), fail with setup instructions instead of silently creating a non-UC experiment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Writing traces to a Unity Catalog-backed experiment requires a SQL warehouse via MLFLOW_TRACING_SQL_WAREHOUSE_ID; without it the MLflow exporter silently drops every trace (verified: 0 rows landed in the UC table until the var was set). configure tracing now resolves a warehouse (preferring a RUNNING one), persists it, injects it into each agent's tracing env, and fails with setup instructions when no warehouse exists. Verified end-to-end: a headless Claude run now lands traces in the UC trace table. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codex and OpenCode used the @mlflow/codex / @mlflow/opencode JS clients, which only reach the classic (non-UC) trace store, so their tracing is removed. Tracing now routes exclusively through Claude Code's `mlflow autolog claude` Stop hook, which writes to the shared UC-backed ucode-traces experiment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Cast the isinstance-narrowed object to dict so ty doesn't treat dict.get keys as Never, matching the cast pattern used in databricks.py. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AarushiShah-db
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks MLflow tracing from the original per-agent, per-user model into a single shared, Unity Catalog-backed experiment that only Claude Code routes to.
ucode-tracesexperiment (matched by leaf name) instead of each user/agent getting its own. ucode no longer creates it — an adminprovisions a
ucode-tracesexperiment whose traces are backed by a Unity Catalog table, and ucode asserts it exists (failing with actionable setup steps if not).MLFLOW_TRACING_SQL_WAREHOUSE_ID— without it the exporter silently dropsevery trace — so ucode resolves a SQL warehouse and injects the id.
@mlflow/codex/@mlflow/opencodeJS clients, which can only write to the classic (non-UC) trace store. Tracing now flowsexclusively through Claude Code's
mlflow autolog claudeStop hook (pinnedmlflowCLI 3.11.x viauv tool). Gemini was never wired.configure --tracingflag. Enables tracing for just-configured workspace(s) without re-prompting.ucode statusnow shows the shared experiment, its Unity Catalog destination, and the SQL warehouse id.