gVisor checkpoint and restore for sleeping agents

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start with research 22 §§4, 9, and 9.6 and design §§7.1, 13.2, 13.3, and 13.8 to understand the checkpoint constraints and restore behavior. Run experiments E1, E2, E3, E6, and E7, covering real Claude Code restore, node and plan compatibility, long sleeps, heavy writes, and placeholder and CA stability. Done when same-node resume meets the ≤2 s budget and invalid checkpoints fall back to rebuild.

Written by the indexing model from the issue text.

Description

enhancement

Why. Waking from a full memory snapshot (research 22 level (a)) is faster and more faithful than a rebuild, but only valid on matching hardware and runtime builds. So it's a cache in front of rebuild-and-resume (#70), for short sleeps on the same node, and later moves (#8).

What.

  • Use runsc checkpoint and restore directly. Docker's checkpoint support is experimental and only restores into the same container. Use background restore, the in-box save/restore hook, and a CPU-feature pin.
  • The checkpoint covers memory and the root filesystem overlay only. wicket restores the bind-mounted trees itself (workspace, state, volumes): bit-identical and digest-checked, because runsc doesn't check them.
  • On restore: re-dial wicket's sockets. Keep the old placeholders and the run's CA, because the restored process already trusts it (design §13.2), and keep the agent's full taint (§13.3).
  • Signed manifests; restore at most once.
  • Experiments first (research 22 §9.6):
    • E1: a checkpoint and restore of a real Claude Code box;
    • E2: restore on another node of the same and of a different plan;
    • E3: a one-hour sleep, for clocks and timers;
    • E6: consistency under heavy writes;
    • E7: placeholder and CA stability.

Done when. A sleeping agent on the same node resumes from a checkpoint in under the §13.8 budget (≤ 2 s), and falls back to rebuild when the checkpoint is invalid.

Refs. research 22 §4, §9; design §7.1, §13.8; #8, #70.

Dominant language
Rust
Stars
0
Forks
0
Avg merge
1h 43m
Merged PRs (30d)
190

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from public/wicket

All issues in public/wicket

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.