Branch this session from a prior step
fork_atRestore a session to a prior history point by sequence ID, allowing re-execution from that state. Rebuilds the application and discards subsequent sub-runs.
Instructions
Rewind the session to the state captured after history[seq=N].
``sequence_id`` is the ``seq`` field on a ``theodosia://history`` entry.
``seq`` is accepted as an alias so a client can copy the value straight
from history under either name (``sequence_id`` wins if both are given).
The session's Application is rebuilt via the factory, then its
state is overwritten with the snapshot captured at that point,
and its ``__PRIOR_STEP`` is set to the action name from that
entry so ``valid_next_actions`` computes correctly. Sub-runs
recorded after that point are cleared. A ``fork_at`` marker is
appended to history with the target sequence_id under
``inputs``.
Refuses when:
- shared-app mode (would affect every connected client);
- sequence_id is out of range;
- the target entry was a refusal (state_after is None);
- the target entry is itself a fork or reset marker (avoid
walking a hall of mirrors).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seq | No | ||
| sequence_id | No |