Summary
Creating a new project in Conductor with the gstack template fails after cloning the template with:
Failed to create repo: error: script "build" exited with code 128
Repro
- Open Conductor.
- Choose the
gstack template in Quick start.
- Create a brand-new repo/project.
- Conductor clones
.claude/skills/gstack into the new project.
- The install/build step fails with exit code
128.
What I verified
- GitHub auth can succeed and the template clone step completes.
- The failure happens after clone, during the template
build script.
origin/main currently contains this in package.json:
"build": "... && git rev-parse HEAD > browse/dist/.version && git rev-parse HEAD > design/dist/.version && git rev-parse HEAD > make-pdf/dist/.version && ..."
Likely root cause
In a freshly created repo before the first commit exists, git rev-parse HEAD exits with code 128.
That makes the template fail in bootstrapping flows that run before the initial commit is created.
Suggested fix
Use a fallback when HEAD does not exist yet, for example:
(git rev-parse HEAD 2>/dev/null || echo unknown) > browse/dist/.version
(git rev-parse HEAD 2>/dev/null || echo unknown) > design/dist/.version
(git rev-parse HEAD 2>/dev/null || echo unknown) > make-pdf/dist/.version
This fixed the local reproduction when testing the template outside an initialized repo with commits.
Summary
Creating a new project in Conductor with the
gstacktemplate fails after cloning the template with:Failed to create repo: error: script "build" exited with code 128Repro
gstacktemplate in Quick start..claude/skills/gstackinto the new project.128.What I verified
buildscript.origin/maincurrently contains this inpackage.json:Likely root cause
In a freshly created repo before the first commit exists,
git rev-parse HEADexits with code128.That makes the template fail in bootstrapping flows that run before the initial commit is created.
Suggested fix
Use a fallback when
HEADdoes not exist yet, for example:This fixed the local reproduction when testing the template outside an initialized repo with commits.