Claude Code bug: automatic git reset destroys uncommitted changes every 10 minutes

Bug Details
Claude Code performs git fetch origin + git reset --hard origin/main on the user's project repository every 10 minutes via programmatic git operations (no external git binary spawned). This silently destroys all uncommitted changes to tracked files. Untracked files survive, and git worktrees are immune to this behavior.
Environment and Evidence
Affected version: Claude Code 2.1.87 (Homebrew cask, compiled Bun binary)
OS: macOS 15.4 (Darwin 25.3.0, arm64)
Evidence from investigation:
- Git reflog shows 95+ entries at exact 10-minute intervals with entries like
reset: moving to origin/main - Live reproduction confirmed modified tracked files are silently reverted at the 10-minute mark
fswatchcaptured the file operations pattern matching git fetch + reset- Only the Claude Code CLI process (PID 70111,
claude --dangerously-skip-permissions) was found with CWD in the affected repo - No external git processes spawned - operations are programmatic within Claude Code (likely libgit2)
Technical Analysis
Binary analysis of the compiled binary at /opt/homebrew/Caskroom/claude-code/2.1.87/claude revealed:
hg1()function does["fetch","origin"]viat_(C8(), _)without explicit CWD, defaulting toprocess.cwd()io1()function is a git pull wrapper logginggit pull: cwd=${H} ref=${_??"default"}fileHistorystate tracks{snapshots: [], trackedFiles: new Set, snapshotSequence: 0}
What Was Ruled Out
The investigation eliminated: git hooks, Claude Code user hooks, plugin marketplace updater, macOS cloud sync (iCloud, Dropbox, Syncthing, Synology, Google Drive), cron/LaunchAgents, Vite/SvelteKit dev servers, IDEs/editors, Time Machine, and external file watchers.
📖 Read the full source: HN AI Agents
👀 See Also
OpenClaw 2026.10.2 update wipes agent workspace: identity, memory, and MEMORY.md reset to defaults
Users updating OpenClaw to 2026.10.2 report their agent workspace is reset to starter templates. IDENTITY.md, SOUL.md, USER.md become placeholders and MEMORY.md plus the memory/ folder are gone.
Transformer Language Model Runs Locally on Stock Game Boy Color
Andrej Karpathy's TinyStories-260K model runs on a stock Game Boy Color via a custom ROM, using INT8 fixed-point math and bank-switched cartridge memory for weights and KV cache.

Scoring Show HN Submissions for AI Design Patterns
A developer analyzed 500 Show HN landing pages to detect common AI-generated design patterns like Inter fonts, colored left borders, and glassmorphism. The scoring system identified 21% of sites as 'heavy slop' with 5+ patterns.

Claude Artifacts API Usage Counts Against Chat Quota, Not API Billing
Using Claude artifacts within Claude makes normal API calls that are intercepted by Anthropic and authenticated through the logged-in session, counting against a plan's chat quota rather than API billing. Users can verify this by testing artifacts and checking that API usage remains at zero in the Claude Console.