Register and share your invite link to earn from video plays and referrals.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
Joined May 2026
279 Following    408 Followers
# Practical ways to use the Claude Agent SDK โช Track all file changes made by the agent and rewind to any safe state at any time. File Checkpointing tracks changes made via Write/Edit and lets you restore to any point using `rewind_files()`. ๐Ÿ“Œ Title: Rewinding File Changes with Checkpointing ๐Ÿ”— URL: ๐Ÿงฉ Overview Enable with `enable_file_checkpointing=True`. Each turn's changes are tracked and assigned a checkpoint UUID. `rewind_files(checkpoint_id)` restores file state to that point. ๐Ÿ›  How to use it Enable with `enable_file_checkpointing=True`. Each `UserMessage.uuid` in the stream serves as a checkpoint ID. Restore with `rewind_files(checkpoint_id)` (or `--rewind-files` flag in CLI). ๐Ÿ— Practical usage - Keep the latest checkpoint UUID before risky operations and instantly rewind to the last safe state on verification failure. - Store per-turn UUIDs in an array for selective rollback: "Keep the turn 1 refactor but revert the turn 2 test additions." - Build an interactive approval flow that asks users "Rewind these changes?" after document comment additions. ๐Ÿ’ก Use cases ๐Ÿ›ก Instant rollback to safe state on verification failure ๐ŸŽฏ Selective rollback of specific turns ๐Ÿ”„ Faster trial-and-error cycles โš ๏ธ Watch out Changes via Bash (`echo >`, `sed -i`), directory operations, and remote files are NOT tracked. Conversation history is not rewound โ€” only files. #ClaudeAgentSDK# #AI#
Show more