/export produces 0-byte .txt files

Resolved 💬 3 comments Opened Apr 15, 2026 by lpadgett23 Closed Apr 19, 2026

Description

The /export slash command creates the .txt file with the correct timestamped filename, but the file is 0 bytes — no content is written. This has been happening consistently for at least the last few days.

Steps to Reproduce

  1. Have an active conversation with tool use, messages, etc.
  2. Run /export
  3. File is created (e.g., 2026-04-15-181533-seo-research-2.txt) but is empty

Evidence

All 6 exports from April 15 are 0 bytes:

$ wc -l 2026-04-15-*.txt
       0 2026-04-15-011219-bp_convo_cont_2.txt
       0 2026-04-15-011240_pipeline_setup_checklist.txt
       0 2026-04-15-110022-goog-trends-convo-pt3.txt
       0 2026-04-15-151458-signals-brainstorm-1.txt
       0 2026-04-15-181533-seo-research-2.txt
       0 2026-04-15-181648-local-command-caveatcaveat-the-messages-below.txt

The underlying session data in ~/.claude/projects/<project>/<uuid>.jsonl is intact — the JSONL files are 1-3MB each. Only the /export text serialization is broken.

Environment

  • Claude Code version: 2.1.110
  • OS: macOS Darwin 23.5.0
  • Shell: bash
  • Python: 3.11.5

Workaround

Session data is preserved in ~/.claude/projects/<project>/*.jsonl and can be converted to readable text manually by parsing the JSONL.

View original on GitHub ↗

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