Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

Claude Desktop keeps a persistent install ID even after you log out

Switching Claude accounts on the same computer does not clear the traces. On first launch, Claude Desktop creates an ant-did file with a random install number and sends it in the anthropic-device-id header. The console tool Claude Code stores its own device_id in ~/.claude.json, and the /logout command does not remove it. So when you hand over a laptop or switch accounts, you need to clear the client settings folders, not just the cookies.

AI-processed from Habr AI; edited by Hamidun News
Claude Desktop keeps a persistent install ID even after you log out
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1ant-did lives in the Claude folder (%APPDATA% or ~/.config) and survives logout
Key metric #2After /logout, Claude Code deletes trustedDeviceToken but keeps device_id
Key metric #3The computer name (hostname) is sent when a trusted device is registered

Logging out of Claude does not erase the persistent install identifier from your computer. This follows from a recent analysis on Habr. When Claude Desktop launches for the first time, it creates an ant-did file.

It contains a random number (a UUID) that serves as the identifier of this specific installation. The number is sent to the server in the anthropic-device-id header and stays on disk even if you log out and sign in with a different account. The command-line coding assistant Claude Code (CLI, meaning it runs from the terminal) also keeps its own device_id in the ~/.

claude.json config, and the /logout command does not delete it. Put simply, you can change accounts, but the computer's "apartment number" stays the same.

Caveats. The author admits to using AI to structure the text. He relies on third-party reverse-engineering projects: tengu-decoded for Claude Code v2.1.300 and mikeSP's analysis for v2.1.294. Anthropic has not confirmed these findings and does not disclose which signals actually feed into account blocks. The official Supported Regions Policy only prohibits using the service while physically located in an unsupported region. So the material is best read as a description of what the clients send, not as instructions.

What Claude Desktop transmits

The app is built on Electron: a browser engine (Chromium) combined with a Node.js runtime that has access to the operating system. As a result, it can see more than an ordinary browser tab.

The ant-did file lives at %APPDATA%\Claude\ant-did on Windows and at ~/.config/Claude/ant-did on Linux. If you sign in with a new account without deleting the profile, the identifier stays the same. Besides it, the client sends headers with the platform type, OS version, device class, rounded RAM size, and app version. When a trusted device is registered, the server receives the real computer name from os.hostname(). The system locale is also taken into account. The app includes Sentry, Datadog, and Statsig, which collect errors, metrics, and data for feature flags.

What remains after /logout in Claude Code

Analysis of the CLI reveals a notable detail. The machine UUID that the OS assigns itself (machine-id) is stripped out before anything is sent over the network. But Claude Code's own identifiers are stored in config files:

  • userID and machineID are kept in ~/.claude.json and remain in the file after /logout;
  • device_id is described there as a persistent client identifier that survives logout;
  • remoteControlMachineId stays in the file and is sent only to the remote control bridge;
  • in ~/.claude/.device-keys.json, a new key pair is created for the new account, while the old one remains;
  • trustedDeviceToken is deleted on /logout.

The machine name, OS, architecture, and list of IDEs are always read and sent. Repository context also ends up in telemetry: the git remote and head_sha (the latter only for Pro/Max plans). If you open the same project under a different account, this data will match.

To cleanly switch accounts, the article suggests deleting ~/.claude and ~/.claude.json or pointing to a new directory via the CLAUDE_CONFIG_DIR variable. The warning is reasonable: this will wipe your settings, custom agents, MCP configurations, and local session history, so a backup comes first.

Telemetry, the browser, and phones

According to the Claude Code documentation, setting CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 disables not only telemetry and error reporting but also feature flags along with auto-updates. DISABLE_TELEMETRY=1 and DISABLE_ERROR_REPORTING=1 work more narrowly. There is no evidence that disabling telemetry affects account checks.

In the browser, the time zone and language come from the OS. So a VPN with a foreign IP does not hide the local time zone or the Accept-Language header. Fingerprinting via WebGL, Canvas, and fonts is technically possible, but for claude.ai the author states plainly that the use of such data has not been proven. For phones, he describes the standard mechanisms of the operating systems: Keychain entries on iOS survive reinstalling the app. He did not analyze the mobile builds themselves.

What practitioners should do

Local AI assistant clients accumulate persistent identifiers that are not reset by logging out. If you hand over a work laptop, keep personal and corporate accounts on one machine, or build an image for a team, separate Claude configs into distinct profiles or directories via CLAUDE_CONFIG_DIR. When the machine changes owners, these directories must be cleared. A separate virtual machine or container for each context removes the issue altogether. Also keep in mind that repository identifiers in telemetry can link projects across accounts.

The limitations of the source are clear: client versions change quickly, the conclusions rest on reverse engineering, and the references to user reports about identity checks via Persona have not been verified. Using the service from an unsupported region violates Anthropic's rules, and the risk of a block remains with the user.

Story

Key Questions Answered

What Claude Desktop transmits?

The app is built on Electron: a browser engine (Chromium) combined with a Node.js runtime that has access to the operating system. As a result, it can see more than an ordinary browser tab. The ant-did file lives at %APPDATA%\Claude\ant-did on Windows and at ~/.config/Claude/ant-did on Linux. If you sign in with a new account without deleting the profile, the identifier stays the same. Besides it, the client sends headers with the platform type, OS version, device class, rounded RAM size, and app version.

What remains after /logout in Claude Code?

Analysis of the CLI reveals a notable detail. The machine UUID that the OS assigns itself (machine-id) is stripped out before anything is sent over the network. But Claude Code's own identifiers are stored in config files: userID and machineID are kept in ~/.claude.json and remain in the file after /logout; device_id is described there as a persistent client identifier that survives logout; remoteControlMachineId stays in the file and is sent only to the remote control bridge; in…

What are the key details on Telemetry, the browser, and phones?

According to the Claude Code documentation, setting CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 disables not only telemetry and error reporting but also feature flags along with auto-updates. DISABLE_TELEMETRY=1 and DISABLE_ERROR_REPORTING=1 work more narrowly. There is no evidence that disabling telemetry affects account checks. In the browser, the time zone and language come from the OS. So a VPN with a foreign IP does not hide the local time zone or the Accept-Language header.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Free · Waitlist · Hermes + DeepSeek

Free 2-Day Vibecoding & AI Agents Intensive

Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.

Join the waitlist →Nomad AI Workspace
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Claude Desktop keeps a persistent install ID even after you log out https://news.hamidun.com/en/news/18402/claude-desktop-keeps-a-persistent-install-id-even-after-you

What do you think?
Loading comments…