STUPID-2026-0127

Cline's hub daemon silently reverted workspace files to stale state, repeatedly erasing a gitignored .env.local and collapsing a node_modules folder from 588 entries to 2 (GitHub #14819)

5.8medium
October 3, 2026Verified
  1. Instruction given

    None specific to this bug — it is a defect in Cline Desktop's background "hub" sidecar process, not a task the reporter gave to the agent. The reporter was doing ordinary work inside a multi-project workspace (~/wolfox_vault/) while Cline ran in the background.

  2. Expected behavior

    A background daemon with no file-write role should never silently revert files in the active workspace, and any restore/checkpoint mechanism Cline runs should never touch gitignored files or recreate-then-delete a secrets file like .env.local.

  3. Actual behavior

    Throughout October 3, 2026, files across the reporter's workspace reverted to older states: a gitignored .env.local disappeared every time it was recreated, a Keys.txt file reverted, .zip archives were affected, and a node_modules folder dropped from 588 entries to 2. The reporter ruled out their own Cline CLI session logs (every recorded command was read-only — ls, find, cat, grep, tsc --noEmit) and found the actual cause was a running process, `code-sidecar --cline-hub-daemon --cwd / --host 127.0.0.1 --port 25463`. Killing that process (PID 17909) stopped the reverts immediately; .env.local then survived 10+ minutes, versus seconds before. A fresh uninstall/reinstall on version 0.0.43 still spawned the same daemon with `--cwd /` but did not reproduce the reverts, leading the reporter to attribute the trigger to stale state in `~/.cline/data/` rather than the `--cwd /` flag alone.

  4. Damage

    Repeated, unauthorized loss of a gitignored secrets file (.env.local) and a regular file (Keys.txt), plus a node_modules directory collapsed from 588 entries to 2 and zip archives affected — all inside a live, multi-project workspace, with edits and file states silently undone throughout a working day. The exact mechanism inside the daemon was never pinned down (the reporter could not get it to recur after reinstalling), so the fix requested was defensive: default --cwd away from /, never revert gitignored files during any restore/checkpoint operation, log reverts visibly, and detect/reset stale local state on upgrade. As of publication the issue was open with no maintainer response.

A Cline Desktop user (wolfoxbh) reported that on October 3, 2026, files scattered across their multi-project workspace (`~/wolfox_vault/`) kept reverting to older states over the course of the day: a gitignored `.env.local` vanished every time it was recreated, a `Keys.txt` file reverted, `.zip` archives were affected, and a `node_modules` folder collapsed from 588 entries down to 2. The reporter first ruled out their own actions — every command in Cline's CLI session logs was read-only (`ls`, `find`, `cat`, `grep`, `tsc --noEmit`), with no writes, no `rm`, no `mv`, no git operations. The actual cause turned out to be a background process spawned by the Cline Desktop app itself: `code-sidecar --cline-hub-daemon --cwd / --host 127.0.0.1 --port 25463`. Killing that process stopped the reverts immediately — `.env.local` then survived over 10 minutes, where before it had been reverted within seconds of being recreated. What makes this harder to pin down than a typical destructive-command incident is that a clean reinstall didn't reproduce it: after uninstalling and reinstalling on version 0.0.43, the same daemon still launched with `--cwd /`, but no reverts occurred. The reporter's own conclusion was that the trigger wasn't the `--cwd /` flag by itself but stale state left behind in `~/.cline/data/` from the earlier install — a background restore or checkpoint mechanism apparently replaying old file states against the live workspace, touching files (like a gitignored secrets file) it should never have had reason to touch at all. The reporter asked Cline to default the daemon's working directory away from `/`, exclude gitignored files from any restore/checkpoint pass, log reverts somewhere visible, and detect/offer to reset stale local state on upgrade. As of this writing, the issue carried no maintainer response.

Classification

Agent
Cline
Failure mode
Destructive Action
Root cause
Other
Domain
Infra

Related incidents

Get told when an agent breaks something

We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.

This database is callable over MCP — query it from inside your agent.