fix: use $HOME instead of ~ in preamble for Windows compatibility#558
Open
HMAKT99 wants to merge 2 commits intogarrytan:mainfrom
Open
fix: use $HOME instead of ~ in preamble for Windows compatibility#558HMAKT99 wants to merge 2 commits intogarrytan:mainfrom
HMAKT99 wants to merge 2 commits intogarrytan:mainfrom
Conversation
The preamble bash block used bare ~ for all .gstack/ paths: [ -f ~/.gstack/.completeness-intro-seen ] touch ~/.gstack/.completeness-intro-seen mkdir -p ~/.gstack/sessions Tilde expansion is not guaranteed in all Windows shell contexts (Git Bash subshells, MSYS2, CI runners). When ~ doesn't expand, the marker file check always returns false and every skill invocation re-prompts the user to read the "Boil the Lake" essay. Fix: replace all bare ~/.gstack/ paths with "$HOME/.gstack/" in executable bash blocks. Prose/documentation references left as-is. Update the zsh-safe glob test to match the new $HOME path. Fixes garrytan#475. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.gstack/with"$HOME/.gstack/"in all preamble bash blocks~/.gstack/Problem
Every gstack skill invocation on Windows re-prompts the user to read the "Boil the Lake" essay, re-asks about telemetry consent, and re-asks about proactive mode — even after the user already answered.
The preamble checks marker files with bare
~:_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")Tilde expansion is not guaranteed in all Windows shell contexts (Git Bash subshells, MSYS2, CI runners). When
~doesn't expand, the[ -fcheck always returns false and the marker is never found.Reproduction
/office-hours)Root Cause
touch ~/.gstack/.completeness-intro-seencreates the file at a literal~/.gstack/path (or fails silently). The next invocation checks[ -f ~/.gstack/.completeness-intro-seen ]which also fails to expand~. The marker is never written or never found.Fix
Replace
~with"$HOME"in all 15 executable bash paths inscripts/resolvers/preamble.ts.$HOMEis set by the OS on every platform and expands reliably in all bash contexts.Updated paths:
mkdir -p,touch,findfor sessions directory[ -f ... ]checks for.completeness-intro-seen,.telemetry-prompted,.proactive-prompted>> ... skill-usage.jsonlandeureka.jsonlappendsrm -f ... .pending-*cleanupVerification
Fixes #475.