CLI /export command silently fails after first export in a session

Resolved 💬 2 comments Opened Feb 23, 2026 by belumume Closed Mar 23, 2026

Description

The /export command reports success but doesn't create the file on disk after the first export in a continuous session. Only affects the latest update channel — stable works correctly.

Steps to Reproduce

  1. Ensure autoUpdatesChannel is set to latest
  2. Start a Claude Code session
  3. Run /export — file is created successfully
  4. Continue the conversation
  5. Run /export again — output says Conversation exported to: <filename> but the file does not exist on disk

Expected Behavior

Each /export call should create the exported file at the reported path.

Actual Behavior

  • First /export in a session: works, file exists
  • Second+ /export in the same continuous session: reports success with a filename, but the file is not created

Workaround

Resuming the session (--resume) resets the export counter — first export after resume works. So exit → resume → /export is a workaround for subsequent exports.

Stable channel works correctly

Tested on stable channel — multiple consecutive exports all work correctly, including duplicate filenames getting a (1) suffix. This is a latest-channel regression.

Environment

  • Claude Code version: 2.1.50
  • Platform: Windows 11 (MSYS2/Git Bash)
  • Update channel: latest (bug does NOT reproduce on stable)
  • Shell: bash (MINGW64)
  • OS: MINGW64_NT-10.0-26200

Evidence

# latest channel — first export (works):
❯ /export
Conversation exported to: 2026-02-23-160921-example-conversation.txt
$ ls ~/2026-02-23-160921-*.txt   # EXISTS

# latest channel — second export in same session (fails silently):
❯ /export
Conversation exported to: 2026-02-23-162110-example-conversation.txt
$ ls ~/2026-02-23-162110-*.txt   # DOES NOT EXIST

# latest channel — after resume, first export works again:
❯ /export  # works
❯ /export  # works (resume reset the counter)

# stable channel — all exports work:
❯ /export  # works
❯ /export  # works
❯ /export  # works

View original on GitHub ↗

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