Feature request: Native session export to Markdown (/export command)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Claude Code stores every conversation as a JSONL file on disk (.claude/projects/<project>/<session-id>.jsonl). The full verbatim conversation is preserved there — but there is no native way to export it into a human-readable format.
The only way to recover a past session is to:
- Know the JSONL file exists
- Know where it lives on disk
- Write your own parser to extract human/assistant turns from it
Most users never discover this. The conversation is effectively trapped in a machine-readable format with no exit.
Why this matters: Claude Code compresses long sessions automatically and irreversibly. Once compression happens, emotional context, reasoning texture, nuanced decisions, and qualitative discussion are reduced to bullet points in a summary. The JSONL file is the only thing that preserves the original conversation — but it is inaccessible without custom tooling.
Use cases where this matters:
- Long research or analysis sessions where the reasoning chain is as valuable as the conclusion
- Career, strategy, or planning discussions with personal context that shouldn't be re-explained every session
- Sessions that inform documentation, decisions, or code — where the "why" needs to be auditable later
- Treating a conversation as a citable document or personal knowledge artifact
Proposed Solution
A native /export slash command that writes the current session to a Markdown file:
/export ~/exports/session-2026-05-30.md
Output format: clean ## You / ## Claude turns, plain text only — no tool use blocks, no thinking blocks, no terminal rendering artifacts. Just the substance of the conversation.
The exported Markdown should be:
- Human-readable without any tooling
- Suitable for archiving, sharing, or pasting into a future session as context
- Filterable (e.g.,
--include-toolsflag for users who want unfiltered output)
Optionally: a --session <uuid> flag to export a past session by ID, not just the current one.
The JSONL schema already contains everything needed. This is a parsing and surfacing problem, not a data problem.
Alternative Solutions
I wrote a Python script to parse the JSONL manually: it extracts user/assistant text turns, strips tool use blocks, thinking blocks, and terminal rendering artifacts, and outputs clean Markdown. It works but requires:
- Knowing the JSONL file exists and where it is
- Running a custom script manually
- Discovering the session UUID from the filesystem
This is not a reasonable ask for most users. The workaround is invisible by default and requires technical knowledge to discover.
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
- I run a long session with Claude Code — deep technical analysis, gap identification, strategic decisions, and personal context about how the project fits into my workflow.
- The session runs long. Claude Code compresses it automatically. The compression produces a bullet-point summary that loses the reasoning texture, the nuance, and the personal context.
- The full conversation still exists verbatim in a JSONL file on disk — but I don't know where it is, and there's no native way to get it out.
- With
/export ~/session-2026-05-30.md, I could save the conversation at any point during the session, before compression hits, and have a permanent human-readable record I can reference, share, or paste back as context in a future session.
This is particularly valuable for:
- Multi-hour analysis sessions where the chain of reasoning matters
- Sessions that mix technical work with planning and context that shouldn't need to be re-explained
- Treating Claude conversations as a second brain / knowledge artifact rather than a disposable chat
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗