How Telemetry Works in Open Interpreter and How to Disable It
Open Interpreter collects anonymous usage data through PostHog, but provides three distinct methods to disable telemetry entirely.
Open Interpreter, the popular open-source code execution framework, includes a lightweight telemetry system to help maintainers understand usage patterns. While the system is designed to be privacy-preserving and anonymous, users who prefer complete data privacy can easily opt out through multiple configuration methods.
How Telemetry Works in Open Interpreter
The telemetry implementation resides primarily in interpreter/core/utils/telemetry.py and is gated by the anonymous_telemetry property defined in interpreter/core/core.py. When enabled, the system transmits event data to PostHog using a hard-coded API key and endpoint.
User Identification and UUID Generation
On first execution, Open Interpreter generates a unique identifier to distinguish recurring users from new ones. The system creates a UUID and persists it to ~/.cache/open-interpreter/telemetry_user_id. This identifier is reused across all subsequent sessions, allowing maintainers to track retention without identifying individual users personally.
The relevant logic appears in telemetry.py between lines 22-38, where the code checks for existing cache files and generates new identifiers when none exist.
Event Collection and Transmission
Telemetry events trigger at specific points in the application lifecycle, such as when a chat session begins or when errors occur. The send_telemetry() function constructs a JSON payload containing:
- The event name (e.g., "started_chat")
- The package version (
oi_version) - Contextual properties (terminal UI status, message type, OS mode)
- The hard-coded PostHog API key:
phc_6cmXy4MEbLfNGezqGjuUTY8abLu0sAwtGzZFpQW97lc
The function then POSTs this data to https://app.posthog.com/capture as implemented in telemetry.py lines 47-60.
Data Privacy and Content Handling
The telemetry system explicitly excludes user-generated content from transmission. According to the source code analysis, the payload contains only metadata about the execution environment and event types, not the actual code being executed or the natural language prompts provided by users.
How to Disable Telemetry in Open Interpreter
Open Interpreter respects user privacy preferences through three equivalent disablement methods. The telemetry gating logic in core.py (lines 53-56) checks both the disable_telemetry attribute and offline mode status to determine whether to transmit data.
Method 1: Command-Line Flag
When launching Open Interpreter from the terminal, append the --disable_telemetry flag to prevent any telemetry initialization:
interpreter --disable_telemetry
This option is parsed in interpreter/terminal_interface/start_terminal_interface.py and sets the appropriate configuration before the interpreter initializes its core components.
Method 2: Python API
When using Open Interpreter programmatically in Python scripts, set the disable_telemetry attribute to True immediately after importing:
from interpreter import interpreter
interpreter.disable_telemetry = True
interpreter.chat("List the files in the current directory")
This approach ensures that all subsequent send_telemetry() calls are blocked by the anonymous_telemetry property check in the core interpreter class.
Method 3: Environment Variable
For containerized environments or CI/CD pipelines, set the DISABLE_TELEMETRY environment variable before launching the interpreter:
export DISABLE_TELEMETRY=true
interpreter
This method is documented in the telemetry module header (telemetry.py lines 4-8) and provides a configuration-as-code approach for infrastructure teams.
Summary
- Open Interpreter uses PostHog for anonymous telemetry collection, storing a persistent UUID in
~/.cache/open-interpreter/telemetry_user_id. - The
send_telemetry()function ininterpreter/core/utils/telemetry.pytransmits event metadata (not user content) to PostHog's capture endpoint. - Telemetry can be disabled via three methods: the
--disable_telemetryCLI flag, settinginterpreter.disable_telemetry = Truein Python, or exportingDISABLE_TELEMETRY=trueas an environment variable. - The
anonymous_telemetryproperty ininterpreter/core/core.pygates all telemetry calls, ensuring disabled settings are respected throughout the application lifecycle.
Frequently Asked Questions
What data does Open Interpreter telemetry collect?
Open Interpreter telemetry collects only anonymous metadata about application usage, including the event type (e.g., "started_chat"), the package version (oi_version), whether the terminal UI is active, and the operating system mode. The system explicitly excludes user-generated content such as code snippets, natural language prompts, or execution outputs from the telemetry payload.
Is the telemetry data in Open Interpreter anonymous?
Yes, the telemetry system is designed to be anonymous. It generates a random UUID stored in ~/.cache/open-interpreter/telemetry_user_id to identify recurring sessions without linking to personal information. This identifier contains no email addresses, IP addresses, or hardware fingerprints, and the PostHog configuration uses a hard-coded API key without user-specific authentication.
Where is the telemetry user ID stored?
The telemetry user ID is stored as a plain text file at ~/.cache/open-interpreter/telemetry_user_id on Unix-like systems (Linux and macOS). On Windows, this path resolves to the appropriate cache directory under the user's home folder. This UUID persists across interpreter sessions to help maintainers understand retention metrics while respecting user privacy.
Can I verify that telemetry is disabled?
While Open Interpreter does not provide a specific "telemetry status" command, you can verify disablement by setting the DISABLE_TELEMETRY environment variable to true or using the --disable_telemetry flag and monitoring network traffic. When properly disabled, the interpreter will not execute the send_telemetry() function in interpreter/core/utils/telemetry.py, and no HTTPS requests to app.posthog.com will occur during normal operation.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →