Claude Corner

Need a Claude Session in Your Ticket? Save It With /export.

By ยท 25 Nov 2026

A raised corner view across a wide empty server room with a row of blank pale gray cabinets, one closed blank stone gray folder on a long pale table and bright celery walls, and no people or text.

At a glance

  • Claude Code has a built in command that turns the current conversation into plain text you can paste or keep.
  • Without a filename it opens a menu that copies the conversation to your clipboard or saves it to a file.
  • With a filename it skips the menu and writes straight to that file, which is the fast path when you want a record next to your work.

You spent an hour with Claude chasing a flaky test, and the answer is buried somewhere in forty turns. Your teammate wants to know what was tried, the ticket needs a record, and scrolling back through the terminal to copy it piece by piece is slow and easy to get wrong. Claude Code can hand you the whole conversation in one step.

Why it matters

Anthropic's sessions guide says /export opens a menu that lets you copy the current conversation to your clipboard or save it as a plain text file, and that passing a filename skips the menu and writes directly to that file. The guide describes the result as a rendered transcript for a person to read. That makes it the right tool for a ticket, a code review comment or a handoff note, and a better choice than digging through Claude Code's own transcript files, which the docs say use an internal format that changes between versions.

How to save a Claude session as a file

We built these steps from Anthropic's docs and have not run them in a live session.

  1. Type /export with no filename. The sessions guide says this opens a menu that lets you copy the current conversation to your clipboard or save it as a plain text file. The commands reference describes that same choice as a dialog.
  2. Choose whether you want the conversation on your clipboard or in a file, then take that option. The docs describe those two choices but do not publish the exact labels on the menu.
  3. For a file in one step, type /export followed by a filename. The commands reference says this writes directly to that file.
# We have not run this script end to end on every platform.
# Type these inside a Claude Code session.

# Open the menu to copy to the clipboard or save a file.
/export

# Skip the menu and write straight to a new file.
/export flaky-test-session.txt

Gotchas

  • Working over SSH? The changelog notes that over SSH the terminal may not copy anything to your clipboard, so save to a file and copy that file instead.
  • Not for scripts. The sessions guide says /export produces a transcript for people. For data a script can parse, it points to structured options such as claude -p with JSON output or the transcript path that hooks receive.
  • It is the whole conversation. Read the export before you paste it anywhere shared, because it holds everything you and Claude said in the session. Trim anything that belongs only on your machine, such as local paths or values you pasted into the session.

If you want to come back to the same session later instead of reading a copy, see Back Monday and Can't Find Friday's Claude Session? Name It, Then Resume It by Name.

Sources:

Recommended AI prompt

Copy this paragraph into ChatGPT, Claude, Gemini, Grok, or whatever AI you use.

Prompt

I just used the /export command in Claude Code to save a long debugging session as a plain text file, and I am about to share it with my team. Using only what is in the text I paste below, write a short handoff note that lists the problem, what we tried, what worked and what is still open, and flag any lines that look like local paths, keys or private values I should remove before I post it. Ask me who the note is for and where it will be posted before you write it.