Skip to content

pstack docs/harness/claude-code.md: transcript slug replaces every non-alphanumeric character, not only / and . #1155

Open

Description

@umeasyuyuki

Problem

docs/harness/claude-code.md (Paths table, Transcripts row) says the slug is the workspace path with each / and . changed to -. In practice, Claude Code replaces every character that is not an ASCII letter or digit. A workspace folder whose name ends in Japanese characters (for example 11-1-<four kana/kanji>) maps to 11-1-----.

An agent that follows the documented rule builds a path that does not exist. The reflect skill's step 1 then fails to find the active transcript.

A related trap: in zsh, the documented ls -t <dir>/*.jsonl <dir>/*/*.jsonl ... fails with no matches found when any glob has no match, so the whole command returns nothing. find or setopt null_glob avoids it.

Suggested change

Change the sentence to "each character that is not an ASCII letter or digit is changed to -", and use find (or note the zsh behavior) in reflect step 1.

Environment

pstack 0.15.36, Claude Code on macOS (zsh).

Activity

  1. deanrie commented on Nov 5, 2026

    @deanrie

    @umeasyuyuki the slug part is in the open PR #999 from @frankekn: it changes the Claude Code transcript row to "each character other than an ASCII letter or digit changed to -" and adds the 200-character cut with a hash suffix.

    The zsh part is not in that PR, and it reproduces on current main. Reflect step 1 (pstack/skills/reflect/SKILL.md, line 18) runs:

    ls -t <agent-transcripts>/*.jsonl <agent-transcripts>/*/*.jsonl <agent-transcripts>/*/subagents/*.jsonl 2>/dev/null | head -10

    With a flat and a nested transcript but no subagents/ folder, zsh prints no matches found: .../*/subagents/*.jsonl and runs nothing, so the list is empty. The 2>/dev/null does not help because the error comes from the shell before ls starts. Bash prints both files. A form that works in both shells:

    find <agent-transcripts> -maxdepth 3 -name '*.jsonl' -exec ls -t {} + | head -10

    It lists the same three layouts newest first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions