Versioning overview

Cast offers two complementary version tracks for an agent. They are deliberately independent. Mixing them up — or assuming one replaces the other — is the most common source of confusion.

Undo logGit history
Created byCast, automatically, on every modificationYou, explicitly, via cast git commit
Identified bysequential id (1, 2, 3…)Git commit hash (and optional cast git tag)
Stored in~/.cast/agents/<name>/.cast/changes/~/.cast/agents/<name>/.git/
User-facing?no — internal to cast undoyes — shareable, durable, browsable
Purposestep backwards through in-development editsbackup, sharing, code-level history
Visible viacast undo, cast redo, /undo, /redocast git log, cast git diff, cast git push
Network required?nono (push is optional)

The mental model

When to use which

You want to…Use
Step back one edit while iteratingundo log + cast undo
Recover from a “this used to work” moment after several editsundo log + cast undo --steps 5
Share the agent with another machine or collaboratorGit (cast git push)
Keep a permanent, named version of the agentReleases (a separate concept)
Audit who changed what, whenGit (cast git log)
Operate on a single machine, no sharing neededundo log only; skip Git

Lifecycle of a single feature

  edit in Builder (or cast update)
        |
        v
  +-----------+   cast undo
  | undo log  | <---------  (step back through edits)
  | v6, v7,   |
  | v8, v9    | --------->  cast redo (bring them back)
  +-----------+
        |
        |  cast git commit -m "..."
        v
  +-----------+   cast git push origin main
  |  .git/    | ------------------------->  GitHub / GitLab / ...
  +-----------+

You typically develop with the undo log (it’s free and automatic), then cast git commit periodically to checkpoint work you want to keep long-term, then cast git push to back it up or share it.

How they interact

The two tracks never share state. A cast git init does not import the undo log; a cast git commit does not consume or clear undo entries; cast undo does not touch .git/. You can use either independently, both, or neither.

The one cross-cut is cast release: when you make a release, Cast reads the undo log to auto-generate the changelog. The release’s tarball is self-contained and independent of both the undo log and the Git history.