Claude Code
settings.json and the system keychain, or environment variables.Codex
The
[otel] table of ~/.codex/config.toml.omp
Standard OpenTelemetry environment variables.
GitHub Copilot
settings.json and environment variables.Set up with the CLI
Theagentgolf CLI creates a publishing key and writes the harness settings for you. Install the CLI first.
To set up each Claude Code, Codex, and GitHub Copilot harness on your machine with one command, run:
--all does not include omp. See All harnesses on the machine.
To set up one harness, give its name in place of --all. The Harness Setup card on Settings > Uplink > Publishing Keys shows the command for each harness. agentgolf 0.1.10 added --all. Run agentgolf --version to see your version.
For Cloud Uplink, run the command without --endpoint. Cloud Uplink must be on:
--endpoint:
--replace, and --print, see agentgolf harness setup.
- The command refuses an
httpendpoint whose host is not loopback, because the harness would send the key in plain text. Serve OTLP over TLS on the uplink instance withOTLP_TLS_CERT_FILEandOTLP_TLS_KEY_FILE, then use anhttpsendpoint. See Network. To send the key in plain text anyway, for example on a trusted private network, add--allow-insecure-endpoint. - When the file already has other values for these settings, the command creates no key for that harness. Run it again for that harness with
--replaceto change them. - For Claude Code, also set the content limit yourself. See Content length.
Roll out to a team
An admin can roll out the shared harness settings to each developer, for example with MDM. Each developer then adds only their personal publishing key.agentgolf 0.1.10 added both commands.
- For each harness, run
agentgolf harness managed-settings <harness>, where<harness>isclaude-code,codex, orcopilot. The command prints the managed settings document of the harness. For a Self-Hosted Uplink instance, add--endpoint <url>. Seeagentgolf harness managed-settings. - Push each document to the developer machines with MDM, or with the managed settings channel of the harness. Each harness page names the install places: Claude Code, Codex, and GitHub Copilot.
- Each developer runs
agentgolf harness setup --allfor Cloud Uplink. For a Self-Hosted Uplink instance, each developer runsagentgolf harness setup --all --endpoint <url>with the same URL that you gave in step 1. For Claude Code, the command saves the personal publishing key of the user in the system keychain. For Codex and GitHub Copilot, it adds the key to the harness file of the user.
agentgolf login on that device. Never run it with a shared AGENTGOLF_ACCESS_TOKEN: each key would belong to the owner of the token, not to the developer.
The managed documents hold no publishing key. Each key is personal, so it stays with each user: in the system keychain for Claude Code, and in the harness file for the other harnesses. Do not add a publishing key, or a header setting, to a managed document. A managed header replaces the key of each user. The Claude Code helper setting otelHeadersHelper holds no key, so an admin can add it to the managed settings. See Claude Code for the order of that rollout.
Manual setup requirements
Use these rules when you write the harness settings by hand or check them.- Endpoint. For Cloud Uplink, its OTLP Endpoint,
https://uplink.agent.golfin production. See Cloud Uplink. For a Self-Hosted Uplink instance, its OTLP listener on port 4318. Usehttps://when Uplink serves TLS. For the addresses that each install listens on, see Network. - Protocol. OTLP over HTTP with Protobuf (
http/protobuf), on/v1/logs,/v1/metrics, and/v1/traces. Uplink refuses OTLP JSON and compressed requests. The local agent of the GitHub Copilot extension in VS Code needs gRPC. See VS Code local agent. For gRPC, see Network and Cloud Uplink. - Publishing key. Each harness sends its user’s personal publishing key in the
x-agentgolf-publishing-keyheader. See Publishing keys. - Service name. Keep the harness’s default service name. Do not set
OTEL_SERVICE_NAME. Claude Code and GitHub Copilot are the exceptions: setOTEL_SERVICE_NAME=claude-codefor Claude Code andOTEL_SERVICE_NAME=github-copilotfor GitHub Copilot, their defaults, so that a value that the shell inherits from another tool does not replace them. See Claude Code and GitHub Copilot. - Private CA. If the Uplink certificate comes from a private CA, give the harness the CA bundle. Each harness page shows how.
Publishing keys
A publishing key is a personal key (agk_...). Your harness sends it with its telemetry, and Agent Golf links your sessions to you as their contributor. One key works with Cloud Uplink and with a Self-Hosted Uplink instance. You need the Connect Your Harness permission. See Default roles.
To create a key and copy the harness settings in the dashboard:
- Open Settings > Uplink > Publishing Keys. The page does not need Cloud Uplink to be on.
- In the Your Publishing Keys card, enter a Key Name, for example the name of your machine, and select Create Publishing Key.
- Copy the secret. Agent Golf keeps only a digest of the secret and cannot show it again.
- In the Harness Setup card, select the uplink instance. When Cloud Uplink is on, choose Cloud Uplink or Self-Hosted. When it is off, the card shows only the settings for a Self-Hosted Uplink instance.
- For a Self-Hosted Uplink instance, enter the address of its listener in OTLP Endpoint of Your Uplink Instance. The default is
http://127.0.0.1:4318. The card shows a warning when the address sends the key in plain text to a host that is not loopback. - In Harness, select Claude Code, Codex, omp, or GitHub Copilot, and copy the settings. While the secret shows, the settings include it. After you select Hide Secret, they show
<publishing-key>in its place. Under Or run:, the card shows the CLI command that writes the same settings.
- Cloud Uplink accepts a key only while one of the owner’s roles includes Connect Your Harness. When an admin changes the owner’s role to Viewer, Cloud Uplink refuses the key with
401. When the owner gets the permission back, the same key works again. Each change takes effect within one minute. - A Self-Hosted Uplink instance refuses an export without a well-formed key. It also refuses a revoked key with
401, within one minute after the revocation. It does not check the owner’s role: Agent Golf links its sessions to the key owner while the owner is a user of the workspace, even after the owner loses Connect Your Harness. See Require a publishing key. - When a user leaves the workspace, Agent Golf revokes their keys.
A collector between the harness and Uplink
An OpenTelemetry Collector or Grafana Alloy between the harnesses and Uplink drops the request headers by default. To keep the link to each key owner, configure the collector to forward each export’sx-agentgolf-publishing-key header. The same settings work for Cloud Uplink and for a Self-Hosted Uplink instance. Only the exporter endpoint changes.
- Connect each harness to the collector with its user’s personal publishing key.
agentgolf harness setup <harness> --endpoint <collector-url>sets up the harness to send the key in the header. - In the OTLP receiver, set
include_metadatato keep the request headers. - In the batch processor, when the pipeline has one, name the header in
metadata_keys, so that each batch holds the exports of one key. - On the Uplink exporter, set the header
from_contextwith a header setter. When an export has no key, the setter sends an empty header, and Uplink treats it as absent. - Turn off compression on the Uplink exporter. Uplink refuses compressed requests, and the
otlphttpexporter and the Alloy client compress with gzip by default.
<uplink-endpoint> with https://uplink.agent.golf for Cloud Uplink, or with the listener of your Self-Hosted Uplink instance, for example https://uplink.example.internal:4318. For Cloud Uplink, the Collector Setup card on Settings > Uplink > Cloud shows the same configuration with your endpoint.
- OpenTelemetry Collector
- Grafana Alloy
Use the
headers_setter extension of the contrib distribution:401, so make sure that each harness sends its key.
Session content
By default, Claude Code, omp, and the GitHub Copilot CLI send only the shape of their activity: lengths, tool names, and token counts. Codex also sends tool arguments and tool output by default. The GitHub Copilot extension for VS Code sends prompts and tool content with every setting. Each harness has settings that add more content, such as prompt text. The CLI and the Harness Setup card turn on every content setting. Remove the settings that your policy does not allow before you use the harness. Each harness page lists its content settings. The harness sends this content only to the uplink instance. A Self-Hosted Uplink instance keeps it on your infrastructure, and Agent Golf receives only opaque references to it. Cloud Uplink keeps it on Agent Golf infrastructure. See What Leaves Your Network. With less content, the dashboard has less to show, and Agent Golf links fewer sessions to pull requests automatically.Link a session to a pull request
When automatic attribution finds no pull request for your session, you can link it by hand. See Link a session by hand.Verify the setup
- Start a session in the harness and send a prompt.
- Open Sessions in the dashboard. The session shows in Recent Sessions. To find it, set the Harness filter to your harness.
http/protobuf). For Cloud Uplink, see Verify the setup. For a Self-Hosted Uplink instance, see Troubleshoot Uplink.