brawsrdocsv0.6
Concepts

State lineage

The precise relationship between checkpoint, rewind, fork, and remote effects.

RECOVERY TRACEsess_41f2
LIVE BROWSER
Checkpoint, rewind, and fork recovery traceA browser session reaches checkpoint cp_017, a later action fails, the session rewinds to the checkpoint, then forks into three independent sessions.SESSION READYCHECKPOINTACTION FAILEDrewind("cp_017")fork(3)cp_017sess_asess_bsess_c
  1. SESSIONready
  2. CHECKPOINTcp_017
  3. ACTIONfailed
  4. REWINDcp_017 restored
  5. FORKsess_a · sess_b · sess_c
RECOVERY BOUNDARY

Checkpoint at an explicit safe point. Rewind restores browser state; fork creates independent live sessions from the selected checkpoint.

Checkpoint

A checkpoint captures browser state at an explicit, caller-chosen safe point between actions. The caller is responsible for deciding that application work is settled. brawsr does not infer application-level quiescence in v0.1.

Persist the checkpoint ID when a workflow must recover durably. Labels are useful for automation, but a deleted checkpoint can release its label for reuse.

Rewind

Rewind restores captured browser-side state and returns a live session result. It is an explicit API or SDK action; brawsr does not transparently replay CDP commands or application actions.

After rewind, reconnect to the returned CDP endpoint and recreate browser-library objects. Handles derived from the old browser process are stale.

Fork

Fork creates ordered child sessions from a selected checkpoint. Each child is an independent browser session. Your workflow can explore branches concurrently, choose a result, and explicitly close the sessions it no longer needs.

The second rail matters

Rewind is not a distributed transaction. It cannot undo a purchase, form submission, consumed one-time token, message, CAPTCHA attempt, or rate-limit counter that a remote service already accepted. Place checkpoints before irreversible actions and use the remote service's idempotency or reconciliation controls when available.

On this page