You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: config-file telemetry opt-out is bypassed on the main thread (Config.get() unavailable before Instance) #1296
Found during the v0.11.1 release review (Chaos Gremlin / privacy persona). Deferred because: needs a design decision on how doInit() should read the user's global config without an Instance.
Problem.Telemetry.doInit() (packages/opencode/src/altimate/telemetry/index.ts) reads telemetry.disabled through Config.get(), which throws outside an Instance context. On failure it proceeds as enabled. The CLI middleware in packages/opencode/src/index.ts calls Telemetry.init() before Instance.provide(), so on the main thread a config-file opt-out ("telemetry": {"disabled": true} in the global altimate-code.json) is not honored for main-thread events (onboarding, first_launch, startup_ready, main-thread event_loop_stall). Only the env-var opt-out (ALTIMATE_TELEMETRY_DISABLED / OPENCODE_DISABLE_TELEMETRY) is reliable there.
v0.11.1 fixed the same bypass on the TUI worker (init moved inside Instance.restore), but the main-thread path is pre-existing and remains.
Also missing: no test anywhere exercises the config-file opt-out; only the env vars are tested (test/telemetry/telemetry.test.ts).
Suggested fix. When Config.get() throws, fall back to reading the global config files under Global.Path.config directly (same list config.ts merges) for the single telemetry.disabled key, and add a test that a config-file opt-out disables telemetry both inside and outside an Instance.
Closing as fixed on main: Telemetry now falls back to reading the global config's telemetry.disabled when Config.get() is unavailable outside an Instance. Please reopen if you still see this on v0.12.9 or later.
Activity
fix: honor the documented `telemetry.disabled` config opt-out; harden…
anandgupta42 commentedon Nov 5, 2026
Closing as fixed on
main: Telemetry now falls back to reading the global config'stelemetry.disabledwhenConfig.get()is unavailable outside an Instance. Please reopen if you still see this on v0.12.9 or later.