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
Add a local telemetry system inspired by VS Code's telemetry model (https://code.visualstudio.com/docs/configure/telemetry). The system should collect crash reports, error telemetry, and usage data locally, display telemetry events in the Output panel, and respect user privacy with configurable telemetry levels.
Context
AgentDeck currently has no telemetry whatsoever. When issues occur (crashes, errors, performance problems), there is no diagnostic data to help identify root causes. Additionally, there is no usage data to inform product decisions about which features are most valuable.
VS Code's telemetry model is the natural reference since AgentDeck's UX is inspired by VS Code. However, unlike VS Code (which sends data to Microsoft), AgentDeck should store all telemetry locally only in its existing SQLite store, consistent with the local-first architecture. Remote telemetry can be considered as a future opt-in feature.
Scope
Telemetry Levels
Adopt VS Code's telemetry.telemetryLevel model with four levels:
Level
Crash Reports
Error Telemetry
Usage Data
all
✓
✓
✓
error
✓
✓
-
crash
✓
-
-
off
-
-
-
Default level: all (with clear disclosure in the welcome/onboarding experience).
Event Types and Classification
Three event categories matching VS Code:
Crash Reports — unhandled exceptions and process crashes in main/renderer/preload. Collected via crash handlers in main and window.onerror / window.onunhandledrejection in renderer. Includes scrubbed stack traces (no user file paths).
Error Telemetry — handled errors that don't crash the app but are unexpected (IPC failures, service initialization errors, file operation failures). Includes error name, message, and scrubbed callstack.
Usage Data — feature usage events: panel opened (explorer/search/chat/settings), file opened, chat message sent, model selected, workspace opened, command executed, session duration. No file contents, no code snippets, no personal data.
Add TelemetryService class in packages/services/src/telemetry.ts
Initialize during desktop service bootstrap (after settings service)
Hook into crash handlers for crash/error collection
Provide recordEvent(type, category, name, data, classification) method for usage events from any service
Respect telemetry level — no-op when set to off
Renderer Integration
Add telemetry.ts module in packages/workbench/src/ for renderer-side event collection
Hook into window.onerror and window.onunhandledrejection
Send usage events to main process via IPC
Subscribe to telemetryEvent channel for output channel display
Privacy and GDPR
All telemetry stored locally — no network transmission in MVP
No file contents, source code, API keys, tokens, or personal data in events
Stack traces scrubbed of user home directory paths
User can disable all telemetry via telemetry.telemetryLevel: 'off'
User can clear all telemetry data at any time
Privacy notice displayed on first launch (or in Welcome view) explaining what is collected
SECURITY.md updated to document telemetry practices
Rationale
A local telemetry system is essential for diagnosing issues in a desktop application where users cannot easily report bugs with reproducible steps. The VS Code model is well-understood, privacy-respecting, and provides a proven framework. Keeping all data local aligns with AgentDeck's local-first architecture while still providing diagnostic value. The output channel pattern gives power users visibility into what is collected, building trust.
Benefits
Diagnose crashes and errors without requiring user bug reports
Understand feature usage to prioritize development
Output channel transparency builds user trust
Local-only storage respects privacy and works offline
Configurable levels give users control
Foundation for future: remote opt-in telemetry, performance profiling, A/B experimentation
Definition of Done
TelemetryService class in packages/services/src/telemetry.ts with SQLite storage
Telemetry level setting (all/error/crash/off) integrated into Settings Service
Crash report collection via crash handlers in main process
Error telemetry collection from service failures across all packages
Objective
Add a local telemetry system inspired by VS Code's telemetry model (https://code.visualstudio.com/docs/configure/telemetry). The system should collect crash reports, error telemetry, and usage data locally, display telemetry events in the Output panel, and respect user privacy with configurable telemetry levels.
Context
AgentDeck currently has no telemetry whatsoever. When issues occur (crashes, errors, performance problems), there is no diagnostic data to help identify root causes. Additionally, there is no usage data to inform product decisions about which features are most valuable.
VS Code's telemetry model is the natural reference since AgentDeck's UX is inspired by VS Code. However, unlike VS Code (which sends data to Microsoft), AgentDeck should store all telemetry locally only in its existing SQLite store, consistent with the local-first architecture. Remote telemetry can be considered as a future opt-in feature.
Scope
Telemetry Levels
Adopt VS Code's
telemetry.telemetryLevelmodel with four levels:allerrorcrashoffDefault level:
all(with clear disclosure in the welcome/onboarding experience).Event Types and Classification
Three event categories matching VS Code:
Crash Reports — unhandled exceptions and process crashes in main/renderer/preload. Collected via crash handlers in main and
window.onerror/window.onunhandledrejectionin renderer. Includes scrubbed stack traces (no user file paths).Error Telemetry — handled errors that don't crash the app but are unexpected (IPC failures, service initialization errors, file operation failures). Includes error name, message, and scrubbed callstack.
Usage Data — feature usage events: panel opened (explorer/search/chat/settings), file opened, chat message sent, model selected, workspace opened, command executed, session duration. No file contents, no code snippets, no personal data.
Event Schema
Each telemetry event stored as:
Storage
packages/services/src/telemetry.ts)telemetry_events (id, timestamp, type, category, name, data JSON, classification)Telemetry Output Channel
Developer: Show Telemetrycommand, stream telemetry events to the output channel in real-time[timestamp] [type] category.name: {data}telemetry.logfile in the app's user data directory for offline inspectionSettings Integration
telemetry.telemetryLevelsetting (all/error/crash/off) to the Settings ServiceIPC Channels (new)
Add to
IPC_CHANNELSinpackages/shared/src/ipc.ts:telemetryGetLevel=agentdeck:v1:telemetry:get-leveltelemetrySetLevel=agentdeck:v1:telemetry:set-leveltelemetryGetEvents=agentdeck:v1:telemetry:get-eventstelemetryClearEvents=agentdeck:v1:telemetry:clear-eventstelemetryEvent=agentdeck:v1:telemetry:event(push from main to renderer)Shared Types (new)
Add to
packages/shared/src/ipc.ts:TelemetryLevel:'all' | 'error' | 'crash' | 'off'TelemetryEventType:'crash' | 'error' | 'usage'TelemetryEvent: the event schema defined aboveTelemetrySettings:{ level: TelemetryLevel, outputTracing: boolean }Main Process Integration
TelemetryServiceclass inpackages/services/src/telemetry.tsrecordEvent(type, category, name, data, classification)method for usage events from any serviceoffRenderer Integration
telemetry.tsmodule inpackages/workbench/src/for renderer-side event collectionwindow.onerrorandwindow.onunhandledrejectiontelemetryEventchannel for output channel displayPrivacy and GDPR
telemetry.telemetryLevel: 'off'SECURITY.mdupdated to document telemetry practicesRationale
A local telemetry system is essential for diagnosing issues in a desktop application where users cannot easily report bugs with reproducible steps. The VS Code model is well-understood, privacy-respecting, and provides a proven framework. Keeping all data local aligns with AgentDeck's local-first architecture while still providing diagnostic value. The output channel pattern gives power users visibility into what is collected, building trust.
Benefits
Definition of Done
TelemetryServiceclass inpackages/services/src/telemetry.tswith SQLite storageall/error/crash/off) integrated into Settings Servicetelemetry.logfile in user data directorypackages/shared/src/ipc.tsoffSECURITY.mdupdated with telemetry documentationMilestone
1.0 Stabilize MVP