Summary
On Windows (Git Bash + Bun runtime), stage 3 of the unified gstack-gbrain-sync.ts (the brain-sync stage for curated artifacts → git pipeline) fails with gstack-brain-sync exited undefined. Functional impact is limited (running gstack-brain-sync directly works fine), but the noise pollutes the sync summary on every gstack skill start and makes real errors harder to spot.
Environment
- OS: Windows 11
- Shell: Git Bash (MSYS2)
- gstack version:
1.45.0.0
- Bun version: (Bun-bundled with gstack install)
- gbrain version:
0.18.2
Root cause
bin/gstack-gbrain-sync.ts:964-971 — the runBrainSyncPush function uses:
spawnSync(brainSyncPath, ["--once"], { stdio: [...], timeout: 60000 })
— without shell: true.
gstack-brain-sync is a bash-shebang script:
Windows can't exec a shebang file directly without going through a shell. So spawnSync fails to spawn (returns result.status === undefined), and the wrapper interprets that as a stage failure.
Reproduction
On any Windows machine with gstack installed + gbrain configured:
# In Git Bash
gstack-gbrain-sync --incremental
Expected: stage 3 completes cleanly.
Actual: stage 3 reports gstack-brain-sync exited undefined, even though running gstack-brain-sync --once directly works (exits 0, empty queue).
Proposed fix
Add shell: true to both spawnSync calls in runBrainSyncPush, OR wrap with explicit bash invocation on Windows:
// Option A — simple:
spawnSync(brainSyncPath, ["--once"], { stdio: [...], timeout: 60000, shell: true })
// Option B — explicit cross-platform:
const isWindows = process.platform === "win32";
const cmd = isWindows ? "bash" : brainSyncPath;
const args = isWindows ? [brainSyncPath, "--once"] : ["--once"];
spawnSync(cmd, args, { stdio: [...], timeout: 60000 });
Workaround currently in use
gstack-gbrain-sync --no-brain-sync to skip stage 3 explicitly. Functional but noisy in the sync summary.
Discovered by
Surfaced by Harry Malinski (@hmalinski) during a Liquid Acre dev-machine cleanup session on 2026-05-26 after upgrading gstack 1.35.0.0 → 1.45.0.0. Logged in the LA project's observations log (docs/orchestration/_observations-log.md, session 2026-05-26 afternoon, obs #4).
Related context: a separate gstack-memory-ingest Windows incompat from gstack 1.35.x was already fixed in 1.45.0.0 — same session confirmed that stage works cleanly now. This runBrainSyncPush gap appears to be the last remaining Windows-spawn issue in the unified sync.
Summary
On Windows (Git Bash + Bun runtime), stage 3 of the unified
gstack-gbrain-sync.ts(thebrain-syncstage for curated artifacts → git pipeline) fails withgstack-brain-sync exited undefined. Functional impact is limited (runninggstack-brain-syncdirectly works fine), but the noise pollutes the sync summary on every gstack skill start and makes real errors harder to spot.Environment
1.45.0.00.18.2Root cause
bin/gstack-gbrain-sync.ts:964-971— therunBrainSyncPushfunction uses:— without
shell: true.gstack-brain-syncis a bash-shebang script:#!/usr/bin/env bashWindows can't
execa shebang file directly without going through a shell. SospawnSyncfails to spawn (returnsresult.status === undefined), and the wrapper interprets that as a stage failure.Reproduction
On any Windows machine with gstack installed + gbrain configured:
# In Git Bash gstack-gbrain-sync --incrementalExpected: stage 3 completes cleanly.
Actual: stage 3 reports
gstack-brain-sync exited undefined, even though runninggstack-brain-sync --oncedirectly works (exits 0, empty queue).Proposed fix
Add
shell: trueto bothspawnSynccalls inrunBrainSyncPush, OR wrap with explicitbashinvocation on Windows:Workaround currently in use
gstack-gbrain-sync --no-brain-syncto skip stage 3 explicitly. Functional but noisy in the sync summary.Discovered by
Surfaced by Harry Malinski (@hmalinski) during a Liquid Acre dev-machine cleanup session on 2026-05-26 after upgrading gstack 1.35.0.0 → 1.45.0.0. Logged in the LA project's observations log (
docs/orchestration/_observations-log.md, session 2026-05-26 afternoon, obs #4).Related context: a separate
gstack-memory-ingestWindows incompat from gstack 1.35.x was already fixed in 1.45.0.0 — same session confirmed that stage works cleanly now. ThisrunBrainSyncPushgap appears to be the last remaining Windows-spawn issue in the unified sync.