Skip to main content

Goal and prerequisites

The first process pauses at a lifecycle boundary after indexing the Session note, writes the Session identity and matching configuration, and exits. The second process loads SQLite, forks the paused snapshot, runs the child, then restores and runs the parent. The fake provider cursor is explicitly restarted at 1 because this controlled fixture always pauses after response 0. This is not provider continuation persistence. The Session state, ownership and journal are restored through QitOS. A separate composition is used for parent execution so it cannot accidentally reuse the child’s advanced fake cursor. Compare the parent head before and after child execution, then inspect a steering record in the parent’s Trajectory. The parent must execute the remaining Artifact tool, not merely receive a scripted final answer. Basic Python is required. The package declares Python ≥3.10; local qualification uses Python 3.12.7. Each chapter runs independently; reuse the environment and matching files when continuing your project. Commands below use a macOS/Linux shell.

Prepare the project

Save the complete files below in this directory. No repository clone, editable install, or copied tests are needed.

First process: pause

Second process: restore

Run and verify

Expected output fragments (generated IDs vary). Each run verifies tool results or persistence assertions and exits 0 on success.

Inspect the saved Session

Behavior and support boundaries

Fork a paused persisted head before restore claims ownership. Ephemeral and process-local Memory stores do not promise cross-process restore. CLI live pause/steer and unresolved-approval restore are unsupported. Steering changes instructions, not permissions.

Exercise and answer

Change the child steering text and verify the parent head assertion still passes; then inspect the child and parent as distinct Session identities.

Common errors and cleanup

ModuleNotFoundError: activate the environment with the specified installation and save every file on this page. Existing run root: choose a new --root instead of overwriting evidence. Assertion failure: inspect the first failed tool or typed error, not only the final text. After all processes and the board stop, remove only this lesson’s newly created run directories if no longer needed; retain SQLite, journals and reports you want to debug.

Complete files: save in the project root

notes.py
agent.yaml
lifecycle.py

Next step and API

API Reference · Configuration · Learning path · Next Source file (optional; all required code is already on this page).