Skip to main content
StrawPot creates one isolated environment per session. All agents in a session — orchestrator and sub-agents — share the same working directory.

Strategies

StrategyDescriptionWhen to Use
noneWork directly in the project directoryQuick tasks, no isolation needed
worktreeCreate a git worktree per sessionRecommended for most workflows
dockerContainer-based isolationPlanned (not yet implemented)
Set the strategy in your config or via CLI flag:
# .strawpot/config.toml
isolation = "worktree"
strawpot start --isolation worktree

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

  1. Creategit worktree add creates a new worktree at ~/.strawpot/worktrees/<project_hash>/<session_id>
  2. Branch — Each session gets branch strawpot/<session_id>
  3. Work — All agents operate in the worktree directory
  4. Merge — On session end, changes are merged back via the configured merge strategy
  5. Cleanupgit worktree remove deletes 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:
~/.strawpot/worktrees/<project_hash>/<session_id>/
The project_hash is derived from the project directory path, preventing collisions between projects.

Docker Isolation

Container-based isolation is planned but not yet implemented. It will provide full environment isolation including system dependencies, network, and filesystem.