Keep Claude Code's agent worktrees out of the repository #6

Merged
JMR-dev merged 1 commits from chore/ignore-claude-dir into main 2026-08-23 01:52:17 +00:00
JMR-dev commented 2026-08-23 01:44:40 +00:00 (Migrated from github.com)

.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.

Verified both halves: git status is clean with six agent worktrees on disk, and dropping a .claude/settings.json in makes it reappear as untracked.

Not included: .claude/settings.local.json, the canonical per-machine override. It does not exist here yet, so an entry for it would be speculative — but it is the file most likely to appear next in this category.

🤖 Generated with Claude Code

`.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. Verified both halves: `git status` is clean with six agent worktrees on disk, and dropping a `.claude/settings.json` in makes it reappear as untracked. Not included: `.claude/settings.local.json`, the canonical per-machine override. It does not exist here yet, so an entry for it would be speculative — but it is the file most likely to appear next in this category. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.