Skip to content

fix(pstack): list reflect transcripts when a layout is missing - #880

Open
rudycelekli wants to merge 1 commit into
cursor:mainfrom
rudycelekli:fix/reflect-locate-20261025
Open

rudycelekli wants to merge 1 commit into
cursor:mainfrom
rudycelekli:fix/reflect-locate-20261025

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Reflect lists transcripts with one ls across the flat, nested, and subagent layouts, then pipes it to head. On zsh, the default shell on a Mac, an unmatched glob is an error. A conversation that only has the nested id/id.jsonl file still misses the flat and subagent patterns, so zsh prints no matches found, lists nothing, and exits 0 because head is the last stage of the pipe. The transcript that exists is skipped, and the skill then treats the session as if it had no log.

The listing now runs in bash with nullglob, so a layout that is not on disk is dropped and ls -t still prints the files that are there. The same command also survives failglob, which is bash's version of that abort.

The regression test runs the skill's command against a directory that has only the nested transcript. Under bash failglob and under zsh -f, origin/main prints no match and no path. After this change both print the nested file and exit 0. Plugin validation, the harness check, and git diff --check pass.

zsh aborts the listing on the first unmatched pattern and the pipe to head still exits 0, so an existing transcript is skipped.
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