You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
autoplan: phase-publication-hook ownPath() rejects forward-slash / MSYS absolute paths on Windows #2986
On Windows, /autoplan's publication hook fails with Native parent project directory is unavailable. (or Native parent hook identity is unavailable.) whenever CLAUDE_PROJECT_DIR, cwd or transcript_path is spelled with forward slashes or in MSYS/Git Bash form.
constownPath=(value: unknown): value is string=>typeofvalue==='string'&&path.isAbsolute(value)&&path.normalize(value)===value;
and its callers, e.g. if (!ownPath(projectCwd)) fail('Native parent project directory is unavailable.');
Why
On win32, path.normalize rewrites separators, so the equality check rejects valid absolute paths:
input
path.win32.normalize
ownPath
C:/Users/x/proj
C:\Users\x\proj
false
/c/Users/x/proj
\c\Users\x\proj
false
C:\Users\x\proj
C:\Users\x\proj
true
Hooks run under Git Bash on Windows commonly receive the forward-slash or MSYS spellings, so the hook refuses and /autoplan can't publish.
Suggested fix
Compare canonical forms instead of requiring the input to already be normalized, e.g. path.isAbsolute(v) && !path.normalize(v).split(path.sep).includes('..'). Or normalize before use and reject only on .. traversal. Add a win32 test with forward-slash input.
Environment
Windows 11, Git Bash, Claude Code desktop, gstack v1.89.0.0.
Reproduced on Windows 11, Git Bash, bun 1.3.14, gstack 1.89.0.0 (06ed920). The hook gets CLAUDE_PROJECT_DIR=C:/..., while cwd, transcript_path and every journal cwd are C:\.... Fixing ownPath alone isn't enough: lib/claude-public-transcript.ts also compares cwd as raw strings (owned root check, origin seeding, admission). A fix that folds separators and drive-letter case on both sides, on win32 only, without path.resolve (so .. and . are still rejected), gets a real session journal to ready. It also needs #3009. The init argv has the same problem: gstack-paths prints /c/Users/... and the hook rewrote that to \c\Users\....
Fixed with tests in #3010, along with the other blockers a real end-to-end Windows run hit: Desktop worktree ownership, CRLF plans, and gbrain-rendered phase entries.
Fixed in v1.91.13.0 (#3013, merged as f30b7b7): Windows forward-slash and MSYS (/c/...) spellings are folded before validation in the hook and the transcript reader, and '..' is still rejected. Run /gstack-upgrade, then start a new Claude Code session. Thanks for the report. Reopen if you still see it after upgrading.
Activity
CharlesBerg85 commentedon Oct 1, 2026
Reproduced on Windows 11, Git Bash, bun 1.3.14, gstack 1.89.0.0 (06ed920). The hook gets
CLAUDE_PROJECT_DIR=C:/..., whilecwd,transcript_pathand every journalcwdareC:\.... FixingownPathalone isn't enough:lib/claude-public-transcript.tsalso comparescwdas raw strings (owned root check, origin seeding, admission). A fix that folds separators and drive-letter case on both sides, on win32 only, withoutpath.resolve(so..and.are still rejected), gets a real session journal toready. It also needs #3009. The init argv has the same problem:gstack-pathsprints/c/Users/...and the hook rewrote that to\c\Users\....Fixed with tests in #3010, along with the other blockers a real end-to-end Windows run hit: Desktop worktree ownership, CRLF plans, and gbrain-rendered phase entries.
v1.91.13.0 fix: severe bug wave (autoplan guard, land-and-deploy CI g…
capy-ai commentedon Oct 2, 2026
Fixed in v1.91.13.0 (#3013, merged as f30b7b7): Windows forward-slash and MSYS (/c/...) spellings are folded before validation in the hook and the transcript reader, and '..' is still rejected. Run
/gstack-upgrade, then start a new Claude Code session. Thanks for the report. Reopen if you still see it after upgrading.