Commit bd767cc
fix(cli): wipe workspace contents instead of the mount point itself
Regression from the fresh-clone commit: the sync script was doing
`rm -rf \$REPO_ROOT` where \$REPO_ROOT = `/workspace` inside the
daemon-session container — which is the volume/bind mount point. You
can `rm` the CONTENTS of a mount point, but not the directory itself;
unlinking the mount fails with EACCES ("Permission denied"). Every
spawn hit this, leaving spawn_failed with:
rm: cannot remove '/workspace': Permission denied
Fix: keep the mount point, nuke its contents. `find -mindepth 1
-maxdepth 1 -exec rm -rf {} +` reaches every direct child including
dotfiles (`.git`, `.gitignore`, etc.) and doesn't touch the mount.
Also runs `mkdir -p` before the wipe so first-time spawns still work
when the directory doesn't exist yet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0e318a4 commit bd767cc
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
111 | 115 | | |
112 | 116 | | |
113 | 117 | | |
| |||
0 commit comments