Coding session transcripts
Opt in to keep full Claude Code, Codex and Cursor session transcripts for 90 days, on laptops and in Claude Code cloud environments.
Session transcripts let SuperPenguin explain an expensive coding session, for example one that kept retrying a failing tool call and paid again for the same context each time. They are off by default. An organization owner turns them on for the whole organization; there is no per-person setting.
A small hook uploads each session's transcript as it goes and when it ends, together with the transcript of every subagent the session started. Claude Code, Codex and Cursor keep each subagent's conversation in its own file, and in sessions that delegate a lot of work, subagents can account for most of the cost. SuperPenguin keeps each transcript for 90 days. An owner can delete every stored transcript at any time.
Before a transcript is stored, SuperPenguin replaces secrets with [REDACTED_SECRET]: API keys and tokens from common providers, JSON Web Tokens, private keys, passwords and other values after names such as password= or api_key:, passwords in connection URLs, and signed-link signatures. It also replaces email addresses, payment card numbers, IBANs and US Social Security numbers written with dashes, each with its own placeholder ([REDACTED_EMAIL], [REDACTED_CARD], [REDACTED_IBAN], [REDACTED_SSN]). Phone numbers and IP addresses are kept, because code and command output are full of numbers shaped like them. The same applies to prompt and tool content that coding tools send while transcripts are on.
Turn it on
An organization owner opens Settings → AI coding → Coding session transcripts and turns on Capture session transcripts.
Turning it off stops new uploads straight away. Stored transcripts stay until they expire, or until an owner presses Delete stored transcripts, which requires capture to be off first.
Laptops
Run the coding tools installer, or run it again if you already have:
curl -fsSL https://app.superpenguin.ai/install | shEach run checks whether your organization has turned transcripts on. When it has, the installer says so in one line, installs the upload hook, and registers it for Claude Code and, if installed, Codex and Cursor. When it has not, it skips transcripts, and removes transcript hooks an earlier run added. Add --no-transcripts to keep them off on your machine. Codex asks you to trust a new hook once: open Codex and review it with /hooks.
A Claude Code transcript uploads when a session ends (when you exit, run /clear, or switch sessions) and, while it is open, in the background after Claude finishes a turn, at most once every 5 minutes per session. When a turn is skipped because the session uploaded less than 5 minutes ago, one more upload follows when the 5 minutes are up, so a long-running session shows up within minutes of its latest turn without being closed. Codex sessions upload when they end. Cursor conversations (editor and command line) upload when the session ends and, while open, after an agent turn at most once every 5 minutes, with the same follow-up upload. Subagents upload as each one finishes, and every upload of the session also sends any subagent that changed since its last upload. Codex asks you to trust its new SubagentStop hook once with /hooks. Cursor cloud agents upload after each completed turn through hooks committed to the repository (see Cloud agents). When Cursor keeps no transcript file on the cloud agent, the hooks build one from the prompts, the tool calls (name and input, never their output) and the replies.
The hook keeps itself current: at most once a day it downloads the latest version in the background, and replaces itself only with the version that the signed installer names.
The same hooks run in the Claude Code desktop app and the VS Code and JetBrains extensions, which read ~/.claude/settings.json like the terminal. The desktop app's cloud sessions do not; set those up as described under Cloud environments.
To upload transcripts from before you installed the hook, or ones an older hook missed (such as subagents), run the installer once with --backfill. It asks SuperPenguin which of this machine's transcripts from the last 30 days it already has, uploads the rest, and prints a one-line summary. Add --days 60 to go further back, up to 90 days:
curl -fsSL https://app.superpenguin.ai/install | sh -s -- --backfillCheck the setup any time:
curl -fsSL https://app.superpenguin.ai/install | sh -s -- --statusUnder Session transcripts you should see hook: installed, key: set, a SessionEnd hook set line for each tool, Claude Code: Stop hook set and Claude Code: SubagentStop hook set. Remove everything with --uninstall.
Cloud environments (Claude Code on the web)
Cloud sessions work differently from laptops in four ways, so they need their own setup:
- Cloud sessions do not read
~/.claude/settings.json, and they load hooks from a repository's.claude/settings.jsononly when the session has that one repository. A session with several repositories ignores repository hooks. The setup script below therefore registers the hook in the cloud machine's own managed settings, which every session of the environment reads. - Claude Code does not pass
OTEL_*variables to hooks, so the hook cannot reuse the telemetry key. - An environment reuses the result of its setup script for about a week. The hook therefore updates itself when each session starts.
- A cloud session often stops without a clean exit: it goes idle and its machine is suspended or reclaimed. The hook therefore uploads after every turn Claude finishes, before the turn is reported as done (usually a second or two), and once more if the session ends cleanly. Every finished turn is stored, including the last one before the session goes idle. Subagents upload when they finish, and each turn's upload also sends any subagent that changed.
Set it up once per environment:
Run inside a repository, the coding tools installer offers to do most of this: it creates the key and shows the variables for step 1 and the line for step 3. The steps by hand:
-
Environment variables. In SuperPenguin, open Settings → AI coding → Claude Code cloud environment and create a key for the environment. It shows
SUPERPENGUIN_API_KEY, andSUPERPENGUIN_USER_EMAILwhen your email can be used. Paste them into the environment's Environment variables in Claude Code. You do not need anyOTEL_*variables: a cloud session does not receive them, and the setup-script line below registers the telemetry settings instead. -
Network access. Allow
app.superpenguin.aiin the environment's network access. Choose Custom and add it to the allowed domains, keeping the defaults. -
Setup script. Add this line to the environment's setup script. It installs the hook and registers it for every session of the environment, with one repository or several.
|| truekeeps a network problem from stopping the session:curl -fsSL https://app.superpenguin.ai/install | sh -s -- --cloud || trueSaving a changed setup script makes the environment run it again for the next new session.
Repositories that already commit the transcript hooks to .claude/settings.json can keep them: a session never uploads the same transcript twice. If the setup script prints could not write, it is not running as root. Then add this block to your organization's server-managed settings, or commit it to each repository's .claude/settings.json (which covers sessions with that one repository only). It does nothing on laptops.
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash \"$HOME/.superpenguin/hooks/coding-transcript-hook.sh\" --refresh --only-remote 2>/dev/null || true",
"async": true
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "bash \"$HOME/.superpenguin/hooks/coding-transcript-hook.sh\" --tool claude_code --only-remote 2>/dev/null || true",
"timeout": 30
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash \"$HOME/.superpenguin/hooks/coding-transcript-hook.sh\" --tool claude_code --only-remote 2>/dev/null || true",
"timeout": 60
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "bash \"$HOME/.superpenguin/hooks/coding-transcript-hook.sh\" --tool claude_code --only-remote 2>/dev/null || true",
"async": true
}
]
}
]
}
}Verify a cloud environment
Start a new cloud session on the repository and send one prompt. Then ask Claude to run this, which uploads the current transcript and prints the result:
f=$(ls -t ~/.claude/projects/*/*.jsonl | head -1); printf '{"session_id":"%s","transcript_path":"%s"}' "$(basename "$f" .jsonl)" "$f" | CLAUDE_CODE_REMOTE=true SUPERPENGUIN_HOOK_DEBUG=1 bash ~/.superpenguin/hooks/coding-transcript-hook.sh --tool claude_codeExpect stored … bytes. These are the other results:
| Output | What to fix |
|---|---|
no SuperPenguin key configured | SUPERPENGUIN_API_KEY is missing from the environment variables. |
HTTP 403 | Transcripts are off for the organization, or the key belongs to another organization. |
HTTP 000 | app.superpenguin.ai is not allowed in network access. |
| No such file | The setup script line has not run. Start a new session after adding it. |
stored, but turns are not uploaded | Check that /etc/claude-code/managed-settings.d/50-superpenguin-transcripts.json exists. If not, the setup script could not register the hooks; see its output. |
Codex cloud
Not supported: Codex cloud does not export OTel as of 2026-10-20 (tested). Session transcripts and telemetry are available for Codex on laptops only.
Limits
- Transcripts larger than 96 MiB after compression are skipped. SuperPenguin records that a session was skipped and its size, never its content.
- Uploads use the organization's SDK key and are refused unless the organization has turned transcripts on.
- The organization key used with managed settings cannot upload transcripts, because it does not identify a person. Use the installer on laptops, or a cloud environment key.
- Transcripts are kept for 90 days, then deleted automatically.