Loki Docs
Tools › Workouts › Repeat the last workout

Repeat the last workout

repeat_last_workoutAdds
What it does
Adds a new record and leaves what you had alone. Safe to retry: the same call twice changes nothing more.
Permission
Workouts, change workouts:write

What your assistant is told

Start a fresh workout that repeats the user's most recent COMPLETED session — "do what I did last time". Copies that session's exercise list (and its template link) into a new active session; the SETS are NOT copied — the user re-performs them and you re-log with log_set as they go. Optional name overrides the new session's title (defaults to the prior workout's name). Fails if a workout is already in progress (call end_workout first) or if there is no prior completed workout to repeat. Prefer this over start_workout when the user says "same as last time". Returns the new active session.

Parameters

  • nametext, optionalOptional name for the new session. Omit to reuse the prior workout's name.
  • idempotencyKeyid, optionalOptional UUID you generate for THIS write, so retrying it is safe. Pass the SAME key when you retry a call that timed out or errored with an unclear outcome: the server returns the record the first attempt created instead of writing a second one. Generate a fresh key per distinct write — reusing one is how you'd silently skip a second, genuinely new entry. Omit it and every call writes a new record.
  • clientHandletext, optionalOptional client_handle from list_clients to run this tool against a coached client's data instead of your own. Omit (or pass null) for your own data — the legacy default.