[KongchangAI]
Conceptgit worktree

worktree

A working directory management mechanism provided by Git that allows multiple independent working trees to be created from the same repository, sharing the .git object store while each having its own branch and staging area.

Core Facts

Timeline (last 90 days)

Oct 26

Isolated workspaces are typically implemented in Git through short-lived branches or worktrees; accompanying ephemeral worktrees and sandboxed execution environments can ensure that an Agent's intermediate commits are not accidentally pushed to the remote.

Unverified50%
Oct 26

AVP's naming draws directly on Git's underlying concepts (such as worktree), and its design approach is built on top of the Git ecosystem.

Unverified50%
Oct 23

The Agent Arena feature can have up to five models work on the same task in parallel within the Alibaba environment, each running in an independent worktree, with only the winner's code applied to the main workspace.

Unverified50%
Oct 15

Claude Code automatically removes a clean worktree when exiting an unnamed interactive session, while for named sessions it asks first.

Unverified50%
Oct 15

Codex keeps the 15 most recent worktrees by default and deletes older ones once that is exceeded.

Unverified50%
Oct 15

Git only removes clean worktrees—no untracked files, no modified tracked files; unclean worktrees require `--force`, and locked ones require `--force` twice.

Unverified50%
Oct 15

Claude Code locks the worktree while the agent is running and releases it when the agent finishes; locks left by killed sessions are only released on a subsequent scan.

Unverified50%
Oct 15

In the tool.call hook, when the agent attempts to edit code outside its worktree, the operation is paused and awaits human confirmation; if there is no response, execution is denied by default.

Unverified50%
Oct 13

In the ADE scenario, the value of worktrees is that they let multiple agents modify different copies of the same project in parallel, avoiding overwriting each other's files or causing lock conflicts; without worktrees, multi-agent parallelism degrades into fighting over files in the same directory.

Unverified50%
Oct 13

In herdr, fan-out is a Claude Code skill that can create multiple git worktrees for one prompt, launch multiple agents, prompt them in parallel, have each run tests, and finally generate a comparison table, and nothing is merged without the user's approval.

Unverified50%

1 more timeline events

All Facts (11)

Verified

Deleting a worktree should use git worktree remove rather than directly rm -rf, otherwise metadata will remain in .git/worktrees and need to be cleaned up with git worktree prune.

65%
Unverified

Isolated workspaces are typically implemented in Git through short-lived branches or worktrees; accompanying ephemeral worktrees and sandboxed execution environments can ensure that an Agent's intermediate commits are not accidentally pushed to the remote.

50%
Unverified

AVP's naming draws directly on Git's underlying concepts (such as worktree), and its design approach is built on top of the Git ecosystem.

50%
Unverified

The Agent Arena feature can have up to five models work on the same task in parallel within the Alibaba environment, each running in an independent worktree, with only the winner's code applied to the main workspace.

50%
Unverified

Git only removes clean worktrees—no untracked files, no modified tracked files; unclean worktrees require `--force`, and locked ones require `--force` twice.

50%
Unverified

Claude Code locks the worktree while the agent is running and releases it when the agent finishes; locks left by killed sessions are only released on a subsequent scan.

50%
Unverified

Claude Code automatically removes a clean worktree when exiting an unnamed interactive session, while for named sessions it asks first.

50%
Unverified

Codex keeps the 15 most recent worktrees by default and deletes older ones once that is exceeded.

50%
Unverified

In the tool.call hook, when the agent attempts to edit code outside its worktree, the operation is paused and awaits human confirmation; if there is no response, execution is denied by default.

50%
Unverified

In the ADE scenario, the value of worktrees is that they let multiple agents modify different copies of the same project in parallel, avoiding overwriting each other's files or causing lock conflicts; without worktrees, multi-agent parallelism degrades into fighting over files in the same directory.

50%
Unverified

In herdr, fan-out is a Claude Code skill that can create multiple git worktrees for one prompt, launch multiple agents, prompt them in parallel, have each run tests, and finally generate a comparison table, and nothing is merged without the user's approval.

50%

Source Articles