Skip to content

Session/journal architecture: redundancy, Claude-only coupling, and simplification opportunity #7

@v0lkan

Description

@v0lkan

Summary

The current session/journal architecture has overlapping concerns, redundant storage, and is tightly coupled to Claude Code. This makes the system harder to understand than it needs to be and excludes users of other AI tools.

Three layers of redundancy

Location Format Created by Read by
~/.claude/projects/ JSONL Claude Code ctx recall export
.context/sessions/ JSONL copy + context snapshots auto-save-session.sh hook + ctx session save Nothing in the pipeline (?)
.context/journal/ Enriched markdown ctx recall export → normalize → enrich ctx journal site, humans

Key observation: nothing in the ctx pipeline reads from .context/sessions/. The journal pipeline reads directly from ~/.claude/projects/. The sessions folder is a dead end.

ctx session save adds to the confusion

ctx session save creates context snapshots (tasks, decisions, learnings state) — a completely different concept from session transcripts. But it lives in the same .context/sessions/ directory and uses the same "session" terminology. Two unrelated things share a name and a folder.

Claude Code coupling

The recall/journal system is entirely Claude Code-specific:

  • ctx recall parses ~/.claude/projects/ JSONL files
  • The auto-save hook reads Claude Code's transcript_path from the SessionEnd event
  • The --tool filter on ctx recall list implies multi-tool support, but there are no other parsers

What happens for a Copilot/Cursor/Windsurf user?

  • ctx recall list → "Found 0 sessions"
  • ctx recall export --all → nothing to export
  • ctx journal site → empty site
  • The entire journal pipeline is unusable
  • .context/sessions/ never gets populated
  • The only ctx features that work are the static context files (TASKS.md, DECISIONS.md, etc.)

This means a significant portion of ctx's feature surface is invisible to non-Claude users.

Simplification opportunity

If the goals are (1) portable session history and (2) enrichable/publishable archives, consider:

  1. Eliminate .context/sessions/ as a transcript store — it duplicates ~/.claude/projects/ and nothing reads from it
  2. Have auto-save hook write to journal directly — run ctx recall export <session-id> on SessionEnd instead of copying raw JSONL
  3. Separate context snapshots from transcriptsctx session save (context state snapshots) is useful but shouldn't share a folder/name with transcript backups
  4. Make .context/journal/ the single portable format — if journal entries are the enriched, human-readable form, make that the canonical project-local store
  5. Add import adapters for other tools — a ctx recall import <file> that accepts Copilot/Cursor/generic chat logs would make the journal pipeline tool-agnostic

This could reduce three overlapping systems to one clear pipeline:

AI tool transcripts (any format)
  → ctx recall import/export → .context/journal/ (portable markdown)
    → normalize → enrich → site

Environment

  • ctx: v0.3.0
  • Claude Code: 2.1.39

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions