[Feature Request] Auto-save conversation to project-local markdown files before compaction

Resolved 💬 4 comments Opened Feb 19, 2026 by 0xebjc Closed Mar 21, 2026

Could compaction automatically write the about-to-be-compacted conversation to readable markdown files in the project directory?

Proposed structure:

{project}/.claude/prompt-history/
  20260218-1430 - Discussion on terminal UI.md
  20260218-1545 - Implementing validation hooks.md

Each file:

  • {YYYYMMDD-HHMM} - {auto-generated description}.md
  • Readable markdown with user/assistant turns
  • Project-local (travels with the project, not stored globally)

Why project-local: Conversations are project-specific. Storing in .claude/prompt-history/ keeps history co-located with the work and avoids mixing conversations from different projects.

How this differs from existing proposals:

  • #13239 — stores globally in ~/AI_claude/hist/, not project-local
  • #17428 — UUID-named files in ~/.claude/, not human-browsable
  • #13714 — manual /export, not automatic at compaction

If PreCompact hooks (#17237) ship first, this could be built as a hook — but descriptively-named, browsable conversation segments would be valuable as a built-in feature.

Related: #17237, #14258, #16300, #21188

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗