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
extract.py session slug disagrees with the shell one on astral characters (live) #174
Claude Code's slug regex has no /u flag, so it counts UTF-16 code units — a surrogate pair costs two dashes. The bash session_dir_slug was fixed for this; the Python copy was not.
Effect: a project path containing an emoji or Extension-B kanji makes the Python side compute a directory Claude Code never created — the silent no-op of #144/#166, in the one copy nobody re-pointed at the fixed oracle. Live in 0.8.7.
Why no test caught it:tests/test_non_ascii_paths.py exercises the bash slug only. Every Python-side test (test_extract.py, test_path_resolution.py, test_claude_config_dir.py) uses ASCII paths. A careful UTF-16 oracle was built and pointed at half the implementations.
Fix: port the well-formedness-table logic (or call the shell helper), and point the existing _js_slug oracle at _session_dir too. Overlaps #158 — both are "the slug exists in more than one place"; worth doing together.
Fixed in #187 (merged as 8eb93b2) — GitHub only auto-closed #157 from that PR's "Closes #157, #158, #174" line, since it parses the first reference only.
The naive inline copy in lib-memory-dir.sh and the codepoint regex in extract.py are both gone; the slug now lives in pipeline/slug.py and scripts/lib-slug.sh, and tests/test_slug_parity.py checks bash and Python against an independent transcription of the shipped CLI's function over ASCII, accents, CJK, emoji, astral kanji, newlines and lengths either side of 200.
Activity
fix(slug): one session-directory slug, and make it truncate (#187)
fdaviddpt commentedon Jul 26, 2026
Fixed in #187 (merged as 8eb93b2) — GitHub only auto-closed #157 from that PR's "Closes #157, #158, #174" line, since it parses the first reference only.
The naive inline copy in
lib-memory-dir.shand the codepoint regex inextract.pyare both gone; the slug now lives inpipeline/slug.pyandscripts/lib-slug.sh, andtests/test_slug_parity.pychecks bash and Python against an independent transcription of the shipped CLI's function over ASCII, accents, CJK, emoji, astral kanji, newlines and lengths either side of 200.