Improvised log export from Claude Code on the web

In mid-2026 Claude Code on the web is a research feature on claude.ai that lets you run Claude Code in a container on servers operated by Anthropic. Some limitations apply. For example, there is no /export command, and you cannot shell in. If you resume a session locally with --teleport, you only get the chat log (transcript) since the last compaction. Your conversations are not included in a data takeout. This means exporting your entire conversation isn’t trivial if you want to. Below is a prompt designed to work around these limitations. I have personally used the prompt in many sessions.

The prompt was developed the following way. I ran claude --teleport to see if it would download the remote session log. When I looked into ~/.claude/, I saw it had a session log file in JSONL, but it only went as far back as the last compaction. This was when I realized I could ask Claude to see what was in ~/.claude inside its container; then, Claude could upload or commit it. Claude Opus 4.7, which I’d worked with in a long session I wanted to preserve, said that of course it could do it and thought to store the JSONL file on a fresh orphan branch. I found that the session was incomplete. When Opus investigated, it saw the directory was full of session files. They totalled 1 GiB uncompressed, 381 MiB with gzip, and 328 MiB with bzip2 compression. (We’d developed a multimedia project.) GitHub rejected files larger than 100 MiB. Opus worked around this by splitting the tar file with split(1). It worked, and I got the data out. I asked Opus to turn what we’d done into a reusable prompt, which became the first version of the prompt below. I benchmarked different compressors on the joined and decompressed archive and found that with zstd -7 --long (and higher), you didn’t need to split even a large session (the 1 GiB compressed down to 17 MiB), so I edited the prompt to suggest it. The large compression window was key. I also changed “only way” to “only practical way” for honesty.

After you exract the archive, run fdupes in the directory. You want to remove duplicate session files left from repeated resumes:

fdupes -d -r -t .

Keep in mind that if your repository is public on GitHub, so will be the export branch.

I'd like to export the full conversation history from this session before it's lost. Claude Code on the web runs on a remote host I don't have shell access to, so the only practical way for me to retrieve the JSONL transcript files is to commit them to the repo and pull.

The transcript files live under `~/.claude/projects/` in a subdirectory named after the working directory (with slashes replaced by dashes). For example, if the working directory is `/home/user/myproject`, the files are in `~/.claude/projects/-home-user-myproject/`. Each session creates a `.jsonl` file.

Please:

1. Find the JSONL directory for this project and check its total size with `du -sh`.
2. Install zstd. Create a compressed tarball using: `tar cf - -C <jsonl-dir> . | zstd -7 --long -o /tmp/conversation-export.tar.zst`.
3. Check the compressed size. If it's over 90 MB, split it: `split -b 90M /tmp/conversation-export.tar.zst /tmp/conversation-export.tar.zst.part-`
4. Create an orphan branch (no shared history with the project): `git checkout --orphan claude/conversation-export && git rm -rf .`
5. Copy the `.tar.zst` file (or the split parts) into the repo root, commit, and force-push to `claude/conversation-export`.
6. Switch back to the working branch and clean up any leftover files.

I will delete the branch after retrieving the files.