jxtse

Agent Snapshot Resume — AI skill for Claude Code

AI community

Resume a recorded agent run from step k in a sandbox: snapshot-restored environment + truncated native session, with a request-rewriting proxy that keeps the model context equivalent.

How to install Agent Snapshot Resume

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jxtse/agent-snapshot-resume and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Snapshot Resume does

Resume a recorded agent run from step k in a sandbox: snapshot-restored environment + truncated native session, with a request-rewriting proxy that keeps the model context equivalent. Claude Code adapter; E2B-compatible sandboxes (tested on Alibaba Cloud FC); Harbor jobs.

Alternatives in AI

  • Pi Agent Desktop — Pi — A cross-platform AI coding agent, bringing the Claude Code experience to your desktop 289 ★
  • MuseAI Skills — muse.ai (Muse AI) skills and runtime snapshot: 68 skills, workflow guides, connector manifests 261 ★
  • Compound Knowledge Plugin — AI-powered workflows for knowledge work: brainstorm, plan, review, execute, and save learnings 186 ★

README

agent-snapshot-resume

Resume a recorded agent run from step *k* in a sandbox, so the agent continues with the same files and the same model context it had at step *k*.

You give it a finished Harbor trial (for example a failed one) and a step number *k*. It restores two things, then lets the agent continue:

  1. Environment. A sandbox snapshot taken after replaying the side effects of steps 1..k-1 (file writes, shell commands, background jobs). Each resumed trial is a clone of that snapshot.
  2. Conversation. The agent's native session file, cut right before step k, resumed with the agent's own resume command (claude --resume --print for Claude Code). A small proxy in the sandbox rewrites every model request so the model sees the original prefix: the resume-only messages are removed, the original date is kept, and you can add one optional hint.

Typical uses: re-run a failure from the step where it went wrong, test whether a hint at step *k* fixes it, sample several continuations of the same prefix, or collect on-policy continuations for training data.

Claude Code is the only adapter so far. Agent-specific code is in one module (`agents/claude_code.py`); a new agent, for example Codex, needs one more module of the same shape ([docs/adding-an-agent.md](docs/adding-an-agent.md)).

The sandbox side targets **E2B-compatible services**. It was built and tested on Alibaba Cloud Function Compute (FC) sandboxes, which support snapshots. Jobs run under [Harbor](https://github.com/laude-institute/harbor) 0.23.0 (pinned).

Why snapshot + session (and not re-running from the start)

  • Re-running from step 1 costs model calls, and the model may diverge before it reaches step k.
  • Replaying only the conversation leaves the agent in an empty workspace, so files it created earlier are missing.
  • Replaying only the workspace and sending a new prompt changes the context: the model sees a different conversation.

This tool restores the workspace