-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Please explain the motivation behind the feature request.
tl;dr: I'd like Goose to have better support for concurrent Goose sessions in project directories that are also git repositories.
longer explanation:
Sometimes, I want to run a Goose recipes multiple times with different inputs on a given project or have Goose work in parallel on small, independent tasks. One example of this could be testing updates to a recipe across a set of inputs to see how it performs on my project. Another example could be giving Goose a few independent tasks in the same repository, like introducing a small feature in parallel with fixing a compilation error on a recent pr.
Currently, if these tasks are in the same project directory and involve making any modifications to files, I have to run these operations one-at-a-time, otherwise there is risk of one Goose session interfering with the other (e.g. one Goose instance introduces a breaking compilation change, which prevents other Goose sessions from compiling). If there are many tasks to run, then doing them one-at-a-time is much slower than having them run in parallel. This can be slow enough that I often, with current Goose capabilities, don't think of Goose as a good fit for this kind of work.
If the project directory is also a git repository, this problem can be solved quite well with git worktrees.
Describe the solution you'd like
I'd like Goose to have a setting that, when enabled, has Goose automatically create a worktree when running a task in a project directory that is also a git repository.
Describe alternatives you've considered
In my current Goose usage, I hack around this limitation by having multiple copies of relevant repositories installed on my machine, and jumping between them for individual tasks. So, "multiple repo copies" is one alternative, but it is not a great developer experience, especially in large repos. In setups where Goose is run in headless mode (e.g. CI) this can be ok, bc Goose can be expected to be the only process modifying the repo.
Additional context
Git worktrees appears to be used by similar agentic tools like Claude Squad to solve the problem of "multiple agents working in the same repository without interfering."
- I have verified this does not duplicate an existing feature request
I searched for "worktree", "concurrent", and "multiple" in the issue tracker and did not see anything that seemed related to this feature request.