Skip to content

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

Merged
simonfaltum merged 2 commits into
mainfrom
simonfaltum/harness-omnigent-tracking
Jun 19, 2026
Merged

Add meta-harness user-agent dimension for omnigent#1726
simonfaltum merged 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:

  • New useragent/meta_harness.go: a knownMetaHarness table, lookupMetaHarnessProvider(), and a cached MetaHarnessProvider(); plus MetaHarnessKey in useragent/user_agent.go.
  • New request visitor in config/api_client.go that appends the meta-harness/<name> segment, mirroring the existing agent visitor.

Test plan

  • go test ./useragent/... passes, including new meta-harness tests
  • Detection tests: present / absent / empty-value-still-counts / cached
  • Independence test: an agent env var (e.g. CLAUDECODE) does not affect meta-harness detection, and vice versa
  • Full go build ./..., config package tests, and make lint covered by CI

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 227257d to dcb2398 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-go

Inputs:

  • PR number: 1726
  • Commit SHA: 07a3ee46b89a4bff697bb9b09316df31eac9c2b5

Checks will be approved automatically on success.

@simonfaltum simonfaltum added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit cd1cdfe Jun 19, 2026
14 checks passed
@simonfaltum simonfaltum deleted the simonfaltum/harness-omnigent-tracking branch June 19, 2026 07:45
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