Explain how a coding agent uses git worktrees, in three short paragraphs.
A worktree is a second checkout of the same repository that shares one .git directory. Each worktree sits on its own branch and has its own working files.
An agent creates one worktree per task. It can edit, run tests, and commit there without touching the branch you have open, so two tasks never fight over the same files.
When the task lands, the agent pushes the branch and opens a pull request. The worktree is deleted and the shared history stays clean.