From cf13e0225c1404e166aec712fe46362a5eb85d16 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Sat, 22 Aug 2026 20:37:09 -0500 Subject: [PATCH] Keep Claude Code's agent worktrees out of the repository .claude/worktrees/ holds complete working copies -- during a parallel agent run there were six, each a full checkout with its own build output. None of it is tracked, so it sat in `git status` as untracked noise, and a `git add -A` at the wrong moment would have committed the repository into itself. scheduled_tasks.lock is equally machine-local. Both are named individually rather than ignoring .claude/ wholesale. That directory is also where shared project config lives -- settings.json, agents/, skills/ -- and ignoring the parent would have pre-emptively hidden files a project would normally commit, for no benefit today. Co-Authored-By: Claude Opus 5 (1M context) --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index b95fa12..43ab9aa 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,10 @@ local.properties # The FFmpeg AAR is committed under bin/ so test runs do not depend on a rebuild. # Build outputs from tools/ffmpeg are not. tools/ffmpeg/out/ + +# Claude Code's per-machine state. Named file by file rather than ignoring .claude/, so that +# shared project config -- settings.json, agents/, skills/ -- stays committable if this project +# ever adopts it. worktrees/ holds complete working copies: during a parallel agent run there +# were six, each a full checkout with its own build output. +.claude/worktrees/ +.claude/scheduled_tasks.lock