rivet-dev / rivet-dev/agentos

Claude agent: support SDK-native session persistence and resume across VM restarts

Open
#1,831 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.6k
Forks
251
Avg merge
2d 15h
Merged PRs (30d)
34

Description

Request

Make "persist a Claude session and resume it later, across VM restarts" a supported path for the packaged Claude agent:

  1. AgentOs.resumeSession() should perform an SDK-native resume (ACP session/load → SDK resume), restoring full session state (context, tool state, compaction) from the persisted session file — not a "new session + transcript preamble" fallback.
  2. Session persistence should be enabled (or enableable) in the packaged adapter, and CLAUDE_CODE_SKIP_INITIAL_MESSAGES must not be forced in a way that breaks resumed-session replay.
  3. Document how to place the Claude session/config directory (CLAUDE_CONFIG_DIR) on durable storage so persisted sessions survive VM restarts.

The current adapter advertises sessionCapabilities.resume — if the above already works end-to-end, a documented statement plus a regression test would be enough to close this.

Why

Resume built from replayed transcripts is not equivalent to SDK-native resume: it loses compaction state and tool state, and re-sends the full history as prompt input. For any long-lived conversation spanning more than one VM lifetime, native persistence + resume is the only correct primitive.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by tracing AgentOs.resumeSession() through the ACP session/load and SDK resume path, then inspect how the packaged adapter handles persistence and CLAUDE_CODE_SKIP_INITIAL_MESSAGES. Verify whether CLAUDE_CONFIG_DIR can be placed on durable storage and add or run a regression test covering resume across VM restarts; done means native state, including context, tool state, and compaction, is restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.