claude-code - 💡(How to fix) Fix /export produces 0-byte file and empty clipboard on long conversations [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47014Fetched 2026-04-13 05:43:47
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

  • No error message is shown in either case
RAW_BUFFERClick to expand / collapse

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)
  2. Run /export to export to a file → file is 0 bytes
  3. 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

extent analysis

TL;DR

The issue with the /export command producing a 0-byte file and empty clipboard may be related to the large conversation size and tool outputs, suggesting a potential limitation or buffer overflow issue.

Guidance

  • Verify if there are any limitations on the conversation size or output length that can be exported using the /export command.
  • Check if there are any configuration options or flags that can be used to increase the buffer size or handle large conversations.
  • Test the /export command with smaller conversations or fewer tool outputs to see if the issue is reproducible.
  • Consider breaking down the conversation into smaller chunks or using a different export method if available.

Example

No specific code snippet can be provided without more information on the Claude Code CLI or the /export command implementation.

Notes

The issue may be specific to the Claude Code CLI or the macOS environment, and further investigation may be needed to determine the root cause.

Recommendation

Apply workaround: Consider breaking down the conversation into smaller chunks or using a different export method if available, as this may help mitigate the issue until a more permanent fix can be found.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING