Session Rename

v1.0.0

Rename OpenClaw chat sessions by updating the session history store or calling the built-in `sessions.rename` backend path. Use when the user asks to rename,...

0· 88·0 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for maverick-software/session-rename.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Session Rename" (maverick-software/session-rename) from ClawHub.
Skill page: https://clawhub.ai/maverick-software/session-rename
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install session-rename

ClawHub CLI

Package manager switcher

npx clawhub@latest install session-rename
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (rename sessions) matches the instructions: either call the backend sessions.rename or update session_history.displayName in the local history.db. No unrelated env vars, binaries, or external services are requested.
Instruction Scope
Instructions include direct filesystem access (searching for history.db and running a Python SQLite update). This is necessary for the stated goal, but searching arbitrary paths or performing DB writes carries risk if executed incorrectly. The SKILL.md warns to confirm instance and to be surgical, which mitigates but does not eliminate that risk.
Install Mechanism
No install steps or external downloads — instruction-only. Nothing is written to disk by an installer, lowering supply-chain risk.
Credentials
The skill requests no environment variables, credentials, or config paths beyond local OpenClaw DB locations. The scope of access (local session DB) is proportional to the purpose.
Persistence & Privilege
Skill is not always-enabled and does not request persistent elevated privileges. It does instruct writing to a local DB, which is appropriate for renaming sessions but should be run only when the target instance is confirmed.
Assessment
This skill appears to do what it says: rename sessions either via the backend API or by directly updating OpenClaw's SQLite history.db. Before using it: prefer the backend sessions.rename method when available; if you must edit the DB, make a backup of history.db first; confirm the correct agent instance and sessionId to avoid accidentally changing other sessions; avoid broad filesystem searches (limit to likely OpenClaw paths) and do not run these edits on remote machines you do not fully trust. If you need higher assurance, request code that uses the built-in backend method instead of direct DB writes.

Like a lobster shell, security has layers — review code before you run it.

latestvk974kbb0tw11pb3be7jf9db9s584q54b
88downloads
0stars
1versions
Updated 2w ago
v1.0.0
MIT-0

Session Rename

Rename sessions by targeting the correct session_history.displayName record.

Quick rules

  • Determine which OpenClaw instance owns the session before changing anything.
  • Prefer the product path when available:
    • backend method: sessions.rename
    • storage field: session_history.displayName
  • If the UI/browser path is unavailable, update the DB directly.
  • Update only the intended row. Do not bulk-rename all rows for a sessionKey unless the user explicitly wants that.

How rename works in OpenClaw

The canonical storage is the SQLite table:

  • table: session_history
  • key: sessionId
  • display field: displayName

Backend implementation:

  • src/gateway/server-methods/sessions.tssessions.rename
  • src/config/sessions/history-db.tsupdateSessionName(db, sessionId, name)

The backend ultimately runs SQL equivalent to:

UPDATE session_history
SET displayName = ?, updatedAt = ?
WHERE sessionId = ?;

Workflow

  1. Identify which instance owns the session.
  2. Find the active row in that instance's history.db.
  3. Prefer the row with:
    • matching sessionKey
    • status='active'
    • most recent updatedAt
  4. Set displayName to the requested title.
  5. Confirm by reading the updated row back.
  6. Tell the user to refresh the Sessions view if the UI does not update immediately.

Direct DB rename pattern

Use a surgical SQLite update against the target instance's session history DB.

Typical query flow:

python3 - <<'PY'
import sqlite3, time
p='/path/to/history.db'
conn=sqlite3.connect(p)
cur=conn.cursor()
row=cur.execute("select sessionId from session_history where sessionKey=? and status='active' order by updatedAt desc limit 1", ('agent:main:main',)).fetchone()
if not row:
    row=cur.execute("select sessionId from session_history where sessionKey=? order by updatedAt desc limit 1", ('agent:main:main',)).fetchone()
if not row:
    raise SystemExit('No session row found')
cur.execute(
    "update session_history set displayName=?, updatedAt=? where sessionId=?",
    ('New Session Title', int(time.time()*1000), row[0]),
)
conn.commit()
print(cur.execute("select sessionId, sessionKey, displayName, status from session_history where sessionId=?", (row[0],)).fetchone())
conn.close()
PY

Finding the right DB

Typical path shape:

~/.openclaw/agents/<agent-id>/sessions/history.db

If the location is unknown, search for SQLite DBs containing a session_history table before writing.

Safety notes

  • Confirm the correct instance before writing.
  • Do not overwrite labels in unrelated archived rows unless explicitly asked.
  • Preserve sessionId; only change displayName and updatedAt.
  • If multiple active candidates exist, inspect before writing.

UI caveat

A successful DB write may still require a UI refresh to show the new title. If the rename does not appear immediately, refresh the Sessions view or reconnect the UI.

Comments

Loading comments...