Repository navigation
[ACP on Cloud] Persistence: durable config + native session storage across pod recycles #2116
Description
Priority: P0. Part of OpenHands/OpenHands#15746.
The substrate reality (corrects the original "/workspace survives recycles" assumption)
/workspace is a per-runtime PVC that survives pause/resume of one runtime, but: STOP deletes the PVC (runtime-api/k8s.py:488; conversation-delete → /stop, app_conversation_router.py:754-772); the reaper destroys any runtime (incl. paused) at a creation-time TTL = 14 days prod/staging (runtime-api/cleanup.py:147-173; deploy/envs/{production,staging}/values.yaml); eval sets STOP_IDLE_RUNTIME=true → lost on idle; STORAGE_CLASS=standard-rwo, reclaimPolicy: Delete. Its ownerReference is the Deployment (the cited "durability") — which is also the cascade-delete vector (k8s.py:383-390). And HOME=/home/openhands is NOT on the PVC — only /workspace is (Dockerfile:135, k8s_resources.py:212) — so the CLI's ~/.claude/projects, ~/.codex/sessions, ~/.gemini/* are lost on container recreation. The SDK persists only its own resume token (acp_agent.py:1222-1237), not the CLI backing store. The relocation the epic treats as config is the actual work, and it's unbuilt.
Substrate decision — RESOLVED: object-store snapshot (not a Retain PVC / TTL bump)
Full design, comparison table, wiring plan and E2E: substrate-decision comment ↓.
Sequencing. Tier-A bootstrap resume (OpenHands#14640) ships first as the cloud MVP — all agents, no session persistence. This issue is Tier B: high-fidelity native session/load for Codex/Claude = the substrate decision (below) + the id half (OpenHands#14506 + OpenHands/software-agent-sdk#3506) + the files half, now tracked in #2088.
Decision. Snapshot the CLI's transcript subtree only into the same S3/GCS object store the events already use — no new PVC, no RUNTIME_DEAD_SECONDS bump, no runtime/infra config. It inherits the event store's properties (no PVC, no TTL, survives STOP), which is the actual parity bar — verified that native does not live-resume after STOP either: the sandbox goes MISSING → HTTP 410 archived (app_conversation_router.py:505-508), and nothing replays the event bucket back into a pod. "Persists for life" = the durable event store; a native agent's context is reconstructable from events, whereas an ACP CLI's session files are opaque (only session/load can use them).
Resume = two halves, both required; neither resumes alone on a wiped PVC:
- (i) the session id —
acp_session_id/acp_session_cwd, durably mirrored into Postgresconversation_metadata, fed back viaACPAgent.acp_resume_session_id(feat(acp): acp_resume_session_id (durable resume) + acp_isolate_data_dir on ACPAgentSettings software-agent-sdk#3506 + OpenHands#14506). On a fresh PVCbase_state.jsonis gone, so the id must come from here, not the FS. - (ii) the CLI's opaque files — snapshotted to the bucket by this work, restored before
load_session.
Mechanism (reuses existing OpenHands plumbing — ~2 SDK methods + 2 webhook routes):
- Boundary: route the blob through the app_server's existing webhook channel (session-API-key auth via
valid_sandbox); the sandbox never gets bucket creds. Rejected: presigned URLs (no such code exists in either repo; adds sandbox→bucket egress + a bearer capability) and sandbox bucket creds (breaks the trust model). - Store/keying: write via the existing
config.file_store(app_server/file_store/, S3/GCS backends) under the conversation's existing prefix, beside the events —users/<uid>/conversations/<hex>/acp_snapshots/<provider>.tar.zst. - Scope (security — allowlist, fail-closed): snapshot only Codex
acp/codex/sessions/**and Claudeacp/claude-code/projects/**. Neverauth.json/.credentials.json/history.jsonl— they sit in the same per-conversation diracp_isolate_data_dircreates (acp_agent.py:1635-1636). Auth is re-seeded on launch by materialisation (#1020/#1022), so sessions-only loses nothing and no refresh token rides to the bucket. At-rest: parity with the (already-unencrypted) events via bucket SSE; optional SDKCipherwrap as hardening. - Triggers: snapshot on the idle/terminal turn-boundary (quiescent; bounds loss to one turn) + opportunistic flush on graceful shutdown; restore pre-spawn in
_start_acp_server(beforecreate_subprocess_exec,acp_agent.py:1932), seed-if-absent so a live PVC copy is never clobbered (the snapshot is a strict fallback to the PVC). - Degradation ladder (already partly built): restored blob →
load_session; else Solution A bootstrap-prompt from durable events (OpenHands#14640); elsenew_session(the existingACPRequestErrorfallback,acp_agent.py:2039).
Tasks
id half (in flight):
- Land
acp_resume_session_id+ decoupleCLAUDE_CONFIG_DIRfrom API-key stripping (feat(acp): acp_resume_session_id (durable resume) + acp_isolate_data_dir on ACPAgentSettings software-agent-sdk#3506 — nativesession/load; the decoupling also lets Claude relocate for snapshotting under API-key auth). - Session-id mirror into server-private
conversation_metadata, fed back atACPAgentconstruction (OpenHands#14506, Solution B 2a). Feature-guarded by'acp_resume_session_id' in ACPAgent.model_fields.
files half (Tier B — the object-store snapshot) → tracked in #2088:
- #1126 — SDK
export/import_cli_session_blob+ app_server/webhooks/.../acp-snapshotroutes + agent-server driver (allowlisted-subtree tar, seed-if-absent restore, idle/terminal trigger). Follows the Tier-A MVP; gated on theacp_resume_session_idfield (feat(acp): acp_resume_session_id (durable resume) + acp_isolate_data_dir on ACPAgentSettings software-agent-sdk#3506).
done / superseded:
- Per-conversation CLI data root (#1019 → SDK#3492
acp_isolate_data_dir) — gives the single per-conversation dir this snapshots. - Materialise file-content auth +
CODEX_HOME-aware detection, seed-if-absent (#1020 → SDK#3474) — re-seeds auth on launch, so the snapshot can exclude it. -
Substrate decision:→ superseded by the object-store snapshot above (no new infra; the PVC options only raise a finite ceiling and keepRetain/long-lived volume or bumpRUNTIME_DEAD_SECONDSauth.jsonon a long-lived volume). - Gemini: excluded from the snapshot (
load_sessionunreliable + creds host-bound) → stays on bootstrap-prompt resume (OpenHands#14640); drop any~/.gemini→PVC symlink.
E2E test
convo → turn → simulate STOP (kill pod / wipe the per-conversation dir — not just pause) → relaunch on a fresh sandbox → assert load_session (not new_session), transcript continuity, Codex token still valid, and crack the snapshot tar to assert no auth.json/history.jsonl leaked (the credential-leak gate).
Depends on
#2114 (per-conversation root, closed), #2115 (materialisation target, closed), OpenHands/software-agent-sdk#3506, OpenHands#14506.
Activity
[-]ACP persistence — durable config + native session storage across pod recycles[/-][+][ACP on Cloud] Persistence: durable config + native session storage across pod recycles[/+]simonrosenberg commentedon Jun 4, 2026
Folding two OpenHands/OpenHands issues into this tracker (both closed in favor of OpenHands/OpenHands#15746):
OpenHands/OpenHands#14260 — ACP conversations cannot be resumed after sandbox restart
The original user-facing bug; it is the problem this issue solves. OpenHands-side implementations:
session/load): PR feat(acp): persist ACP session id, redirect storage onto /workspace PVC (#14260 Solution B) OpenHands#14506 — productizes the WIP this issue references; depends on SDKacp_resume_session_id(software-agent-sdk#3343) +acp_isolate_data_dir(software-agent-sdk#3492, the [ACP on Cloud] Sandbox isolation: per-conversation CLI data root #2114 relocation), both feature-guarded for the pin bump.OpenHands/OpenHands#14474 — Migrate ACP resume-transcript logic to SDK primitives once pinned (Solution-A cleanup)
Once OpenHands pins an SDK release with software-agent-sdk#3323, route the duplicated transcript logic in
live_status_app_conversation_service.pyto the SDK primitives:render_resume_transcript(events, …)replaces the inline event-render loop in_synthesize_acp_resume_initial_message(size caps → kwargs);RESUME_CONTEXT_MARKERreplaces_ACP_RESUME_CONTEXT_MARKER(producer and double-resume guard);ACPToolCallEvent.is_patch_editreplaces_is_patch_edit;content_to_strreplaces_content_to_text._sanitize_paths,_strip_terminal_boilerplate,_extract_output_text,_format_raw_input,_RAW_INPUT_NOISE_KEYS, and the pagination overevent_service.search_events(the durable store the SDK doesn't know about).Originals: OpenHands/OpenHands#14260, OpenHands/OpenHands#14474.
simonrosenberg commentedon Jun 4, 2026
Substrate decision for ACP CLI session persistence — object-store snapshot of the per-conversation session subtree
Proposed resolution for the open "Substrate decision" task in #2116. Recommends the object-store alternative to the Retain-PVC /
RUNTIME_DEAD_SECONDS-bump options currently written there. Every load-bearing claim below was verified against the code; citations arefile:line. Assumptions I could not close are called out in §5.TL;DR
acp/codex/sessions/**andacp/claude-code/projects/**— neverauth.json/.credentials.json/history.jsonl/ config at the provider-dir root. The auth files are re-established on launch by the existing materialisation path (#1020/#1022); excluding them loses nothing and keeps live refresh tokens out of the bucket.acp_session_id— is persisted by feat(acp): persist ACP session id, redirect storage onto /workspace PVC (#14260 Solution B) OpenHands#14506 (Postgres mirror) + chore(deps): bump @docusaurus/theme-mermaid from 3.4.0 to 3.5.1 in /docs OpenHands#3343 (acp_resume_session_id). Both halves are required and they compose. Neither alone resumes a recycled ACP conversation.load_sessionraisesACPRequestError→ SDK falls back tonew_session(today's behaviour,acp_agent.py:2039), and Solution A (#14295) can backfill context from the durable events. Three tiers, each already partly built.0. Premise check — what's actually true today (verified)
Before designing, I verified the three premises the task rests on. Two hold as stated; one needs a correction that strengthens the case.
(a) Events are durable, written by the app_server, one-way out of the sandbox — TRUE.
The sandbox POSTs events to
POST /webhooks/events/{conversation_id};on_eventfans them intoevent_service.save_event(...)(webhook_router.py:408-420). The SaaSEventServiceis object-store-backed:GoogleCloudEventService._store_eventwrites one JSON blob per event viabucket.blob(path).open('w')(google_cloud_event_service.py:57-62);AwsEventService._store_eventdoess3_client.put_object(...)under an IAM role (aws_event_service.py:54-62). The key is per-conversation:users/<user_id>/<V1_CONVERSATIONS_DIR>/<conversation_id.hex>/<event_id.hex>.json(event_service_base.py:47-65,161-168). Bucket credentials are constructed inside the app_server injector (storage.Client()/boto3.client('s3')), never in the sandbox. This is the boundary that decides §1.(b) The ACP CLI session files are NOT durable past the weak tier — TRUE.
acp_isolate_data_dir(#3492/#1019) relocates the provider's data root to<persistence_dir>/acp/<provider>(acp_agent.py:1609-1625, 1627-1688), which is/workspace/conversations/<conv_hex>/acp/<provider>/— on the/workspacePVC./workspacesurvives pause/resume (k8s scale 0↔1, same Deployment/PVC) but is deleted on STOP (runtime-apik8s.py:488deletes the PVC; app_server delete →/stop,remote_sandbox_service.py:614) and at the 14-day creation-time TTL (cleanup.py:147-173;RUNTIME_DEAD_SECONDSdefault 86400, overridden to 1209600 in prod/staging). The SDK persists only its resume token —acp_session_id/acp_session_cwdintobase_state.json(acp_agent.py:1441-1461) — never the CLI's backing files.(c) CORRECTION — "native conversations persist for life" means the durable event store persists; native does NOT rehydrate live agent working-state on a hard STOP either.
I traced the native rehydration path end to end. There is no code that replays the event bucket back into a fresh sandbox, and no code that seeds
base_state.jsoninto one (repo-wide grep forreplay|reconstruct|rehydrate|seed_events|import_events|restore_statein the app_server returns nothing).ConversationState.create()readsbase_state.jsonpurely from the localpersistence_dir(state.py:392-429);ConversationServiceresumes only conversations whosemeta.jsonis still on local disk. The conversation-start path sends no events — only an optionalinitial_message(AppConversationStartRequesthas no history field). After a hard STOP the sandbox isMISSINGand the conversation is archived → HTTP 410 on send-message (app_conversation_router.py:505-508).So the precise, verified asymmetry — and the honest parity target — is:
This correction matters for the comparison table (§3): the bar to clear is "match the event store's durability properties," not "match a mythical native live-resume." The object store clears that bar by construction; the PVC options do not.
1. Recommended architecture
1.1 The two halves of ACP resume (state the dependency explicitly)
On a fresh PVC (post-STOP / post-TTL), both
base_state.json(which holds the FS-persistedacp_session_id) and the CLI files are gone — they shared the dead PVC. OpenHands/OpenHands#14506+#3343 restore half (i) from durable Postgres; this design restores half (ii) from the durable bucket._start_acp_serverthen reads the id fromacp_resume_session_id(precedence over the absent FS id, per OpenHands/OpenHands#3343) and callsload_session, which now finds the restored files. Ship neither half expecting resume on its own.1.2 Process boundary & credential model — route through the app_server (not presigned URLs, not sandbox creds)
The sandbox has exactly one privileged channel: the webhook POST to the app_server, authenticated by its
X-Session-API-Keyand validated byvalid_sandbox(webhook_router.py:230-273), which resolves the owning user so the app_server can scope storage tousers/<user_id>/…. Reuse it verbatim./webhooks/.../acp-snapshotPUT+GET, app_server does the bucket I/O)FileStore(it exists:file_store/files.py:7, withs3.py/google_cloud.py/local.pybackends, wired asconfig.file_store,config.py:195). Symmetric with how every event already flows. Blob bytes transit the app_server — negligible at this data scale (KB–low-MB, snapshot per turn-boundary; events already transit this path every turn).generate_presigned_url/generate_signed_url/ExpiresIn). It would be the only such mechanism in the codebase, plus: a new bearer capability crossing the boundary (expiry/clock-skew handling), and a new bucket-egress requirement for the sandbox (today it egresses to the app_server, not to S3/GCS). The sole upside — offloading app_server bandwidth — doesn't apply at this size.1.3 Where the bytes live — alongside the events, same bucket, same keying
Write one object per provider under the conversation's existing prefix, e.g.:
Two implementation choices, both satisfying "ride the same bucket abstraction, keyed by conversation id, alongside the events":
AcpSnapshotServicemirroringEventServiceBase's injector pattern (GCS/S3/filesystem backends, sameget_conversation_pathkeying) — a sibling in theevent/package family. Faithful to "alongside the events," reuses the per-conversation keying and the credential plumbing.config.file_store(FileStore.write(path, bytes)) directly. Confirm it points at the same bucket as the EventService in SaaS (§5 open question); if it does, this is a few lines.1.4 Trigger points
Snapshot (capture) — primary trigger is the idle/terminal turn-boundary, not pod death.
The agent-server already emits a
ConversationStateUpdateEvent(key='execution_status')on every status change, and the app_server already detectsexec_status.is_terminal()(webhook_router.py:457-461). That transition is the natural quiescent point: the ACP subprocess has flushed its session JSONL at end-of-turn and is idle. Snapshot there. This bounds worst-case data loss to a single in-flight turn — and that turn's events are still durable, so Solution A can backfill it.tini→ uvicornhandle_exit→api_lifespanfinally,api.py:208→EventService.__aexit__,event_service.py:1238) runs within the 30 sterminationGracePeriodSeconds, but the stuck-pod force-kill (grace 0) and hard node failures skip it. Use graceful-shutdown as an opportunistic extra flush, never the sole capture.Restore — pre-spawn, seed-if-absent, before
load_session.The single correct wire-in is
_start_acp_server, after the env/cwd are finalised and beforeasyncio.create_subprocess_exec(acp_agent.py:1932). Restore writes the tar intoacp/<provider>/<subtree>using the same seed-if-absent semantics the materialiser already uses (acp_agent.py:1746-1759): if the PVC already has the files (pause/resume — PVC intact), do not clobber them; only hydrate when absent (fresh PVC). This makes the snapshot a strict fallback to the PVC — the two tiers compose and the bucket copy can never regress live state. It is synchronous-before-spawn, so there is no restore-vs-subprocess race.1.5 Consistency / atomicity
put_object, localos.replace), so a reader never sees a half-written snapshot. Build the tar in a temp path, then singlewrite.load_session→ACPRequestError→new_session...), mirroring theACPFileSecretSpecvalidators (acp_providers.py:108-125).1.6 Security — the snapshot scope decision (the crux)
Because
acp_isolate_data_dirpointsCODEX_HOMEat<persistence_dir>/acp/codex, that dir holds bothsessions/andauth.json(the live refresh token) — the relocation and the materialised credential "always agree on one directory" by design (acp_agent.py:1635-1636; specacp_providers.py:354-359). I confirmed the same shape on disk for Claude: underCLAUDE_CONFIG_DIRthe transcripts sit inprojects/<cwd-hash>/<session-id>.jsonl(the filename is theload_sessionid), while the root holds credentials, a 2.4 MB globalhistory.jsonl, caches and settings.Decision: snapshot an ALLOWLIST of the transcript subtree, nothing else.
CODEX_HOME=…/acp/codexsessions/**auth.json(refresh token),history.jsonl,config.toml, cachesCLAUDE_CONFIG_DIR=…/acp/claude-codeprojects/**.credentials.json,history.jsonl(2.4 MB global),settings*.json,*-cache.jsonHOME=…/acp/gemini-cliauth.jsonis independently re-seeded on launch from the secret channel (materialisation [ACP on Cloud] SDK: materialise reserved file-content auth secrets (Codex auth.json, Gemini Vertex SA) #2115/#1022, seed-if-absent); Claude's token is injected via env var. So sessions-only is sufficient forload_session, and live tokens never ride to the bucket.Cipher(Fernet/OH_SECRET_KEY,cipher.py:22— already what encryptsacp_env) as opt-in hardening. Note the conditional: if we ever included auth files (we do not), Cipher-wrap would be mandatory; because we exclude them, it is optional defense-in-depth.1.7 Provider differences (who actually benefits)
load_sessionworks (validated previously on ChatGPT auth);sessions/is a clean subtree;auth.jsonalready re-materialised. High value.projects/; filename = session-id. Depends on chore(deps): bump @docusaurus/theme-mermaid from 3.4.0 to 3.5.1 in /docs OpenHands#3343'sCLAUDE_CONFIG_DIRdecoupling (condition API-key stripping on.credentials.jsonpresence, not bareCLAUDE_CONFIG_DIR) so the dir can be relocated for snapshotting even under API-key auth.load_sessionis unreliable (gemini-cli errors → SDK mints fresh); personal creds are host-bound-encrypted (useless on a recycled pod); its only data-dir lever isHOME(wide blast radius). [ACP on Cloud] Persistence: durable config + native session storage across pod recycles #2116 already routes Gemini to bootstrap-prompt resume (Solution A, fix(acp): bootstrap-prompt resume when sandbox is recycled (solution A, #14260) OpenHands#14295). Keep it there; snapshot nothing.1.8 Failure ladder (graceful degradation — mostly already built)
agent_name/agent_version(already captured at init,acp_agent.py:1453-1454) in the object metadata/key; skip restore on major-version mismatch and fall straight to Solution A, rather than feed an incompatible blob toload_session.2. Concrete wiring plan (new vs extended)
Agent-server / SDK (owns the files; knows the dir layout):
~/repositories/software-agent-sdkACPAgent.export_cli_session_blob(state) -> bytes | None— tar the provider's allowlisted subtree (sessions//projects/) from_acp_file_secret_dir(state, provider.key)(acp_agent.py:1609-1625); returnNonefor Gemini/unknown. Pure, side-effect-free, credential-excluding.ACPAgent.import_cli_session_blob(state, blob) -> None— seed-if-absent extract into the same subtree, path-safe. Call it in_start_acp_serverimmediately beforecreate_subprocess_exec(acp_agent.py:1932).ACPAgent.acp_snapshot_session_blob: bool = False— the feature flag, presence-checked by the app_server exactly likeacp_resume_session_id/acp_isolate_data_diralready are (the'…' in ACPAgent.model_fieldsguard pattern from feat(acp): persist ACP session id, redirect storage onto /workspace PVC (#14260 Solution B) OpenHands#14506). Off by default; the SDK owns the mechanism, downstream owns the policy.execution_statustransition (the same signalEventServicealready publishes,event_service.py:794), callexport_cli_session_bloband POST it to the app_server over the existing webhook channel; opportunistically also flush inEventService.__aexit__(event_service.py:1238). On conversation init, GET the blob and hand it toimport_cli_session_blobbeforeinit_state.App_server (owns bucket creds + user-scoping):
~/repositories/OpenHandswebhook_router.py, alreadyprefix='/webhooks', alreadyvalid_sandbox-authenticated):PUT /webhooks/conversations/{conversation_id}/acp-snapshot/{provider}andGET …— write/read the object via the chosen store (§1.3).AcpSnapshotService(or reuseconfig.file_store,config.py:195) — mirrorsEventServiceBasekeying so the object lands under the conversation's existing prefix (event_service_base.py:47-65).acp_snapshots/objects (parity with event cleanup).Prereqs already in flight (Phase 0): OpenHands/OpenHands#3343 (
acp_resume_session_id+CLAUDE_CONFIG_DIRdecoupling), OpenHands/OpenHands#14506 (Postgres session-id mirror, Solution B 2a/2b), OpenHands/OpenHands#3492/#1019 (acp_isolate_data_dir, the per-conversation dir this snapshots).3. Comparison vs #2116's currently-written substrate options
ADDITIONAL_PVClong-lived volumeRUNTIME_DEAD_SECONDSADDITIONAL_PVCmechanism (k8s_resources.py:215-242), cross-pod attach semantics./workspace(incl.auth.json, refresh tokens) persisted on a long-lived volume — larger at-rest credential exposure, longer.auth.jsonsits on the PVC for the extended window.session/loadthat survives exactly what the event store survives → the real target (§0).The PVC options keep ACP resume coupled to runtime/volume lifecycle — the exact coupling #2116 identifies as the failure (
ownerReference→ Deployment → cascade-delete vector). The object store decouples session durability from runtime lifecycle, which is why the events are durable in the first place.4. Phased implementation (each independently mergeable, feature-guarded)
'acp_resume_session_id' in ACPAgent.model_fields.export/import_cli_session_blob(Codexsessions/**) + theacp_snapshot_session_blobflag; app_server PUT/GET routes + store; snapshot on idle, restore-before-launch, seed-if-absent. Behind the flag, off by default. Validates the whole loop on the easiest provider.projects/**(requires chore(deps): bump @docusaurus/theme-mermaid from 3.4.0 to 3.5.1 in /docs OpenHands#3343'sCLAUDE_CONFIG_DIRdecoupling); version-stamp + skew guard; opportunistic graceful-shutdown flush; conversation-delete GC.5. Open questions / risks
config.file_storethe same bucket as theEventService? Both are object-store-backed and creds-in-app_server (so "no new infra" holds either way), but the goal is for the blobs to sit alongside the events. The EventServices use raw boto3/GCS clients with ausers/prefix;file_store/is a parallel stack. De-risk: confirm SaaS config maps both to the same bucket, or implementAcpSnapshotServiceagainst the EventService's injector so co-location is guaranteed.conversation_id.hex(live_status_app_conversation_service.py:734), but the send-message path 410s aMISSINGsandbox (app_conversation_router.py:505-508). Whether re-opening an archived conversation routes through start (resurrect) or send (410) is a product-flow question. This design is agnostic — it makes the conversation resumable on any fresh PVC, which is the prerequisite for an "un-archive → resume" flow to ever work for ACP — but the flow itself is out of scope here and should be confirmed with whoever owns the conversation lifecycle.sessions/internal layout / multi-file rollouts across CLI versions — the allowlist tars the wholesessions/subtree so it's layout-agnostic, but a version that splits state outsidesessions/would be missed. The version-stamp/skew guard (§1.8) is the backstop.webhook_router.py:461). Driving snapshot from the agent-server side (where the files are) on the same idle signal avoids a round-trip, but confirm the agent-server has a clean per-turn idle hook to attach to (theEventServicestate-change callback,event_service.py:794, is the candidate).history.jsonlprivacy — both CLIs keep a global command history at the data-root (2.4 MB observed). The allowlist excludes it; double-check no provider writes resumable session state into that global file (none observed, but version-watch).6. E2E validation plan
Mechanism-level checks are already covered by passing SDK tests (
test_codex_auth_json_materialises_to_conversation_root,test_claude_isolates_under_oauth_token,test_composes_with_materialised_codex_auth, and theTestACPSessionIdPersistenceresume suite). The new end-to-end assertion is the STOP-simulating round trip:acp_isolate_data_dir=Trueand the newacp_snapshot_session_blob=True; run one turn. Assert files exist at…/acp/codex/sessions/**andauth.jsonat the root.sessions/**and notauth.json/history.jsonl(the credential-leak gate — this is the test that must never regress).base_state.jsonand the CLI files are gone — the hard-STOP condition, not the pause condition.acp_resume_session_idfrom the Postgres mirror (#14506) and let restore pull the blob. Assert restore wrotesessions/**back, seed-if-absent (and did not fabricate anauth.jsonfrom the blob — auth comes only from materialisation).session/load, notnew_session. Hook the ACP connection and assertload_session(session_id, cwd)was called and succeeded (resumed id == prior id,acp_agent.py:1431-1435), transcript continuity holds, andnew_sessionwas not called.ACPRequestError→new_session(or Solution A if enabled), no crash. (b) Bump the stamped CLI major version → assert restore is skipped and it falls to Solution A. (c) Gemini → assert no snapshot is written and resume stays on bootstrap-prompt.A local approximation of steps 1–2 and the credential-leak gate (step 2) is runnable today with the locally-installed
codex/codex-acpagainst a throwawayCODEX_HOME; the full fresh-PVC relaunch (steps 3–5) needs the cloud harness with OpenHands/OpenHands#14506 in place.simonrosenberg commentedon Jun 9, 2026
Closing as won't-do per the ACP-cloud architectural pivot (2026-06-08): cloud ACP will behave like the regular OpenHands agent — pause/resume only, archive at the 14-day runtime TTL — so the survive-a-full-recycle resume stack this issue is part of is dropped. Replacement scope: #2057 (OpenHands: revert bootstrap + enable
acp_isolate_data_dir) and #2061 (canvas: remove wake UI). See OpenHands/OpenHands#15746.