Case Studies

ZCode Quietly Uploads Git History: Where Do Agent Permissions End?

A GLM-based coding agent was caught silently uploading full Git histories without user consent, hitting 70 points on Hacker News. The real question isn't about one vendor — it's about transparency across the entire Agent toolchain.

Font size

ZCode, a coding agent built on Zhipu's GLM model family, was recently exposed for silently uploading complete Git histories to its servers without telling users. The report at tokenstead.ai/guides/zcode-silent-git-history-upload landed on the Hacker News front page, scoring 70 points and pulling in 16 comments.

70 points on HN is no small feat — it clears the threshold for a genuinely hot post, well above the bar for a routine tech gripe. That tells you the overseas developer community felt this one personally.

After reading the original piece, the question worth asking isn't whether Zhipu owes an apology. It's more fundamental: when you install an AI agent, what is it actually doing in the background?


What Actually Happened

ZCode is Zhipu's (THUDM) GLM-based coding agent, positioned alongside Cursor and Windsurf as an AI pair-programming tool.

The issue is its data collection: without explicit user consent, ZCode packaged the entire local .git directory and sent it to the server.

Breaking that down:

  • Not single files — the full .git directory
  • Not real-time sync — appears to be an initialization step on install or first launch
  • No visible warning — no progress bar, no confirmation dialog in the UI

Opening the original HN thread (item 49752422), the top comments all circle back to the same question: "Does their ToS actually say this?" and "Is this a bug or a feature?"

Whether it's a bug or product design intent — I haven't seen an official response. But judging by the density of the HN discussion, overseas developers read this as a product design issue, not something that can be dismissed as a technical mishap.


Why Git History Is More Sensitive Than Code Snippets

First reaction from a lot of people: "My code is public anyway, who cares?"

That's a misconception. Git history hides far more than the current working tree:

  • Author emails — your @company.com addresses all spill out, effectively handing over a team roster
  • Commit timelines — who fixed a bug at 3 AM, who shipped non-stop for a week; a behavioral profile
  • Deleted code — things committed and later removed, including debug logs, temp variables, accidentally-checked-in passwords
  • Merge conflict originals — mid-rebase states that often carry sensitive debug info
  • Branch names — something like feature/stripe-webhook-fix doubles as a product roadmap leak

Compare this to the older Cursor / Copilot privacy debates. Those centered on "code snippets might be used for training," but the premise was user-submitted code or actively-edited content in the IDE.

ZCode's twist: you did nothing. Install it, open a repo, and it walks away with your history. That's the difference between passive collection and active use.


The Trust Ledger for Chinese AI Tools Going Overseas

Zhipu (THUDM) is a top-tier Chinese model lab — GLM-4 and GLM-4.5 have solid open-source rankings. How might this play out?

Lining up past incidents for context:

  • DeepSeek (early 2025): Italian and German data regulators opened reviews; App Store removals in some regions
  • TikTok: US congressional hearings, forced-sale legislation — a state-level matter
  • Qwen / Tongyi: occasional data compliance chatter, but nothing escalating to regulators

ZCode is a different category entirely:

IncidentCategoryRegulatory response
TikTokNational securityLegislative mandate
DeepSeekData export / regulatory gray zoneRegional removal
ZCodeCorporate product behaviorCommunity discussion

TikTok is geopolitics. DeepSeek sits in a gray zone around data compliance. ZCode is a straightforward product design issue.

But overseas developer memory stacks. One ZCode incident won't tank GLM's reputation on its own, but it adds another layer to the "default to suspicion of Chinese AI tools" baseline.


The 'Default Permissions' Problem Across All Coding Agents

Zoom out. This isn't just ZCode — almost every coding agent has some version of this issue:

  • Cursor: needs filesystem and network access, but the permission scope is visible
  • Windsurf: a VSCode fork, telemetry on by default (can be disabled)
  • Cline / Continue: VSCode extensions, permissions gated by the VSCode sandbox
  • Claude Code: Anthropic's tool, with detailed tool-call logging
  • ZCode: the current flashpoint

When you install an agent, what exactly are you consenting to?

Here's a checklist I run personally:

# 1. Check the process's network activity
sudo lsof -i -P -n | grep -i "cursor\|cline\|continue\|zcode"

# 2. Inspect configs and caches under ~/.config
ls -la ~/.config/Cursor/ 2>/dev/null
ls -la ~/.config/Code/User/globalStorage/ 2>/dev/null

# 3. Search your own Git history for sensitive info (check yourself first)
git log --all --full-history -- "*password*" "*.env*"
git log --all -p -S "API_KEY" --source

# 4. Capture actual outbound traffic (needs mitmproxy or Wireshark)
mitmproxy --mode transparent

Step 3 is the brutal one. Run that git log -p and you'll find passwords, API keys, internal URLs scattered across years of history. In other words: even if ZCode never uploaded anything, your own repo history is a ticking time bomb.


Editorial Take: What This Actually Signals

I'm not buying the dominant narrative. The press and the community keep framing this as "ZCode violated trust" or "Zhipu must answer for it." That misses the root.

The real signal is this: users have no mental model for what an agent needs to send over the network.

In the old IDE era, tools were local. You installed an extension and it read your files, highlighted syntax, ran an LSP — barely touching the network. Copilot was the first tool to get developers broadly comfortable with "my code goes to the cloud," but even then, the debate stayed at "will it be used for training?" Nobody was asking about the much larger surface area of permissions an autonomous agent actually needs.

An agent isn't a completion tool. It's an autonomous executor. It needs:

  • Read access to your files (read permission)
  • Ability to run shell commands (execution permission)
  • Access to external APIs (egress permission)
  • Persistent context (storage permission)

Stack those four together and you've got a process with network egress, full filesystem read, and arbitrary command execution. Choosing to install something like that is a fundamentally different decision from picking a VSCode theme.

Current product design treats both as the same thing — a single "one-click install" button. Users never get to layer their consent, and vendors have no incentive to build that (it would just make the product look "less secure").

My prediction: within 12 months, dedicated agent permission audit tools will emerge — something like AppOps on mobile, telling users "this agent read these files, called these APIs, and sent this much data out this month." Big players like Cursor and Anthropic may build this in, but open-source, independent audit tools are sure to show up.

What I'm not sure about is the responsibility split. Does the international build of ZCode behave the same as the domestic one? Is "not clearly disclosed" a product bug, a compliance oversight, or a deliberate product positioning choice? I haven't seen an official technical statement from Zhipu, and I shouldn't assert that any "apology" has been issued — so no conclusion there.

But one thing is certain: the permission model for the agent era has to be rebuilt from scratch.


References:

Source: https://tokenstead.ai/guides/zcode-silent-git-history-upload