feat: add X-KiloCode-MachineId header to API requests#331
Merged
chrarnoldus merged 3 commits intodevfrom Feb 17, 2026
Merged
Conversation
Add a new X-KILOCODE-MACHINEID header to API requests sent to the Kilo gateway. The machine ID is a persistent UUID that uniquely identifies the machine, reusing the existing telemetry identity system which stores the ID in the global XDG data directory (~/.local/share/kilo/telemetry-id). Changes: - Add HEADER_MACHINEID constant to kilo-gateway constants - Add machineId option to buildKiloHeaders function - Export HEADER_MACHINEID from kilo-gateway package - Send machine ID header on kilo provider API requests in session/llm.ts using Identity.getMachineId() from kilo-telemetry
Contributor
Author
Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (4 files)
|
Contributor
|
tested locally, didn't see a file show up in the working directory |
marius-kilocode
approved these changes
Feb 17, 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 a new
X-KILOCODE-MACHINEIDHTTP header to API requests sent to the Kilo gateway. The machine ID is a persistent UUID that uniquely identifies the machine.Details
The machine ID reuses the existing telemetry identity system (
Identity.getMachineId()from@kilocode/kilo-telemetry), which stores the ID in the global XDG data directory (~/.local/share/kilo/telemetry-id). If a machine ID already exists, it is reused; otherwise, a new UUID is generated and persisted.Changes
packages/kilo-gateway/src/api/constants.ts: AddHEADER_MACHINEIDconstant (X-KILOCODE-MACHINEID)packages/kilo-gateway/src/headers.ts: AddmachineIdoption tobuildKiloHeaders()andX_KILOCODE_MACHINEIDaliaspackages/kilo-gateway/src/index.ts: ExportHEADER_MACHINEIDpackages/opencode/src/session/llm.ts: Send machine ID header on Kilo provider API requests usingIdentity.getMachineId()Key design decisions
telemetry-idfile in the global XDG data directory — no data is written to the project/working directoryHEADER_PROJECTIDand otherX-KiloCode-*headersBuilt for Christiaan by Kilo for Slack
Built for Christiaan by Kilo for Slack