Skip to content

Gitignore .claude/ session state#65

Merged
dolph merged 1 commit into
mainfrom
claude/gitignore-claude-dir
May 18, 2026
Merged

Gitignore .claude/ session state#65
dolph merged 1 commit into
mainfrom
claude/gitignore-claude-dir

Conversation

@dolph
Copy link
Copy Markdown
Owner

@dolph dolph commented May 18, 2026

Summary

Adds .claude/ to .gitignore. The Claude Code CLI creates
.claude/worktrees/ inside the project root when a subagent runs with
isolation: "worktree". That directory is per-session, per-developer
state — not project state — so it should not be tracked.

Without this entry, every Claude Code session that spawns an isolated
subagent leaves .claude/ untracked in the working tree, which trips
git status cleanliness checks and pre-commit hooks.

No code or behavior change.

Test plan

  • git status after this commit shows a clean tree even with
    .claude/ present.
  • No production code touched.

Label release:skip — no user-visible behavior change.


Generated by Claude Code

The Claude Code CLI creates .claude/worktrees/ when a subagent runs with
isolation: worktree. That directory is per-session and per-developer
state, not project state, so it shouldn't be tracked.
@dolph dolph added the release:skip label May 18, 2026 — with Claude
@dolph dolph merged commit b144d40 into main May 18, 2026
2 checks passed
@dolph dolph deleted the claude/gitignore-claude-dir branch May 18, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants