Skip to content

Capture a Claude Code session

Launch Claude Code under the tapes capture proxy, ship every turn to the server, and read the session back.

Claude Code is the shortest capture journey tapes has: the client launches the harness under a just-in-time proxy, the proxy dies with the process, and the session is waiting on the server when you exit. No Claude Code configuration changes, no plugin.

You need a running server and the client on your PATH. The installation page covers both; the short version:

Terminal window
curl -fsSL https://download.tapes.dev/install | bash
curl -sSfL https://download.tapes.dev/tapesctl/install | bash
tapes local up
tapes serve

Claude Code brings its own Anthropic credentials — tapes auth is for server-side features and plays no part in capture.

  1. Launch Claude Code through the client:

    Terminal window
    tapesctl start claude

    Captured turns ship to the ingest API, http://localhost:8082 by default. Flags for Claude Code itself go after --:

    Terminal window
    tapesctl start claude -- --worktree
  2. Work the session as usual, then exit Claude Code. The proxy shuts down with it and the captured turns are already on the server.

  3. List sessions. Read commands address the read API, http://localhost:8081 by default:

    Terminal window
    tapesctl sessions list

    Your session appears in the list.

For a server that is not on the default ports, set the two URLs once — capture commands use the ingest one, read commands use the other:

Terminal window
tapesctl config set ingest-url <url> # start, capture, sync
tapesctl config set api-url <url> # sessions, search, export, seed

--ingest-url and --api-url also exist as per-command flags.

Claude sessions also produce transcripts on disk, which carry the subagent structure the wire traffic alone cannot show. start tails them live. For a session no capture was running for, sweep them afterwards:

Terminal window
tapesctl sync

sync sweeps the last seven days by default; --since-days 0 sweeps everything. Re-pushing is safe — the server deduplicates.

start runs a proxy just in time and picks its own address. If you want a manually managed proxy on a fixed port instead — to share one across shells, or to capture a client start does not launch — run the server’s proxy against Anthropic and point Claude Code at it yourself:

Terminal window
tapes serve --provider anthropic --upstream https://api.anthropic.com
ANTHROPIC_BASE_URL=http://localhost:8080 claude

Keep the /v1 convention consistent: if the upstream carries a path suffix, the base URL must carry the same one, or requests 404.