{{ theme.skipToContentLabel || 'Skip to content' }}

0.3.0-alpha.2 Session and Recovery Migration

Scope

This source candidate adds RunResult.operation and persists the operation snapshot in pause and finish RunState records. The final CLI run_result emitted by --json-events also includes operation. Existing fields and exit codes remain available.

Session migration

A schema-v3 file stored directly at session.dir/<id>.jsonl migrates on first open:

  1. validate the file and session id;
  2. create a byte-preserving <id>.jsonl.v3.backup;
  3. atomically publish and reopen the versioned target;
  4. publish the stable public link last.

Migration supports messages, model/thinking/tool-set changes, compactions, branch summaries, custom data, labels, names, and main-lane moves. An entry that cannot be represented losslessly returns session_migration_unsupported while preserving the public source.

Rollback

  1. Stop every process using the Session.
  2. Preserve the versioned target and RunState as audit evidence.
  3. Verify the .v3.backup against the expected digest.
  4. Restore the legacy filename from the backup and return to 0.2.0-rc.1.

Never remove .open.lock or a RunState .lock while its writer is alive. Keep the run paused when an external effect cannot be confirmed, and ask the business owner to verify it.

{{ theme.lastUpdated?.text || theme.lastUpdatedText || 'Last updated' }}:

Released under the MIT License.