fix(cli): skip startup work for informational commands - #12659
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The previous WARNING (raw Files Reviewed (3 files)
Previous Review Summary (commit 39f65ef)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 39f65ef)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (5 files)
Reviewed by claude-sonnet-5 · Input: 30 · Output: 6.6K · Cached: 641K Review guidance: REVIEW.md from base branch |
Issue
No linked issue. This addresses CLI startup latency and unnecessary network requests from informational commands.
Context
Commands such as
kilo --helpandkilo --versiondo not require configuration, authentication, telemetry, or shutdown lifecycle work. Running that lifecycle added latency and could contact the Kilo API and telemetry endpoint.Additionally, disabling telemetry did not prevent
updateIdentity()from requesting the authenticated Kilo profile.Implementation
Skip Kilo-specific bootstrap and shutdown work when help or version flags are present. Arguments after
--are excluded from detection so commands such askilo run -- --helpretain their normal behavior.Return immediately from
Telemetry.updateIdentity()when telemetry is disabled, avoiding the profile request and reducing startup time (for all commands) when telemetry is disabled.This intentionally leaves broader startup and code-splitting changes out of scope.
Screenshots / Video
N/A — no visual changes.
How to Test
Manual/local verification
Executed by the agent:
--helpand--version.strace; neither command made aconnect(2)call.Reviewer test steps
bun test ./test/kilocode/cli-shutdown.test.tsfrompackages/opencode.bun testfrompackages/kilo-telemetry.packages/opencode:bun run script/build.ts --single --skip-install--helpand--version.strace -f -e trace=connectand confirm there are no connection attempts.Blocked checks and substitute verification
None.
Checklist