Add meta-harness user-agent dimension for omnigent#234
Merged
Conversation
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>
ecda92f to
ea59fd4
Compare
renaudhartert-db
approved these changes
Jun 18, 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
Adds an independent
meta-harness/omnigentuser-agent dimension for the omnigent meta-harness.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.)What changed
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 theOMNIGENTenvironment variable is present (omnigent stampsOMNIGENT=1into every agent process, see omnigent-ai/omnigent#656), the user agent gains ameta-harness/omnigentsegment. Because it is a separate dimension from agent detection, running Claude Code under omnigent yields bothagent/claude-codeandmeta-harness/omnigent, and omnigent never trips the agent "multiple" logic.Implementation mirrors the existing agent dimension:
packages/core/src/clientinfo/meta-harness.ts: aKNOWN_META_HARNESSEStable, presence-basedlookupMetaHarnessProvider(), and a cachedmetaHarnessProvider().createDefault()indefault.tsappends themeta-harness/<name>segment after the agent segment. The browser entrypoint (default.browser.ts) is unchanged, since it performs noprocess.envdetection.Internal changes
meta-harness.test.tsis excluded from the browser test suite (likeagent.test.ts), as it relies onprocess.env.How is this tested
npm test(320 passed), including newtests/clientinfo/meta-harness.test.tsand independence cases intests/clientinfo/default.test.tsOMNIGENTandCLAUDECODEset, the UA rendersagent/claude-code meta-harness/omnigentnpm run test:browser(209 passed)npm run format:check,npm run lint,npm run typecheckall clean