From the Inside Claude Code: The Claude Code Ecosystem architecture map

Sessions copies the CLI's folder-naming hash, and 6 modules depend on that copy

risk · medium · verified

Session listing reads the CLI's own ~/.claude/projects folders directly, so sessions.py ports the CLI's JavaScript path sanitising and 32-bit string hash (base36, used for long paths) to rebuild the same folder names. Six modules import from it: the package exports, session import, mutations, resume, and the store. 12 of the 23 elements on the board depend on it, directly or indirectly. If the CLI changes how it names those folders, listing and resume find nothing, and no error says why.

Impact: A silent CLI naming change would make listing, resume, rename and import look empty or fail to find sessions that exist on disk.

Recommendation (medium effort): Cover the sanitising and hash with tests against known CLI folder names, so a CLI bump that changes them fails loudly. Longer term, ask the CLI to expose the session directory instead of re-deriving it.

The trail

  1. Package Exports
  2. Sessions
  3. Session Import
  4. Session Mutations
  5. Session Resume
  6. Session Store
Open on the map

More from this board

© 2026 Syntaxia App Platform Ltd.

Syntaxia App Platform Ltd. Registered in England and Wales, company no. 15272701 Registered office: 3rd Floor, 86–90 Paul Street, London EC2A 4NE, United Kingdom contact@provenmap.com