Guide

How to record a workflow that replays right

A workflow is only as good as the run it was recorded from. These six habits come from our own tests: 11 real-world workflows, each recorded once and replayed on four new days.

  1. 1Record a normal, busy day
  2. 2Record with your best model, replay with a cheap one
  3. 3Check the recording before you trust it
  4. 4Let the agent finish the whole job
  5. 5Name what changes between runs
  6. 6One task, one job
1hotpath record --task <task> -- <your MCP server>
2hotpath compile <task>
3hotpath show <task>
4hotpath run <task> --input date=… --dry-run
  1. 01

    Record a normal, busy day

    Hotpath learns the job from what the agent did. A quiet day teaches it nothing about the busy ones.

    • Pick a day with real work: several emails, tickets or orders, not zero or one.
    • Make sure every kind of case shows up: an urgent ticket and a normal one, an order in stock and one that is not.
    • If some cases are rare, record once more on a day that has them. Hotpath compares up to 5 recent recordings and learns a path for each.
  2. 02

    Record with your best model, replay with a cheap one

    You record once and replay many times. A wrong recording is replayed wrong, so the recording is the one run worth paying for.

    • Use the strong model (Claude Sonnet, GPT, your usual agent) for the recording.
    • Set the cheap model for replays with HOTPATH_CHEAP_MODEL. It only handles the steps that need judgment.
    • In our tests, free models recorded mistakes that every replay then repeated. Strong models did not.
  3. 03

    Check the recording before you trust it

    Hotpath replays exactly what the agent did, including its mistakes.

    • hotpath compile shows what the recorded run did and asks whether it is right. Read it: is every action the one you wanted? hotpath show <task> lists the steps again later.
    • Do a first run with --dry-run. It shows what would be sent without sending anything.
    • If the agent got it wrong, fix the prompt and record again. Don't hope the replay will correct it.
  4. 04

    Let the agent finish the whole job

    A recording that stops halfway compiles to a workflow that stops halfway.

    • Wait until the agent has done every item and sent its final message.
    • If the agent errored or timed out, throw the recording away and record again.
    • Make sure it read every page of a long list. A recording that read page 1 of 3 replays page 1 of 3.
  5. 05

    Name what changes between runs

    Values the agent saw become fixed in the workflow unless you tell Hotpath they change.

    • Pass the date, the customer or the account as inputs: HOTPATH_INPUTS='{"date":"2026-11-01"}' when recording.
    • Then replay with hotpath run <task> --input date=2026-11-02.
    • Without inputs, tomorrow's run would ask for yesterday's data.
  6. 06

    One task, one job

    Workflows replay well when the steps are the same each day and only the data changes.

    • Good fits: inbox triage, ticket routing, order fulfilment, daily reports, CRM updates, alerts.
    • Poor fits: one-off research, open-ended chats, anything where the steps change every time.
    • Split a long session into tasks with their own names (--task), so each gets its own workflow.

What Hotpath doesn't do well yet

We'd rather tell you than have you find out. These are being worked on; thechangelog says when each one lands.

Empty days
A day with nothing to do may hand over to your agent once. That run's recording teaches the workflow the empty case.
Judgment on free text
Choices that depend on reading text, not on a field, are still made by the replay model. Hotpath asks twice and hands over when the answers differ, but a cheap model can be wrong both times. Check the first runs with --dry-run.
Number rules
A rule like "page only if the error rate is over 2" needs two recordings: a calm day and an alert day. One recording cannot show where the line is.

When something changes and a replay no longer fits, Hotpath stops before acting, runs your agent once and records the new path, so a workflow improves the first time it meets a new case. The full reference is the README on GitHub. Stuck? Open an issue or tell us.