Skip to content

The open-source app everyone uses to manage agents at work

docs: add safe local worktree bootstrap guidance (#9195)

Granis87bbb3e19c6f56
diff --git a/docs/deploy/local-development.md b/docs/deploy/local-development.md
index 3bc423341e..950b572e03 100644
--- a/docs/deploy/local-development.md
+++ b/docs/deploy/local-development.md
@@ -79,6 +79,32 @@ curl http://localhost:3100/api/companies
# -> []
```
+## Safe Worktree Bootstrap for Local Agent Runs
+
+For safer parallel local experiments, initialize a dedicated worktree instance instead of reusing your main checkout:
+
+```sh
+pnpm paperclipai worktree:make local-lab --seed-mode minimal
+cd ~/paperclip-local-lab
+pnpm paperclipai worktree env # inspect generated env exports
+eval "$(pnpm paperclipai worktree env)" # bash/zsh
+pnpm paperclipai run
+pnpm paperclipai doctor
+```
+
+If the experiment gets noisy, repair or reseed the worktree without touching the main branch:
+
+```sh
+pnpm paperclipai worktree repair --branch paperclip-local-lab
+pnpm paperclipai worktree reseed --from . --to paperclip-local-lab
+```
+
+When done, shut it down and remove the isolated state explicitly:
+
+```sh
+pnpm paperclipai worktree:cleanup local-lab --force
+```
+
## Reset Dev Data
To wipe local data and start fresh: