OpenClaw 2026.11.1: How to safely archive a stale session while Gateway is stopped?

What are you trying to do?

Safely archive one stale Feishu session while the Gateway is stopped, preserving its history and preventing automatic restart recovery.

Environment

  • OpenClaw version: 2026.11.1 (4ffdd20)

  • Operating system: Windows

  • Installation: Local Node.js installation

  • Gateway: Local Windows user session, started with openclaw gateway run

  • Channel: Feishu plugin disabled

What happened?

The Gateway is currently stopped.

A historical Feishu session is marked done but still has a replayable pendingFinalDelivery, with its old delivery state marked prepared.

Even with the Feishu plugin disabled, Gateway startup previously triggered main-session-restart-recovery and launched a background Agent run for this session.

The official sessions archive command requires a running Gateway, while starting the Gateway may resume the session before I can archive it.

What have you tried?

  • Disabled the Feishu plugin.

  • Confirmed that the old session remains eligible for restart recovery.

  • Reviewed the official session archive and cleanup commands.

  • Did not modify the production SQLite database or restart the Gateway to experiment.

Safe diagnostics

Relevant previous startup log messages:

[main-session-restart-recovery] dispatching restart-safe recovery for agent:main:feishu:direct:<redacted>

[main-session-restart-recovery] started interrupted main session: agent:main:feishu:direct:<redacted> (with pending payload)

Question

In OpenClaw 2026.11.1, is there an officially supported way to:

  1. Archive one specific session while the Gateway is stopped; or

  2. Temporarily disable main-session restart recovery during a maintenance startup, so the official sessions archive command can be used?

I want to preserve session history and audit information, avoid direct SQLite changes, and leave other agents and sessions unaffected.

Thank you!

Howdy @vc_war3 ! There may be an offline repair path that avoids starting the Gateway or editing SQLite directly, I’ll share here:

The restart-recovery docs describe openclaw doctor --fix retiring terminal unmatched legacy restart custody. That repair backs up the original database, preserves the session’s terminal status and transcript, and retires the pending final delivery with an unknown outcome rather than replaying it. The original delivery content remains in the backup. The relevant change is PR #189261.

Here’s my suggested approach:

  1. Keep the Gateway stopped and back up the state directory.
  2. Run openclaw doctor --json against the same profile/state/config for a read-only report.
  3. If it identifies terminal unmatched legacy restart custody, check that your installed build includes #189261 before running openclaw doctor --fix.
  4. Verify the repair report before starting the Gateway, then archive the affected session through the normal supported command.

Caveats: status: done plus pendingFinalDelivery alone does not establish eligibility—the repair requires a legacy recovery tombstone and matching ownership conditions. Other recovery-repair branches can queue a continuation, and doctor --fix is broader than a single-session operation, so it cannot guarantee no changes to other sessions.