█

AI/TLDR

Buy me a coffee
Buy me a coffee

OrcaReplay

Record a coding agent's run, replay it offline byte-for-byte, then fork it from any step onto another model

Observability & LLMOpsOpen source
Language
TypeScript
License
Apache-2.0 (code); trace spec CC BY 4.0
$npm i -g orcareplay
IN SHORT

What is OrcaReplay?

OrcaReplay is an Apache-2.0 command-line debugger for AI agents from the team behind the OrcaRouter model gateway. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in TypeScript and licensed Apache-2.0 (code); trace spec CC BY 4.0. To get started: install the CLI and check your setup.

Overview

OrcaReplay is an Apache-2.0 command-line debugger for AI agents from the team behind the OrcaRouter model gateway. It records a run of an unmodified agent — Claude Code, Codex CLI, the OpenAI Agents SDK, LangGraph, CrewAI, Aider, goose and others — and turns it into a file you can replay exactly, with the network blocked and no model called, as many times as you like. The npm package is `orcareplay`; the command it installs is `orca`.

The OrcaReplay HTML timeline for a recorded Claude Code run: a filterable list of 42 events — run start, workspace snapshots, model turns and Bash tool calls — beside a detail panel for the selected event.
The single-file timeline viewer, filtering a 42-event Claude Code run down to its tool loop.OrcaReplay README ↗

Capture happens below the agent rather than through an SDK wrapper. Because model APIs are stateless and every turn resends the whole conversation, a local proxy set through the agent's base-URL environment variable sees the entire loop. Alongside it, a PATH shim records shell commands with exit codes and timing, a JSON-RPC tee records MCP calls, a shadow git index snapshots the workspace each turn, and a fetch hook or an opt-in per-run TLS intercept covers agents whose model origin cannot be redirected. Everything lands in one timeline under `.orca/runs/` in the project, stored with mode 0600 and with secrets redacted on write.

Replay, fork and compare are the same proxy with a cursor: up to the cursor it answers from the recording, after it from the network. `orca replay last --from 4 --model X` keeps the first four turns and the files identical and lets a different model take over, and `orca compare` forks one run onto several models and grades each with a command such as `npm test`. On top of that come a causal graph of what produced what (marking which edges were recorded and which were inferred), a self-contained HTML timeline viewer, shareable cards and an MCP server so an agent can inspect its own runs. The README describes the project as early, at trace format v0.

A causal graph card of a three-turn run with model, tool and effect lanes, highlighting the chain from a bash tool call to a shell command that exited 1; inferred links are dashed.
`--graph-card` draws what caused what, with the chain behind the failure lit and inferred hops dashed.OrcaReplay README ↗

What it does

  • Records unmodified agents through base-URL environment variables, with adapters for Claude Code, Codex CLI, opencode, goose, grok-cli and OpenClaw and a generic OpenAI-compatible mode for SDK-based agents
  • Exact offline replay with divergence reporting — no network, no tokens — restoring the recorded filesystem over the working tree or into a scratch worktree
  • Fork from any derived checkpoint onto a different model, and `orca compare` to run several models from the same state and grade them with your own verify command
  • Captures what the model transcript cannot show: shell commands with exit codes, file changes per turn, MCP calls and, opt-in, non-model network traffic
  • `orca show` and `orca graph` in the terminal, a single-file HTML timeline viewer, and SVG/PNG/GIF cards of a failing causal chain or a comparison table
  • Local traces with deny-by-default environment capture, auth headers never written, key-shaped and high-entropy strings redacted, plus `orca scrub` after the fact

Getting started

OrcaReplay needs Node.js 20 or newer and has no native dependencies. The commands are from the project README.

Install the CLI and check your setup

The package is `orcareplay`; it puts one command, `orca`, on your PATH. `orca doctor` checks Node, git and which agents it can find.

bashbash
npm i -g orcareplay
orca doctor

Try it without an agent or API key

`orca quickstart` writes a small project with a real bug and a recording of an agent fixing it, then replays the recording against the project with no model called.

bashbash
orca quickstart

Record a real run, then replay it offline

Run your agent through `orca record`; nothing is installed into the agent. `orca replay last` serves the same run again from the recording with the network blocked.

bashbash
orca record claude
orca replay last
orca show last
Terminal recording of OrcaReplay recording a Claude Code run, replaying it offline and forking it at checkpoint 4 onto two models graded by a TypeScript check.
Record, replay and fork in one terminal session.OrcaReplay README ↗

Fork from a checkpoint onto another model

Keep the files and conversation up to checkpoint 4, let a different model take over, and open the timeline viewer. `orca setup` stores a gateway, key and model list for comparisons; any OpenAI-compatible endpoint works, OrcaRouter is only the suggested default.

bashbash
orca replay last --from 4 --model claude-haiku-4-5 --ui
orca compare last --from 4 --models claude-sonnet-5,claude-haiku-4-5 --verify "npm test"

Share the evidence

Export the run as one self-contained HTML file, or draw the causal chain behind a failure as a card for an issue (PNG and GIF need the optional render toolchain).

bashbash
orca export last -o bug.html
orca export last --card bug.svg

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Finding out which tool call deleted a file or why an agent exited 0 while its own check failed, from a recording instead of a re-run that behaves differently
  • Asking whether a cheaper model would have got the same task right, by forking the recorded run at the same checkpoint and grading both with the test suite
A comparison card for a run forked at checkpoint 4 onto claude-sonnet-5 and claude-haiku-4-5, both passing, with token counts, cost and wall time for each.
`orca compare --share` turns a fork onto two models into a verdict table.OrcaReplay README ↗
  • Attaching a reproducible, offline HTML replay of an agent failure to a bug report
  • Recording an agent built on LangGraph, CrewAI, Haystack or the OpenAI Agents SDK without changing its code

How OrcaReplay compares

OrcaReplay alongside other open-source observability & llmops tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Langfuse★ 38kA self-hostable platform for tracing LLM and agent calls, managing prompts, and running evaluations to debug and improve AI applications.
Opik★ 23.5kAn open-source platform from Comet for tracing, evaluating, and monitoring LLM applications, RAG systems, and agent workflows with dashboards and LLM-as-judge metrics.
RagaAI Catalyst★ 16.2kPython SDK that combines agentic tracing, metric evaluation, dataset and prompt management, guardrails and red-teaming for LLM and multi-agent applications.
CodeBurn★ 11.9kReads the session files 41 AI coding tools already write to disk and breaks token spend down by model, project and task — no API keys or proxy — then flags waste and correlates spend with git commits.
TensorZero★ 11.7kAn open-source LLMOps platform that puts a single gateway in front of every major LLM provider and adds observability, evaluation, optimization, and A/B testing.
Evidently★ 8.1kA monitoring and evaluation framework for ML and LLM systems that tracks output quality, drift, and test results over time with reports and dashboards.
Star Office UI★ 7.6kA self-hosted pixel-art office that shows an AI agent's live work state, with a character moving between desk, sofa and bug corner as it writes, idles or hits errors; built for OpenClaw but drivable by any HTTP client.
OrcaReplay★ 1.3kRecord a coding agent's run, replay it offline byte-for-byte, then fork it from any step onto another model