Skip to content

Add meta-harness user-agent dimension for omnigent#1476

Closed
simonfaltum wants to merge 3 commits into
mainfrom
simonfaltum/harness-omnigent-tracking
Closed

Add meta-harness user-agent dimension for omnigent#1476
simonfaltum wants to merge 3 commits into
mainfrom
simonfaltum/harness-omnigent-tracking

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Jun 18, 2026

Copy link
Copy Markdown
Member

Why

Omnigent is a meta-harness that orchestrates AI coding agents (Claude Code, Codex, Cursor, and others). It is not itself an agent, so it does not belong in the existing agent/<name> user-agent dimension. We want telemetry that surfaces both the meta-harness and the underlying agent at the same time. ("meta-harness" matches omnigent's own self-description; "harness" alone is how the field labels the underlying agents like Claude Code.)

Changes

Before: the SDK reported only agent/<name> (e.g. agent/claude-code) for the detected AI coding agent.

Now: the SDK also reports an independent meta-harness/<name> dimension. When the OMNIGENT environment variable is present (omnigent stamps OMNIGENT=1 into every agent process, see omnigent-ai/omnigent#656), the user agent gains a meta-harness/omnigent segment. Because it is a separate dimension from agent detection, running Claude Code under omnigent yields both agent/claude-code and meta-harness/omnigent, and omnigent never trips the agent "multiple" logic.

Implementation mirrors the existing agent dimension, all in databricks/sdk/useragent.py:

  • New META_HARNESS_KEY, a _KNOWN_META_HARNESSES table, and a presence-based meta_harness_provider() (cached for the process lifetime).
  • to_string() appends the meta-harness/<name> segment right after the agent segment.

Test plan

  • make test (196 passed), including new meta-harness tests in tests/test_user_agent.py
  • Detection tests: present / absent / empty-value-still-counts / cached
  • Independence test: with both OMNIGENT and CLAUDECODE set, the UA contains both agent/claude-code and meta-harness/omnigent, and agent_provider() stays claude-code (not multiple)
  • make lint (ruff check + format) clean

Detect the OMNIGENT environment variable and report meta-harness/omnigent
as an independent user-agent dimension, parallel to agent detection. This
lets the platform see both the meta-harness (omnigent) and the underlying
coding agent (e.g. claude-code) in the same request.

Co-authored-by: Isaac
Signed-off-by: simon <simon.faltum@databricks.com>
@simonfaltum simonfaltum force-pushed the simonfaltum/harness-omnigent-tracking branch from 61a3e17 to d543e93 Compare June 18, 2026 12:25
@simonfaltum simonfaltum changed the title Add harness user-agent dimension for omnigent meta-harness Add meta-harness user-agent dimension for omnigent Jun 18, 2026
Co-authored-by: Isaac
Signed-off-by: simon <simon.faltum@databricks.com>
@github-actions

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1476
  • Commit SHA: 344c4a827ad92ac4c2ee2432939895a4c27592e3

Checks will be approved automatically on success.

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.

2 participants