Strategies
| Strategy | Description | When to Use |
|---|---|---|
none | Work directly in the project directory | Quick tasks, no isolation needed |
worktree | Create a git worktree per session | Recommended for most workflows |
docker | Container-based isolation | Planned (not yet implemented) |
None Isolation
The simplest mode — agents work directly in your project directory.- No setup or cleanup overhead
- Changes are made directly to your working tree
- No merge step needed
- Risk: agents modify your working files directly
Worktree Isolation
Creates a git worktree per session, giving agents a separate working copy of your repository.How It Works
- Create —
git worktree addcreates a new worktree at~/.strawpot/worktrees/<project_hash>/<session_id> - Branch — Each session gets branch
strawpot/<session_id> - Work — All agents operate in the worktree directory
- Merge — On session end, changes are merged back via the configured merge strategy
- Cleanup —
git worktree removedeletes the worktree
Benefits
- Safe — Your main working tree is untouched during the session
- Concurrent — Multiple sessions can run simultaneously on different worktrees
- Reviewable — Changes can be reviewed as a PR before merging
- Recoverable — If something goes wrong, the worktree can be discarded
Requirements
- The project must be a git repository
- Sufficient disk space for the worktree (a shallow copy, not a full clone)
Worktree Location
Worktrees are stored under:project_hash is derived from the project directory path, preventing collisions between projects.