ZCode ships your deleted secrets offsite
ZCode, Z.ai's GLM coding agent, silently encrypts and uploads your entire git history to Aliyun OSS with a key only Z.ai can decrypt. What it packs and how to stop it.
On September 18, 2026, a developer going by ferstar posted a reverse-engineering walkthrough of ZCode, the desktop coding agent from Z.ai, the Beijing company behind the open-weight GLM models. While the app is logged in, it packages the user’s entire workspace: the complete .git history, the LFS asset cache, reflogs, and global app configs. It encrypts the bundle and uploads it to Aliyun OSS, Alibaba Cloud’s object storage. ferstar’s own capture was a 313MB encrypted archive built from a 345MB commercial workspace of 42,411 files, with 564 failed upload attempts logged while the investigation ran.
The .git directory alone accounted for 86.6 percent of the payload, and that is the part worth sitting with. A git object store is not a snapshot of your working tree. It is the full lineage of the repository since the first commit. An API key you deleted in a later commit is still in the object store. So are branch names from unpushed work that telegraph unreleased plans, internal hostnames, and the repo paths sitting in .git/config. The archive is years of engineering history, not the files you had open.
What makes this more than noisy telemetry is the key handling. ZCode uses envelope encryption: the tar.gz payload is encrypted with AES-256-CTR, and the symmetric key is wrapped with an RSA-OAEP public key the server hands out during upload-credential negotiation. The matching private key lives only in Z.ai’s cloud. ferstar tried to unwrap the archive with every private key on the local machine and failed. The 313MB ciphertext sitting on the user’s own disk cannot be decrypted by the user, or by the ZCode client that wrote it. ferstar’s reading: “A key that only the server can use serves exactly one purpose: making sure the server can read your code whenever it wants.”
The pipeline, reconstructed from the client’s app.asar: the client asks zcode.z.ai for credentials and gets back OSS form signatures, an object key, a size cap, and a per-round RSA public key. It tars and gzips the workspace, encrypts, wraps the key, and POSTs straight to Aliyun OSS, which calls back to Z.ai’s backend to register the snapshot. During the test the running client held persistent connections to zcode.z.ai and two OSS nodes.
The toggles don’t stop it
Opening settings looks like the answer, and two switches seem relevant. “Optimize Experience” (optimizeAgentExperienceEnabled) only governs whether the data is authorized for model training. “Repo Snapshot Indexing” (repoSnapshotIndexingEnabled) only governs whether the server indexes what it receives. With both off, the client still packs and uploads.
The reason is architectural. The capture sidecar is instantiated at host startup, unconditionally, with no check against user preferences. Its only precondition is a token provider that can produce a valid JWT. ferstar logged 62 capture events in a single session, fired before every prompt and on task completion. The agent’s own tool surface, a 31-tool set recovered alongside a 131KB system prompt in the OrcaPromptVault collection, contains no snapshot, upload, or telemetry tool at all. The exfiltration runs outside the tool loop, so no permission setting stops it and the agent never sees it. Across that 131KB of instructions there is no mention of Aliyun, OSS, uploads, or privacy. The user-facing surface is the checkpoint and rewind feature, and the upload is what makes rewind possible.
ZCode’s privacy policy says it collects “text, files, and code submitted during conversations,” the inference-context line every coding tool ships. ferstar found nothing in the policy, FAQ, or changelog about packaging and uploading whole repositories and their histories.
The timing sharpens it. ZCode launched in July 2026 pitched explicitly against Anthropic’s Claude Code, weeks after the Claude Code telemetry controversy, with open weights sold as the way out of vendor kill switches. Asked on X whether ZCode would carry “any sort of spyware,” a Z.ai executive said the company would not implement “anything beyond what’s listed” on the ZCode site. Workspace snapshotting is not listed there. The most visible response to ferstar came from an account tied to the ZCode team: “hey I am sorry to let you find it.”
The fix that holds
Deleting the pending archive does nothing; the client rebuilt a fresh 313MB bundle within half an hour, retry counter climbing. The durable fix is to make the checkpoints directory unwritable at the kernel level.
Linux:
rm -rf ~/.zcode/v2/checkpoints
mkdir -p ~/.zcode/v2/checkpoints
sudo chattr +i ~/.zcode/v2/checkpoints
macOS:
rm -rf ~/.zcode/v2/checkpoints
mkdir -p ~/.zcode/v2/checkpoints
chflags uchg ~/.zcode/v2/checkpoints
The cost is the checkpoint rollback UI, the feature that needed the upload in the first place. Chat, autocomplete, and tool calls keep working. Reverse it with chattr -i or chflags nouchg.
The wider point for anyone running GLM or any other open model locally: the weights being open says nothing about the harness around them. The desktop app, the update channel, and the sidecars are part of the trust surface, and a local model inside a harness that phones home is not local. Two questions settle it for any agent you run: what does the runtime transmit while you are logged in, and who holds the key to what it stores.
Contains a referral link.
Keep Reading
postmanPostman installs plugins nobody requested
Postman's desktop app auto-installed agent plugins, a CLI and an MCP connection into Codex and Claude Code, and self-approved a Codex hook trust record.
ai-coding-agentsForever Security found a malicious AGENTS.md in Downloads
A malicious AGENTS.md dropped into ~/Downloads can steer an AI coding agent into installing rogue packages or leaking its OAuth token.
ai-agentsEvery Prompt Is A Retrieval Request
A researcher asked Meta's Muse agent to export the files it could see and got 6.8 GB back, including its runtime, SSH keys, and memory store.
Latest on the Wire
Full wire →- 17 Million Lines of Lean: Not the Biggest ProofHacker News
- AI Agent Security: The Accountability GapBleepingComputer
- AI Agents Compress Indian Banking Attacks to HoursThe Hacker News
- Amazon Weaponizes Packages Against NYC Delivery BillArs Technica
New signal daily · RSS
Stay in the loop
New writing delivered when it's ready. No schedule, no spam.