claude-code - 💡(How to fix) Fix [BUG] /export command produces empty file and empty clipboard in iTerm2 despite active conversation history [1 comments, 2 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#52733Fetched 2026-04-24 10:41:05
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

  • This error does not occur in the VS Code integrated terminal. (v1.117.0)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The /export command runs without errors but produces no output — the exported file is created but is empty, and the clipboard contains nothing when used in iTerm2.

Environment:

  • OS: macOS Darwin 24.6.0
  • iTerm2: 3.6.10

What Should Happen?

  • Exported file and clipboard contain the full conversation transcript.

Error Messages/Logs

Steps to Reproduce

  1. Start a Claude Code session
  2. Have a simple conversation to generate content 3-1. Run /export (clipboard variant) → outputs "Conversation copied to clipboard" but clipboard is empty 3-2. Run /export (file variant) → file is created but has 0 bytes

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.109 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

  • This error does not occur in the VS Code integrated terminal. (v1.117.0)

extent analysis

TL;DR

The issue might be related to the interaction between Claude Code and iTerm2, and trying a different terminal or debugging the export command could help resolve the issue.

Guidance

  • Verify that the conversation transcript is being generated correctly by checking the Claude Code session output before running the /export command.
  • Try running the /export command in a different terminal, such as the VS Code integrated terminal, to see if the issue is specific to iTerm2.
  • Check the Claude Code documentation for any specific requirements or configurations needed for the /export command to work correctly with iTerm2.
  • Consider debugging the /export command to see where the issue lies, such as checking if the conversation transcript is being passed correctly to the export function.

Example

No code snippet is provided as the issue does not contain enough information to create a specific example.

Notes

The issue may be specific to the combination of Claude Code, iTerm2, and macOS, and further debugging may be needed to determine the root cause.

Recommendation

Apply workaround: Try using a different terminal, such as the VS Code integrated terminal, to export the conversation transcript until the issue with iTerm2 is resolved.

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

claude-code - 💡(How to fix) Fix [BUG] /export command produces empty file and empty clipboard in iTerm2 despite active conversation history [1 comments, 2 participants]