Hugging Face fingerprints which coding agent you run
The huggingface_hub library tags every Hub request with the coding agent driving it. HF_HUB_DISABLE_TELEMETRY does not turn it off. Here is what leaks.
Your coding agent wears a name badge, and it hands it over on every Hugging Face request. The huggingface_hub Python library detects which agent harness is driving it — Claude Code, Codex, Cursor, Copilot — and stamps that name into the User-Agent header on every call to the Hub. It is documented, it is deliberate, and the aggregate numbers ship as a public dataset. Most teams running AI coding agents have no idea it happens.
What actually happened
This is not a leak or a bug. It is a feature Hugging Face documents openly: "When huggingface_hub detects it is running inside a registered harness, it reports it via the user agent on Hub requests."
The mechanics are worth reading. _http_user_agent() in _headers.py calls detect_agent() and, when it returns a name, appends ; agent/<name> to the header. Detection itself reads environment variables: the universal AI_AGENT and AGENT, plus per-tool variables pulled from a registry the library fetches from /api/agent-harnesses and caches for 24 hours.
That registry is a public file — agent-harnesses.ts — with 26 entries today. Claude Code is spotted via CLAUDECODE or CLAUDE_CODE. Codex via CODEX_SANDBOX, CODEX_CI, CODEX_THREAD_ID. Cursor CLI via CURSOR_AGENT. GitHub Copilot via COPILOT_MODEL and siblings. Replit via REPL_ID. Zed via ZED_TERM.
The August 2026 dataset, updated September 7, puts Claude Code at 46.53% of agent-attributed requests and 38.71% of distinct authenticated users. Codex takes 17.52% and 23.34%. Cursor CLI takes 14.04% and 5.38%.
Here is the detail nobody mentions: HF_HUB_DISABLE_TELEMETRY=1 does not suppress the agent token. In _headers.py that flag gates whether your torch version gets appended. detect_agent() runs outside the branch.
Why this matters for your business
Two things, and they point opposite directions.
If you pull models, know what you disclose. The header carries your tool choice, and when a token is set it rides alongside an authenticated user. Not your code, not your repo — but "this account runs Claude Code" is metadata you did not decide to publish. If you build under NDA for clients, that belongs in the same bucket as any other outbound telemetry: inventoried, or turned off. There is no supported off switch, so the control is environmental — strip the detection variables from the shell that runs the job, or make the call over plain HTTP, which the library never tags.
If you cite the numbers, cite them honestly. Attribution only covers traffic through huggingface_hub and the hf CLI. Raw HTTP is invisible. Unregistered tools bucket into unknown. This is a floor on agent traffic, not a market-share census, and anyone quoting it as one is selling something.
Key takeaways
huggingface_hubappends; agent/<name>to the User-Agent when it detects a registered coding-agent harness- Detection reads
AI_AGENT/AGENTplus per-tool env vars from a registry fetched from the Hub and cached 24 hours - 26 harnesses are registered, including Claude Code, Codex, Cursor CLI, GitHub Copilot, Replit and Zed
HF_HUB_DISABLE_TELEMETRY=1does not disable it — that flag only gates the torch version string- August 2026 public data: Claude Code 46.53% of requests, Codex 17.52%, Cursor CLI 14.04%
- Raw HTTP calls and unregistered tools are never attributed, so the dataset is a floor, not a census
Do you know what your build environment sends outbound? We audit the telemetry surface of AI dev tooling and wire agent workflows you can actually inspect. See how we set that up, or send us your current stack.
Sources: Hugging Face Hub docs — Agents, huggingface/agent-usage dataset.
- #hugging-face
- #coding-agents
- #telemetry
- #developer-tools
- #ai-agents
Tommy Rush — Founder, Rush Commerce
Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More
Get The Rush Report weekly — one email, zero fluff.
Keep reading
Real-SWE: best coding agent scores 38.8% on real repos
A new benchmark runs eight frontier models against private production codebases. Top score is 38.8%. Why SWE-bench numbers don't predict your repo.
Read itSalesforce's AI agent control plane ships in FY28
Salesforce introduced the Trusted Enterprise AI Harness on September 10, 2026. The unified experience rolls out in FY28. Here's what to build yourself now.
Read it