DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to roll back an agent session to an earlier checkpoint with Code Agent

Resume the last session and rewind to an earlier checkpoint when the agent's changes went the wrong way.

Short answer: Run uv run python main.py -c to resume the most recent session; then run /sessions to see the list of saved sessions if the one you want is not the latest; run /rewind and pick the checkpoint you want to return to. All steps.

Authorization notice. Code Agent is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Who it is forA developer who let the agent run for a while, saw the result drift from the goal, and wants to try again from an earlier point.

The problemA long agent run can take a wrong turn, and starting over loses the useful context from the session so far.

The outcomeThe session returns to a chosen checkpoint so the next attempt starts from that point.

What you need first

  • Python 3.11 or newer
  • uv, the Python package manager
  • An API key for a supported model provider, such as DeepSeek, OpenAI, Anthropic, OpenRouter, or ZhipuAI
  • A local Git repository or project folder to point the agent at

Steps

  1. Run uv run python main.py -c to resume the most recent session.
  2. Run /sessions to see the list of saved sessions if the one you want is not the latest.
  3. Run /rewind and pick the checkpoint you want to return to.
  4. Restate the task with a narrower instruction and continue in the same session.

Prompt for your agent

In the Harvil1/codeAgent repo, run `uv run python main.py -c` to resume the last session, then run `/rewind` to return to <checkpoint name or position>. Expect the session to show the chosen checkpoint as the current point. Verify by asking the agent to restate the last step it will take before it runs anything.

Caveat. The README says /rewind returns to a checkpoint but does not say whether file changes on disk are reverted, so check your files after a rewind.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Harvil1/codeAgent and "Roll back an agent session to an earlier checkpoint"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer