Statsig telemetry floods with thousands of short-lived DNS queries in Termux/Android proot environments (related #8243)
Issue Description
Observed via PCAP Droid: thousands of rapid UDP DNS queries to statsig.anthropic.com, each using a new ephemeral port, even when Claude Code is idle.
Root cause: Statsig client performs aggressive retries without exponential backoff/jitter on DNS resolution failure.
Termux/proot-distro on Android routinely experiences partial/intermittent DNS (due to netd hooks, VPN, private DNS), triggering sustained bursts of failed queries.
---
Consequences on Constrained Devices
- Ephemeral port exhaustion risk (thousands of short-lived connections)
- Battery/network drain from continuous failed DNS lookups
- Connection tracker overflow in network monitoring tools
- Performance degradation on devices with limited RAM (4GB or less)
---
Related Issue
This is related to #8243 (tens of thousands of failed HTTPS requests when blocked, with no backoff).
The same pattern occurs at the DNS layer in environments with intermittent DNS resolution.
---
Requests
- Add exponential backoff + jitter to Statsig retry logic
- Auto-detect constrained/mobile environments and throttle telemetry accordingly
- Make
DISABLE_TELEMETRY=1the effective default in low-resource setups (or document prominently)
---
Current Workaround
Manual opt-out via DISABLE_TELEMETRY=1 works, but default behavior punishes edge deployments and mobile users.
Hard block via /etc/hosts:
echo "0.0.0.0 statsig.anthropic.com" >> $PREFIX/etc/hosts
echo "0.0.0.0 statsig.com" >> $PREFIX/etc/hosts
---
Environment
- OS: Android 12+ (Linux 5.10.226-android12)
- Platform: Termux proot-distro Ubuntu
- Architecture: ARM64 (aarch64)
- RAM: 4GB
- Network: Mobile with intermittent DNS (VPN, private DNS, netd filtering)
---
Additional Context
The excessive DNS queries appear even when:
- Claude Code is idle (no active operations)
- Network connectivity is stable
- Other applications work normally
The Statsig client seems to retry indefinitely without proper backoff, creating thousands of DNS requests in a short period.
This behavior is particularly problematic on:
- Mobile devices with limited resources
- Networks with DNS filtering or private DNS
- VPN environments
- Environments with connection tracking/monitoring
---
Thank you for addressing this. The tool is valuable, but the telemetry behavior makes it unusable on resource-constrained environments without manual intervention.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗