Skip to content

fix(cli): default KILO_PLATFORM to 'cli' for standalone CLI use#9759

Open
lambertjosh wants to merge 1 commit intomainfrom
fix/cli-default-kilo-platform
Open

fix(cli): default KILO_PLATFORM to 'cli' for standalone CLI use#9759
lambertjosh wants to merge 1 commit intomainfrom
fix/cli-default-kilo-platform

Conversation

@lambertjosh
Copy link
Copy Markdown
Contributor

Standalone kilo CLI usage is reported to PostHog as platform=darwin/linux/win32 instead of platform=cli, because the CLI entry point never sets KILO_PLATFORM and kilo-telemetry/telemetry.ts:60 falls back to process.platform. Over the last 7 days that accounts for ~9.8k users and ~891k LLM Completion events mis-tagged as OS values on the new v7 path (appName=kilo-cli).

Embedders that spawn kilo serve (VS Code extension, JetBrains plugin, cloud code-review, app-builder) already set KILO_PLATFORM themselves, and the cloud session-ingest path (kilo_meta.platform in kilo-sessions.ts:684) already defaults to "cli" — so this one-line default just aligns PostHog with the backend signal. Mirrors the shape of the existing KILOCODE_FEATURE default immediately above it.

Refs #9599. Does not address the broader overlap between KILO_PLATFORM, KILO_CLIENT, and KILOCODE_FEATURE — that's a separate cleanup.

Without this, kilo-telemetry falls back to process.platform so PostHog
'platform' rows show darwin/linux/win32 for the 9.8k+ weekly CLI users
instead of 'cli'. Embedders (VS Code, JetBrains, cloud code-review,
app-builder) already set KILO_PLATFORM themselves, so this only catches
the direct-CLI path. Mirrors the KILOCODE_FEATURE default just above.

Refs #9599
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 30, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .changeset/cli-default-kilo-platform.md
  • packages/opencode/src/index.ts

Reviewed by gpt-5.5-20260423 · 125,033 tokens

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.

1 participant