VCR / time-travel replay for Claude Code and Codex — deterministic offline agent testing
Project description
LLMReplay
VCR / time-travel for coding agents. Record Claude Code or Codex once, then replay offline — stop, tweak, fork, and assert — without burning tokens or waiting on nondeterministic model runs.
Status: Early alpha. See docs/alpha-limitations.md.
Install
pip install coding-agent-vcr
export LLMREPLAY_HMAC_KEY=dev-local-hmac # recommended; required for ci/strict record
llmreplay doctor
PyPI package name is
coding-agent-vcr(llmreplay/llm-replaywere taken or blocked as too similar). The CLI and Python import remainllmreplay.
60-second hermetic win
# Clone for the smoke script, or use record/replay against your own stub:
git clone https://github.com/dmallya93/llmreplay.git && cd llmreplay
pip install -e ".[dev]"
export LLMREPLAY_HMAC_KEY=dev-local-hmac
./scripts/smoke.sh
# → smoke ok: record→replay (fake upstream)
Record → offline replay
# Terminal A — CCR (:3456) or any Anthropic/OpenAI-compatible stub
llmreplay record --cassette .llmreplay/demo --upstream http://127.0.0.1:3456
# Terminal B — point Claude Code at the proxy
export ANTHROPIC_BASE_URL=http://127.0.0.1:7432
export ANTHROPIC_API_KEY=unused-local
# run one agent turn, then stop record
llmreplay replay --check --cassette .llmreplay/demo
llmreplay replay --cassette .llmreplay/demo --profile ci
# On a miss:
llmreplay why --cassette .llmreplay/demo --request .llmreplay/demo/requests/<tx-id>.json
Prefer free CCR+Ollama: docs/free-test-stack.md. Longer path: docs/quickstart.md.
Why this exists
Coding agents fail in ways unit tests miss: flaky tool order, prompt regressions, CI that needs live API keys, and bugs you cannot replay. Observability shows what happened. LLMReplay decides what must match and re-executes the trajectory from fixtures.
| You want… | Use |
|---|---|
| Deterministic offline replay + CI goldens | LLMReplay |
| Live traces, evals, cost dashboards | AgentReplay (compare) |
Core ideas
- static — must match (drives agent behavior)
- ignore — noise (timestamps, request ids); advisory only
- scrub — secrets → HMAC placeholders before disk
- live — always hit the real tool/LLM for that step (
mark-live)
Normative rules: docs/SPEC.md. Architecture: DESIGN.md.
Documentation
- docs/quickstart.md — first green replay
- docs/publishing.md — PyPI Trusted Publisher + social preview
- docs/alpha-limitations.md — what alpha does / does not claim
- docs/ci.md — CI / release smoke / nightly
- docs/compatibility.md — supported matrix
- docs/threat-model.md — security boundaries
- docs/troubleshooting.md — miss / doctor / bundle
- docs/reference/cli.md — CLI reference
- docs/free-test-stack.md — CCR + Ollama
- CONTRIBUTING.md — contributor path & local gates
- SECURITY.md — reporting & secret handling
Contributing / local gates
See CONTRIBUTING.md and docs/ci.md for the CI-required validation commands (pytest, coverage gate, repro stress, smoke).
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coding_agent_vcr-0.1.0.tar.gz.
File metadata
- Download URL: coding_agent_vcr-0.1.0.tar.gz
- Upload date:
- Size: 67.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d55610dc5535727629f809a478f140344b7c9c18d02f9462177c63164b7fa46b
|
|
| MD5 |
c2309899a7a17b8eb52b376631ab00e7
|
|
| BLAKE2b-256 |
3bf43a63780ee64280324b7efd179e0db34b5bc0bd1210c8a53c509bc36e76c5
|
Provenance
The following attestation bundles were made for coding_agent_vcr-0.1.0.tar.gz:
Publisher:
publish.yml on dmallya93/llmreplay
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coding_agent_vcr-0.1.0.tar.gz -
Subject digest:
d55610dc5535727629f809a478f140344b7c9c18d02f9462177c63164b7fa46b - Sigstore transparency entry: 2293353298
- Sigstore integration time:
-
Permalink:
dmallya93/llmreplay@d58a172c168554f836de2c6f7553c3d9068a41aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dmallya93
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d58a172c168554f836de2c6f7553c3d9068a41aa -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file coding_agent_vcr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: coding_agent_vcr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 69.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d3dc735ac9fee9e4d19052fac453fb78592c184ae2281b5d033db452d50c6f
|
|
| MD5 |
87c59b2375e79cce3ea4c59d60eb5eea
|
|
| BLAKE2b-256 |
25a876c3b2f2a46c4ace7f6c3ffd8ce416e9ea83b36cb8ed8c29c9c45bdaf52d
|
Provenance
The following attestation bundles were made for coding_agent_vcr-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on dmallya93/llmreplay
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coding_agent_vcr-0.1.0-py3-none-any.whl -
Subject digest:
97d3dc735ac9fee9e4d19052fac453fb78592c184ae2281b5d033db452d50c6f - Sigstore transparency entry: 2293353317
- Sigstore integration time:
-
Permalink:
dmallya93/llmreplay@d58a172c168554f836de2c6f7553c3d9068a41aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dmallya93
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d58a172c168554f836de2c6f7553c3d9068a41aa -
Trigger Event:
workflow_dispatch
-
Statement type: