Session Rename for Openclaw

A specialized utility for renaming and organizing OpenClaw chat sessions by updating the session history store or backend paths.

maverick-software
v1.0.0
Apr 12, 2026
0
871
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install session-rename

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 session-rename 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 Rename?

The Session Rename skill provides a reliable method for developers and AI agents to manage chat session identities within the OpenClaw ecosystem. By targeting the session_history.displayName record, this skill ensures that workspaces remain organized and easy to navigate. It is designed to handle requests for retitling, relabeling, or renaming active or archived sessions across different agent instances.

Built to interface directly with the OpenClaw architecture, the skill bridges the gap between user intent and database integrity. Whether utilized through the built-in sessions.rename backend path or via surgical SQLite updates, it prioritizes data safety and precision, ensuring that only the intended session metadata is modified while preserving the core sessionId.

Session Rename Use Cases

  • Renaming a generic chat session to a descriptive project title for better organization.
  • Correcting session labels when multiple agents are active across different instances.
  • Automating the retitling of chat logs after a specific task or milestone is achieved.
  • Updating session history metadata when the standard UI path is unavailable or unresponsive.

How Session Rename Works

  1. The skill identifies the specific OpenClaw instance and agent ID that owns the target session.
  2. It locates the active history.db file associated with that instance, typically within the ~/.openclaw directory.
  3. The system searches for the active row in the session_history table, filtering by sessionKey and the most recent update timestamp.
  4. It executes a targeted SQL update to change the displayName and update the updatedAt timestamp.
  5. The skill verifies the change by reading the updated record back from the database.
  6. Finally, it provides confirmation and advises a UI refresh if the changes aren't immediately visible in the frontend.

Session Rename Setup

To use this tool within the Openclaw Skills framework, ensure you have the necessary permissions to read/write to the OpenClaw application data directory. No additional installation is required if the OpenClaw CLI is active.

To manually test the database connection and pathing, you can locate your history database using:

# Find the session history database for a specific agent
ls ~/.openclaw/agents/<agent-id>/sessions/history.db

Ensure your environment has sqlite3 and python3 installed for the direct DB rename pattern.

Session Rename Data Schema & Taxonomy

The skill interacts with a structured SQLite schema to ensure consistency across Openclaw Skills. Below is the primary data mapping:

Table Field Type Description
session_history sessionId TEXT (PK) The unique identifier for the session.
session_history sessionKey TEXT The key identifying the agent instance.
session_history displayName TEXT The user-facing title of the session.
session_history status TEXT The current state (e.g., 'active', 'archived').
session_history updatedAt INTEGER Unix timestamp in milliseconds.

Session Rename Advanced Features

  • Surgical SQLite Updates: Executes high-precision Python/SQLite scripts to modify records without affecting global session states.
  • Multi-Instance Support: Capable of traversing different agent-specific directories to find the correct history store.
  • Fallback Logic: Automatically looks for the most recently used session if an explicit 'active' status is not found.
  • Backend Integration: Supports the native sessions.rename method found in the OpenClaw gateway server for safer, application-level changes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*