How to share a Claude Code session, and what to hide first
There are four ways to show someone a Claude Code session, and they differ mainly in how much they carry:
- A screenshot shows one screen.
/exportgives the conversation as plain text, from inside the session.- A replay or HTML tool reads the session’s transcript file in
~/.claude/projects/and shows everything, tool calls and their output included. - Anthropic’s Share button gives a link, but only for cloud sessions and sessions with Remote Control on.
The more a way keeps, the more you have to check before you send it. A terminal session is full of things you wouldn’t paste into a chat on purpose: your home folder’s path, the repo’s name, a key printed by a command.
An AI drafted this page from the sources below and another AI checked it. It’s a research summary: no person has run these steps. An AI ran Counterparts Screenshot on one made-up Claude Code screen and four public screenshots, and published nothing; no export, replay tool or Share link was tried. Counterparts and Counterparts Screenshot, which this page names, are ours.
Which way to use
| Way | What it keeps | What it can leak | What it needs |
|---|---|---|---|
| Screenshot | What was on the screen | Anything visible: paths in tool calls, the status line, keys in output, other tabs | Nothing but the screen; Counterparts Screenshot (ours) reads up to 10 at a time |
/export | The conversation as plain text | Whatever the text holds; what it includes isn’t documented | Run it inside the session |
| Transcript file plus a replay or HTML tool | Everything: prompts, tool calls and results, thinking, timestamps | File contents Claude read, full paths, keys in output, private code | The file still on disk (30 days by default), Node or Python |
| Share (cloud or Remote Control) | The live conversation with tool calls and results | Keys in messages, files or output, results from private repos and connectors, your name | Pro, Max, Ultra, Team or Enterprise; recipient signed in to claude.ai |
For a moment in a post or a bug report, use a screenshot. For a teammate who needs to know what happened, /export or a Share link. For a blog post or a review where the tool calls matter, a replay.
If what the teammate needs is the result rather than the conversation, Claude Code can also publish an artifact: a page it builds from the work, such as an annotated diff, on Pro, Max, Ultra, Team and Enterprise plans, signed in with /login: ask Claude to “make an artifact” of it (Anthropic’s guide). Claude builds it from anything the session can reach, so read it before you share it.
A clean screenshot
A raw terminal screenshot is hard to read on a phone and easy to over-share: the window’s title bar, the welcome box with your working folder, and a status line that, by Anthropic’s docs, can show the current folder and the repo’s owner and name.
Counterparts Screenshot, a free tool we make, redraws a screenshot as a clean image, in your browser; nothing is uploaded unless you press Get a link. When the words sit on a character grid, it picks a Terminal look (there’s an Editor look for Claude Code in an editor or the desktop app, and you can pick either yourself).
From its code, it’s built to:
- leave out Claude Code’s welcome banner and the
cwd:line under it, the hints under the prompt box (“? for shortcuts” and similar) and the window’s title bar; - keep the ● and ⎿ marks, the prompt’s shaded row, a diff’s red and green rows, tables and each word’s colour;
- rejoin a sentence the terminal wrapped, and leave code and diffs line by line;
- copy a word it can’t read from your screenshot’s pixels rather than drop it.
It doesn’t find anything to hide. You tap each word, or choose A line and tap a line, to blur it.
What happened in our test
An AI made up a Claude Code screen for this page: a failing test, a command whose output prints a fake STRIPE_SECRET_KEY=sk_test_..., a Read(...) call with a full path including a made-up user name, a two-line diff, a reply naming a made-up repo address, and a status line with the folder, a branch, the model and a cost.
- The tool chose the Terminal look. It left out the welcome line, the
cwd:line, the empty prompt box, “? for shortcuts” and, in this shot, the status line. It kept the welcome box’s “/help for help” line. A custom status line may look different to it; check yours. - It kept the fake key, the full path with the user name and the repo address in plain view until they were blurred.
- It misread code. In the image,
reduce(sum, 0)on the removed diff line came out asreduce(sum, Q),npm test -- invoicesasnpm test -—- invoices, and the path gained a space; Copy text also had1l.taxforl.tax. In code one character changes the meaning, so check every line of code in the redraw against your shot. - Blur worked on terminal text: one tap blurred the key, and A line blurred the whole
Read(...)line. Copy text then shows▒▒▒in their place. Each blur is as long as what it covers.
On four public Claude Code screenshots from GitHub issues, Copy text had gaps marked [?] in three, where it had copied pixels instead of reading the words, and in one it put a permission menu’s “1. Yes” on your side of the conversation. Our measured accuracy, 14 of 18 fresh chats with no major error, comes from chat screenshots; terminal screenshots don’t have a published score of their own.
Saved images carry a postmark you can turn off and three footer lines that stay; what the tool uploads and what a link publishes.
What to hide in a terminal screenshot
Go down the screen top to bottom. The tool won’t flag any of these.
- Your user name and home path. In the window title (
user@host), the welcome box’scwd:, the prompt and everyRead(/Users/you/...)orEdit(...)call. - Repo, org and branch names. Git remotes (
git@github.com:org/repo.git), PR links, and branches named after a client or ticket. - Keys and tokens in output. Environment dumps, a
.envfile Claude read,curllines with anAuthorization:header, connection strings (postgres://user:pass@...), anything startingsk-,ghp_orAKIA. - The status line. Folder, branch, repo, and sometimes cost or usage.
- Internal hosts and people. Hostnames, IP addresses, internal URLs, email addresses, and customer names in test data or logs.
- The edges. Another terminal tab or window caught at the side of the shot.
Count on a blur only against a quick look. Blurred text in a known font can sometimes be guessed back; why, and what holds up better. For a key or password, crop the line out of the screenshot before you add it, or cover it with a solid box. If a working key was ever on screen in something you shared, replace it.
Export the conversation as text
In the session, run /export to copy the conversation to your clipboard or save it as a plain-text file. /export notes.txt writes straight to that file; on v2.1.327 or later the file must not exist yet. Anthropic calls it “a rendered transcript for a person to read.”
The docs don’t list what goes in it, such as tool output or thinking, and we haven’t checked. Read the file before you send it, and search it for the things in the list above. In a terminal on a Mac or Linux (or Git Bash or WSL on Windows), from the folder that holds the file, this prints the lines that look risky and changes nothing:
grep -nE 'sk[-_]|ghp_|github_pat_|xox[bp]-|AKIA|AIza|BEGIN [A-Z ]*PRIVATE KEY|[Aa]uthorization:|[Bb]earer |://[^/ ]+:[^/ ]*@|[Aa][Pp][Ii]_?[Kk][Ee][Yy]|[Tt]oken|TOKEN|[Pp]assword|PASSWORD|[Ss]ecret|SECRET|/Users/|/home/|\\Users\\' notes.txtIt won’t catch everything, so read the file too. For exporting chats from claude.ai, ChatGPT or Gemini, see How to export a whole AI chat.
Replay it from the transcript file
Claude Code saves every session as a file, ~/.claude/projects/<project>/<session-id>.jsonl, where <project> is your working folder’s path with other characters turned into dashes. Anthropic’s docs say it holds “messages, tool calls, and tool results, plus the system prompt, tool definitions, and parameters of the requests Claude Code sent the model.” The files are deleted after 30 days by default; keeping them longer is covered elsewhere.
People have built tools that turn that file into something to share. From their READMEs (we haven’t run any):
| Tool | Makes | Secrets | Note |
|---|---|---|---|
| claude-replay (Node) | One self-contained HTML page you can step through, tool calls and thinking folded | Replaces common key patterns with | Its README: redaction “cannot catch every possible secret format”. Leave turns out with |
| claude-code-transcripts (Python) | Paginated HTML pages | None mentioned |
|
| claude-code-log (Python) | HTML and Markdown for sessions or whole projects | None mentioned | Writes its pages next to the transcripts in |
| cctrace (Python) | Markdown, XML and the raw file | None mentioned | Its “portable” export goes into your repo with file snapshots and |
| agentpng (web) | A PNG card from a pasted or dropped transcript | Not checked | Its page calls it browser-based; we didn’t check whether anything leaves your browser |
The transcript format is internal, and Anthropic warns that scripts reading it “can break on any release”, so a tool can stop working after an update. Where a tool takes a path, point it at a copy: claude-code-log, for one, writes its pages into the folder it reads. And open the HTML yourself before you post it: claude-replay’s README says a replay embeds “the full session transcript, including source code, file paths, tool inputs/outputs, and thinking traces.”
If you’re sharing it so the next session knows
Sometimes the person who needs the session is you, or Claude, tomorrow. That’s a memory’s job. Counterparts, which we make, has the AI write down what it learned in its own words, so each new Claude Code session picks up where the last left off. It doesn’t save transcripts, so it isn’t a way to share one.
It’s a free local install for Claude Code on a Mac, Linux or Windows.
Questions people ask
How do I share a Claude Code session with a teammate?
For the whole conversation as text, run /export in the session and send the file; it’s plain text. For a cloud session, or a terminal session with Remote Control turned on, Anthropic’s Share button gives a link: Team on Team and Enterprise plans, Public on Pro, Max and Ultra, and the recipient signs in to claude.ai. For every tool call and its output, a replay tool such as claude-replay turns the session’s transcript file into one HTML page. Read whatever you send first: each of these can carry keys, paths and file contents.
Can I share a Claude Code conversation by link, like a claude.ai chat?
Only for cloud sessions and Remote Control sessions. Open the session at claude.ai/code or in the Claude app, select Share, choose Team or Public, and Copy link. Anthropic says recipients see the conversation with Claude’s tool calls and their results, including keys or tokens that appear in a message, a file or command output. The link keeps working after you archive the session or close your terminal; set it back to Private to stop it. For a claude.ai chat, see How to share an AI chat without a public link.
Where does Claude Code save my conversations?
In ~/.claude/projects/<project>/<session-id>.jsonl, one JSON object per line, where <project> is your working folder’s path with other characters turned into dashes. The file holds messages, tool calls and tool results, plus the system prompt and tool definitions. Claude Code deletes these files after 30 days by default. Finding and keeping past sessions covers keeping them longer.
Does /export include tool calls and command output?
Anthropic’s docs call /export “a rendered transcript for a person to read” and don’t list what goes in it. Nobody has checked for this page whether it includes tool output or thinking. Open the file and read it before you send it, as if it held everything.
How do I make a clean screenshot of Claude Code?
Take a screenshot of the terminal, then cover or crop what shouldn’t be seen: your folder path, repo and branch names, keys in command output, the status line. Counterparts Screenshot, a free tool we make, redraws a terminal screenshot as a clean image in your browser and lets you blur words or whole lines. It doesn’t find secrets for you, and it can misread code, so check the redraw against your shot.
Does Counterparts Screenshot hide API keys or paths automatically?
No. It has no code that looks for keys, tokens, paths or names; you tap each word or line to blur it. In our test on a made-up Claude Code screen, a fake key and a full path with a user name came through in plain view until they were tapped. For a real secret, crop it out of the screenshot or cover it with a solid box, and if a live key has been shown to anyone, revoke it.
Is a blurred API key in a screenshot safe?
Count on a blur only against a quick look. Pixelated or blurred text can sometimes be guessed back when the font is known, and a terminal’s font usually is. Crop the line out or cover it with a solid box. If the key was ever visible in something you shared, treat it as leaked and replace it.
Questions? Ask in r/AIMemorySystems.
References
- Anthropic, Claude Code docs: Manage sessions (export and where transcripts are stored), Commands, Explore the .claude directory, Share a cloud or Remote Control session, Remote Control, Share session output as artifacts, Status line
- Tools, from their READMEs: claude-replay, claude-code-transcripts, claude-code-log, cctrace, agentpng
- Ours: Counterparts Screenshot, whose source code we checked this page’s claims about the tool against, and Counterparts for Claude Code
- Related: How to export a whole AI chat, How to share an AI chat without a public link, How to hide names in an AI chat screenshot, Claude Code memory: finding and keeping past sessions
More guides: all guides.