Skip to content

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

Open
simonfaltum wants to merge 2 commits into
mainfrom
simonfaltum/harness-omnigent-tracking
Open

Add meta-harness user-agent dimension for omnigent#836
simonfaltum wants to merge 2 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 core/UserAgent.java:

  • New metaHarnessProvider cache field, a KnownMetaHarness model + listKnownMetaHarnesses() table, a presence-based lookupMetaHarnessProvider(), and a cached metaHarnessProvider() (double-checked locking, mirroring agentProvider()).
  • asString() appends the meta-harness/<name> segment right after the agent segment.

Test plan

  • mvn -pl databricks-sdk-java test -Dtest=UserAgentTest (5 new tests)
  • 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 does not contain agent/multiple
  • spotless:apply clean (no reformatting)

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 d6a536c to 898c56c 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>
@simonfaltum simonfaltum deployed to test-trigger-is June 18, 2026 15:31 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

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-java

Inputs:

  • PR number: 836
  • Commit SHA: d3f02a96291b905a286ad034113bed737caff060

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