Skip to content

fix(pstack): open setup-pstack's generators by path and fix reflect's encoded-cwd - #40

Merged
chhoumann merged 3 commits into
mainfrom
fix/setup-handoff
Oct 22, 2026
Merged

chhoumann merged 3 commits into
mainfrom
fix/setup-handoff

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Why

On Claude Code, /setup-pstack stalled after the user said yes to a verification skill. Steps 7 and 8 told the agent to invoke two generators that carry disable-model-invocation, and the Skill tool refuses them. Reflect's step 1 also described Claude Code's transcript folder name wrongly, so reflect missed its own transcript when the workspace path had _, a space, @, a symlink, or a decomposed letter.

What changed

  • setup-pstack steps 7 and 8 link ../create-verification-skill/SKILL.md and ../create-formal-verification-skill/SKILL.md and say to read them without the Skill tool. Lauren's offer text and the generators' flag stay.
  • Reflect's <encoded-cwd> comes from node -p 'process.cwd().normalize("NFC").replace(/[^a-zA-Z0-9]/g, "-")'. A name past 200 characters maps to the prefix folder that holds this session's transcript. The rule changes in tools/substitutions.json and in the derived copy.
  • Release 2.0.0-rc.16. The entry credits Eric Litman's open-pstack #234 and Michael Denyer's pstack-claude #300.

Scope

Tradeoffs

  • Dropping disable-model-invocation from both generators, as open-pstack did, also fixes the handoff. It would add two forks and let Claude Code load the generators unprompted. The path read keeps upstream's frontmatter.

Blast Radius

Two sentences in two skills change. Codex ignores the flag, and the relative links resolve in the Claude Code plugin cache, in a local-directory marketplace, and in Codex's plugin cache.

Verification

  • Real claude 2.1.306 in throwaway homes, resampling setup's yes turn. On rc.15, Sonnet 5.5 and Haiku 5.5 hit the Skill refusal and stopped in 4 of 4 runs, as did a T3 thread on Sonnet. On rc.16, none of 15 runs across Opus, Sonnet, Haiku, and Fable called the Skill tool, and a full Sonnet run generated and ran both skills.
  • Reflect with auto memory off. On rc.15, a my_app workspace looked under ...-my_app and the finder exited 1. On rc.16, the finder printed this session's transcript in my_app, in a 241-character path with a same-prefix sibling, and in an NFD path.
  • bun test tests/ has 550 pass, the scripts have 119 pass, and generate --check, markdownlint, the t3-sheet check, and all three sync dry runs at 88d4751 are clean.

Note

Low Risk
Changes are limited to skill prose and release metadata; they fix agent handoffs and transcript path resolution without touching hooks, scripts, or application runtime code.

Overview
Release 2.0.0-rc.16 fixes two Claude Code workflow bugs in skill instructions (plus matching sync substitution and fork notes).

/setup-pstack steps 7 and 8 no longer tell the agent to invoke /create-verification-skill or /create-formal-verification-skill through the Skill tool, which fails when those generators keep disable-model-invocation. On yes, the agent reads the generator SKILL.md via relative links from setup-pstack and follows it directly.

/reflect step 1 now documents Claude Code’s real <encoded-cwd> rule: NFC-normalized physical process.cwd() with every non-alphanumeric character replaced by -, and for paths over 200 characters the folder under projects/ whose name starts with that prefix (plus hash suffix). That replaces the old “only / and . to -” rule that broke transcript lookup for underscores, symlinks, and similar paths.

Version strings and changelog are bumped accordingly; find-transcript.mjs is unchanged and still receives the encoded folder as an argument.

Reviewed by Cursor Bugbot for commit 8b047ab. Bugbot is set up for automated code reviews on this repo. Configure here.

After a yes, steps 7 and 8 told the agent to invoke
/create-verification-skill or /create-formal-verification-skill. Both
carry disable-model-invocation, so on Claude Code the Skill tool refuses
them, and the agent stops and asks the user to type the command. In a
throwaway Claude Code 2.1.306 home, Sonnet 5.5 and Haiku 5.5 did this in
4 of 4 resampled yes turns, as did a T3 thread on Sonnet 5.5.

The steps now link ../<generator>/SKILL.md from setup-pstack's own file
and say to read it and follow it without the Skill tool, as poteto-mode
reaches its leaves. As links, the generator's link check fails if a
generator is renamed. The generators keep the flag. Eric Litman's
open-pstack recorded the same conflict in its 0.15.29 sync (#234).
Reflect's step 1 said <encoded-cwd> turns each / and . into -. Claude
Code 2.1.306 takes its own process.cwd(), the physical path, normalizes
it to NFC, and turns every character other than an ASCII letter or
digit into -. Past 200 characters it keeps the first 200 and appends -
and a hash. With auto memory off, an agent in a workspace named my_app
looked under ...-my_app and the finder exited 1.

The rule and the port's copy now give a node -p command that computes
the name from the directory Claude Code started in, and send a longer
name to the folder with its first 200 characters that holds this
session's transcript. Michael Denyer's pstack-claude #300 made the same
correction in its own port.
VERSION, the manifests, and package.json move to 2.0.0-rc.16. CHANGES.md
gets the entry with its behavior-delta table, and the README's pinned
installer command names the new tag. The pins stay at 88d4751, so
NOTICE.md, NOTICE-skills.md, and poteto-mode's copy of the notice do not
change. The skill count stays 64.
@chhoumann
chhoumann merged commit 07b59e6 into main Oct 22, 2026
12 checks passed
@chhoumann
chhoumann deleted the fix/setup-handoff branch October 22, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant