You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
demo: self-rollback GIF tooling (scripted + real Claude Code TUI recorder)
The viral hook = zero-mount self-rollback. Two paths to a GIF:
- examples/demo/self-rollback-demo.sh + docs/self-rollback.gif: a narrated,
reproducible demo (real agentenv commands) of an agent changing the SYSTEM
(/usr/local/bin, /etc), rolling the WHOLE env back itself, and continuing.
- scripts/record-claude-tui.sh: records a REAL interactive Claude Code session
(the iconic '⏺ agentenv__checkout' tool cards) rolling back its own env.
Must run in a real terminal (TTY) — claude -p only prints the final answer,
so the step-by-step UI can't be captured headlessly.
- scripts/Dockerfile.recorder builds rewindable-claude-rec (image + asciinema +
agg) so recording is fast; make-demo-gif.sh is parameterized (DEMO_SCRIPT/
DEMO_OUT); make-claude-gif.sh + _claude-gif-inner.sh drive the headless path.
README GIF is left unwired until the final asset is chosen.
[24.094009, "o", "\r\nThe programs included with the Debian GNU/Linux system are free software;\r\nthe exact distribution terms for each program are described in the\r\nindividual files in /usr/share/doc/*/copyright.\r\n\r\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\r\npermitted by applicable law.\r\n"]
23
+
[26.104633, "o", "\r\n\u001b[1;36m━━━━━━━━━━ 3. I try again, correctly — from the clean state ━━━━━━━━━━\u001b[0m\r\n"]
# Default to the prebuilt recorder image (rewindable-claude + asciinema + agg);
19
+
# build it once with scripts/Dockerfile.recorder so recording is fast.
20
+
IMAGE="${IMAGE:-rewindable-claude-rec}"
21
+
PLATFORM="${PLATFORM:-linux/$(uname -m | sed 's/x86_64/amd64/;s/arm64/arm64/;s/aarch64/arm64/')}"
22
+
23
+
# The prompt: explicit steps so Claude reliably uses the MCP tools on camera.
24
+
# MUST be a single line — it travels through several layers of shell quoting.
25
+
PROMPT='You have agentenv MCP tools. Do these steps, printing a one-line note before each: (1) write /work/calc.py containing "def add(a, b): return a - b # BUG should be +"; (2) call agentenv__log, the first node whose message starts with "init from" is the clean start; (3) call agentenv__checkout with that node id to roll the WHOLE environment back; (4) run: cat /work/calc.py — it should be gone; (5) in one sentence, say you rolled your own environment back and are still running.'
26
+
27
+
export PROMPT # must be exported so `docker run -e PROMPT` forwards it
28
+
29
+
# Record INSIDE the recorder image (rewindable-claude + asciinema + agg, built
30
+
# once via scripts/Dockerfile.recorder). asciinema records the image's own
31
+
# entrypoint driving `claude -p` — the REAL Claude Code self-rollback.
0 commit comments