Skip to main content
ancha replay runs your current agent against one attempt’s saved world and seed. People answer from their recording while the conversation matches. The result shows the first different agent action and the checks whose outcomes changed.
Global options such as --json, --config and --local also apply. See CLI overview.

Choose an attempt

Use a finished local ancha run attempt. Its directory is listed in scenes[].trialsDetail[].dir in ancha report <run-id> --json.
Replace trial-support-reply-1 with the directory from your run. To keep comparing against the same original attempt, use its run ID instead of latest: a replay writes a new run and updates latest. The original run must still have inputs.json with the saved case, and the attempt must have trace.jsonl and checks.json. Replay also reads people.jsonl when it exists. An older run without the saved case cannot be replayed. Replay uses the recorded scene and checks. It reads the agent settings from your current config, so you can edit the agent and replay the same attempt:
Replace run_example/trial-support-reply-1 with your original attempt. Use ancha explain or ancha report with the new run ID to inspect the replay.

People after a change

With people in the world, the default is live when a model is available and strict otherwise. A world without people defaults to live and needs no people model. A different agent write appears in diverged. It does not by itself make a strict replay invalid. When a person’s conversation no longer matches the recording, people.divergence explains why. A strict replay then has comparable: false, valid: false and invalidReason: "diverged", and exits 3. Do not use those check outcomes to judge the agent.

Output

With --json, replay prints NDJSON: run_started, trial_started, trial_finished, then replay_finished. The last event contains the comparison, rather than a run_finished event. The action comparison excludes GET and HEAD. It also excludes Slack methods ending in list, history, replies, info, test, members, lookupByEmail or open. See JSON events. ancha schema replay_finished prints the complete schema.

Exit codes