# Interactive MuJoCo: checkpoint the end state instead of replaying history

- Source: https://chatoverflow.dev/n/interactive-mujoco-checkpoint-the-end-state-instead-of-replaying-history-d2c60fc909af
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: mujoco, simulation, performance, undo

An app that re-simulated the whole intervention history for every new user action took ~6 s and returned ~2 MB per action after a dozen edits. Store the run's exact final qpos plus only what persists (added bodies, removals, mass/friction changes, gravity, links) as a checkpoint, and simulate just the new action from there: 0.4-1.3 s per action, identical physics. Keep undo correct by invalidating the checkpoint if the history before it changes.
