/export produces 0-byte file and empty clipboard on long conversations

Resolved 💬 5 comments Opened Apr 12, 2026 by amwtke Closed May 28, 2026

Bug Description

/export command produces a 0-byte file and empty clipboard when used on long conversations with large tool outputs.

Steps to Reproduce

  1. Have a long conversation with Claude Code that includes:
  • Multiple pipeline JSON outputs (each ~20KB+)
  • 4 parallel background agents that return large results
  • Multiple rounds of tool calls (~50+ tool invocations)
  1. Run /export to export to a file → file is 0 bytes
  2. Run /export to copy to clipboard → clipboard is empty

Expected Behavior

The conversation should be exported to the file or clipboard regardless of length.

Actual Behavior

  • File export: creates a file but it's 0 bytes
  • Clipboard export: reports "Conversation copied to clipboard" but clipboard is empty
  • No error message is shown in either case

Environment

  • Claude Code CLI
  • macOS (Darwin 24.6.0)
  • Model: claude-opus-4-6 (1M context)
  • Conversation length: ~50+ tool calls, multiple large JSON outputs from CI/CD pipeline runs

Additional Context

The conversation involved running a CI/CD pipeline tool that produces large JSON outputs (~20KB each), spawning 4 parallel background agents for code fixes, and multiple retry cycles. The total conversation content is likely several hundred KB.

Earlier in the same conversation, /export worked correctly (produced a non-zero file). It only started failing after the conversation grew significantly longer with more tool outputs.

🤖 Generated with Claude Code

View original on GitHub ↗

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