Session Sync for Openclaw

A cross-session memory synchronization protocol that maintains absolute context consistency for AI agents across diverse communication channels like Feishu and webchat.

sdt328606
v1.0.0
Jun 2, 2026
0
614
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install stitch-session-sync

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install stitch-session-sync using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Session Sync?

Session Sync provides a structured persistence protocol engineered to bridge the contextual gap when AI agents interact across split environments or distinct platforms. In default deployments, conversational contexts within multi-channel systems like Feishu and webchat operate in siloed environments. When an AI agent moves between these platforms, it inherently experiences context fragmentation or 'amnesia.' Session Sync solves this architectural flaw by establishing an optimized, shared file infrastructure that functions as a universal cross-channel memory bridge.

By formalizing standard memory state operations into Openclaw Skills deployments, this protocol ensures that runtime variables, short-term session objectives, and long-term historical facts remain persistently available. This prevents fragmented conversational experiences and empowers enterprise AI systems to multi-task seamlessly without shedding operational knowledge.

Session Sync Use Cases

  • Transitioning active workflows and conversation threads seamlessly between enterprise apps like Feishu and localized webchat portals without losing conversational track.
  • Initiating cold sessions with instant access to task checkpoints, last-known decisions, and immediate follow-ups.
  • Standardizing automated daily routine cleanups and context-reduction pipelines for multi-agent systems.

How Session Sync Works

  1. Session Initialization Check: When a new channel session initializes, the agent reads current and previous daily logs (memory/YYYY-MM-DD.md), global long-term facts (MEMORY.md), and the active runtime task states (memory/SESSION-STATE.md).
  2. Active Session Cross-Checking: The system calls sessions_list to discover other active operational sessions running concurrently. If active processes are detected, it invokes sessions_history to parse recent historical mutations.
  3. Inline Memory Mutation: During live execution, the agent instantly appends vital process milestones, new discoveries, critical structural modifications, and topic changes directly into the active daily logs and updates SESSION-STATE.md.
  4. Teardown & Intermission State Saving: Upon manual termination or an inactive conversational intermission, the system flushes structured operational metadata including channel info, timestamps, and open action items into SESSION-STATE.md.
  5. Long-Term Consolidations: Daily routines condense episodic metrics from dynamic daily files, distilling them into high-value, persistent records stored inside the primary MEMORY.md ledger.

Session Sync Setup

To deploy and initialize the Session Sync protocol inside your execution workspace, configure the file path schemas and invoke the automated utilities.

Manually execute the archival script to process historical log rotations:

bash skills/session-sync/scripts/cleanup-memory.sh

Ensure that the agent execution profile contains valid platform permissions for reading and writing to your designated workspace directory.

Session Sync Data Schema & Taxonomy

The protocol structures storage patterns explicitly inside a dedicated /memory storage tree to maintain consistency:

File Path Type Storage Behavior & Lifetime
memory/YYYY-MM-DD.md Log / Journal Append-only raw execution history. Rotated and archived after 7 days.
memory/SESSION-STATE.md Hot State Overwrite-only state snapshot tracking current tasks, decisions, and immediate actions.
MEMORY.md Core Ledger Long-term consolidated memory repository. Modified during scheduled consolidation phases.
memory/archive/ Cold Storage Target directory for historical daily logs migrated via the automated cleanup script.

Session Sync Advanced Features

  • Automated Log Rotation Engine: Runs routine disk cleanups using standalone shell utilities to archive tracking items older than 7 days into targeted cold storage sub-folders.
  • Concurrent Session Interrogation: Uses built-in sessions_list and sessions_history hooks to identify cross-talk conflicts and sync state states dynamically.
  • Optimized Memory Layering: Divides state tracking into highly reactive Hot States (SESSION-STATE.md), chronological logs, and static Cold Ledgers (MEMORY.md) to balance API token consumption and memory depth.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*