Hugging Face's Python client now reports which coding agent ran it

Share
Hugging Face's Python client now reports which coding agent ran it

A thread on r/LocalLLaMA surfaced a quiet line of instrumentation this week: the huggingface_hub Python library — the package most of the open-weights ecosystem uses to download models — detects which AI coding agent is driving your terminal and sends that name to Hugging Face's servers on every request.

Hugging Face's official Python client inspects your environment variables, decides whether Claude Code, Codex, Cursor or 23 other harnesses launched it, and appends the result to the User-Agent header on every Hub call. The detection lives in huggingface_hub/utils/_detect_agent.py: it matches tool-specific variables such as CLAUDECODE, CODEX_SANDBOX, CURSOR_TRACE_ID, GEMINI_CLI, COPILOT_MODEL, ZED_TERM and PI_CODING_AGENT, plus two universal ones — AI_AGENT and AGENT — that any harness can set. If one of those is set to a name Hugging Face doesn't recognise, the client still reports agent/unknown.

Two details make this more than a fingerprinting story. First, the list of harnesses is not in your code. _detect_agent.py fetches a registry from huggingface.co/api/agent-harnesses at most once a day and caches it at ~/.cache/huggingface/.agent_harnesses.json; today that registry names 26 harnesses, from Antigravity and Kiro to Devin, Trae and Hermes Agent. Adding a detector is a pull request to an open-source file, and every installed client picks it up within a day with no release on either side. Second, the data has a public destination: Hugging Face maintains an agent-usage dataset that publishes each harness's share of agent-attributed Hub traffic, monthly and daily, refreshed by a scheduled job — the current leaderboard runs through August and was updated September 7.

The token ships under the library's existing telemetry switch, so HF_HUB_DISABLE_TELEMETRY (or DO_NOT_TRACK / DISABLE_TELEMETRY) suppresses it, and offline mode suppresses the registry fetch that makes detection possible. The rollout began April 3, per Hugging Face's own dataset notes, which is why the comparison series starts in May. In the Reddit thread the reaction was divided rather than outraged — one commenter argued it is "no more dangerous than the user-agent HTTP header," and useful for tracing damage caused by careless testing at scale. The mechanism has a real cost, though: an open issue on the same repo reports seven false failures in an authentication test file purely because the agent token changes the User-Agent inside an agent session, which CI never sees.

Why it matters: agents are now a first-class account type on infrastructure they never agreed to be measured by. The Hub is learning which harnesses run the largest share of its traffic — knowledge nobody else in the stack has — and it is collecting it from inside a dependency most users never audit. Attribution and surveillance are the same feature viewed from opposite ends of the pipe, and the Hugging Face incident this summer is exactly why both sides want the answer. We covered the case for agent attribution last week — OpenAI's agents attacked RubyGems months before the Hugging Face breach — and nobody told us — and this is the infrastructure response: name the harness, or at least record that one was present.

What to watch: whether a harness refuses to be labelled. Every registered tool can defeat this by clearing its own environment variables before invoking Python, which would leave Hugging Face measuring only the honest.

Should a library be able to report which agent you used by default, or does that belong behind an opt-in? Write to us via our contact page.

Sources: huggingface_hub _detect_agent.py (GitHub) · huggingface_hub issue #4685 (GitHub)

Get SiliconNoon in your inbox

One email a day with the AI stories that matter — what happened, the numbers, and why it matters. No spam, unsubscribe in one click.

Read more

Minitap says Google's Artemis shipped its code with the credit stripped

Minitap says Google's Artemis shipped its code with the credit stripped

Google's Pixel test team open-sourced an Android automation agent this week. The team it was built on top of says the authorship trail was rewritten before anyone saw it. Minitap says Google's Artemis contains its code, and that the names of the people who wrote it were removed. Minitap published mobile-use in August 2025 under Apache 2.0 — an agent that drives real Android and iOS apps, 2,821 GitHub stars, and the reference implementation behind a clutch of mobile-agent papers.

NVIDIA open-sources an agent harness that redesigned itself

NVIDIA open-sources an agent harness that redesigned itself

NVIDIA's research arm published the code for a loop where agents studied other agents' transcripts and cut their own token bill. Meanwhile South Korea's central bank measured who actually gets the AI jobs. NVLabs released SoL-Pi, an MIT-licensed extension for the Pi coding agent that packages four efficiency mechanisms discovered by automated research loops rather than by engineers. It installs on an unmodified Pi release, and every mechanism is opt-in and off by default.

Block open-sources Berd, a desktop app for juggling AI agents across models

Block open-sources Berd, a desktop app for juggling AI agents across models

Block just dropped Berd into the open — a desktop app that lets you work with AI agents from any provider in a single window, released under Apache 2.0. The project, built on Tauri 2 and React 19, wraps Block's own Goose agent backend and already has 216 GitHub stars within days of going live. The bet is straightforward: as teams start using multiple AI agents for different tasks, they need one interface instead of five browser tabs.

DeepSeek's agent tool let the agent switch off its own sandbox

DeepSeek's agent tool let the agent switch off its own sandbox

Two separate failures at the same lab in one week, and both are about the same thing: what a model provider promises a developer it will keep. DeepSeek's local coding-agent tool let a sandboxed agent turn off its own file sandbox with a single command and no approval prompt. The flaw, now CVE-2026-82533 with a CVSS score of 9.4, sits in DeepSeek Harness, the open-source tool the lab released in August to run coding agents on a developer's own machine; the repository passed 216,000 GitHub stars…