create-claude-workspace 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -369,17 +369,9 @@ async function main() {
369
369
  }
370
370
 
371
371
  let workDir = opts.projectDir;
372
- if (opts.worktree) {
373
- try {
374
- workDir = ensureWorktree(opts.projectDir);
375
- log(`Worktree: ${workDir}`);
376
- } catch (e) {
377
- log(`Worktree setup failed: ${e.message}. Working in project directory.`);
378
- }
379
- }
380
372
 
381
373
  log('Autonomous development loop started');
382
- log(`Project: ${opts.projectDir}${workDir !== opts.projectDir ? ` (worktree: .worktrees/autonomous)` : ''}`);
374
+ log(`Project: ${opts.projectDir}`);
383
375
  log(`Max iterations: ${opts.maxIterations} | Max turns/iteration: ${opts.maxTurns}`);
384
376
  log(`Delay: ${opts.delay}ms | Cooldown: ${opts.cooldown}ms`);
385
377
  if (opts.skipPermissions) log('Permissions: skipped (--dangerously-skip-permissions)');
@@ -392,6 +384,16 @@ async function main() {
392
384
  break;
393
385
  }
394
386
 
387
+ // Try to set up worktree each iteration (git repo may not exist yet on first run)
388
+ if (opts.worktree && workDir === opts.projectDir) {
389
+ try {
390
+ workDir = ensureWorktree(opts.projectDir);
391
+ if (workDir !== opts.projectDir) log(`Worktree ready: .worktrees/autonomous`);
392
+ } catch {
393
+ // git not initialized yet — agent will do it, retry next iteration
394
+ }
395
+ }
396
+
395
397
  const memory = await readMemory(workDir);
396
398
 
397
399
  if (isProjectComplete(memory)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Scaffold a project with Claude Code agents for autonomous AI-driven development",
5
5
  "type": "module",
6
6
  "bin": {