← 返回
未分类 中文

subsession-delete

Delete an OpenClaw child session cleanly by removing its transcript, trajectory files, and sessions.json index entry.
干净地删除 OpenClaw 子会话,移除其 transcript、trajectory 文件和 sessions.json 索引条目。
kid0114 kid0114 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 329
下载
💾 0
安装
1
版本
#cleanup#latest#openclaw#session

概述

Subsession Delete

Use this skill when you need to remove a spawned child session cleanly so it disappears from both disk and the session index/UI.

Scope

This skill removes a child session by:

  • deleting the main transcript .jsonl
  • deleting related .trajectory.jsonl and .trajectory-path.json
  • removing matching entries from sessions.json
  • verifying the session no longer appears in session listings

Safety boundary

  • Treat this as destructive local deletion.
  • Confirm the exact target session before execution.
  • Prefer deleting child/subagent test sessions, not active primary sessions.
  • Default to dry-run first unless the user explicitly wants immediate deletion.

Recommended command

python3 skills/subsession-delete/scripts/delete_subsession.py \
  --session-key 'agent:subtest2:subagent:EXAMPLE' \
  --execute

You can also target by session id:

python3 skills/subsession-delete/scripts/delete_subsession.py \
  --session-id '3e16bcb6-998c-45dd-9906-001792b8b706' \
  --agent-id subtest2 \
  --execute

Behavior

  1. Resolve the agent/session target from sessionKey or sessionId
  2. Load the target agent's sessions.json
  3. Identify all matching session files
  4. Delete the files that exist
  5. Remove matching sessions.json records
  6. Verify the session id/key no longer appears in the index

Report back

Return:

  • target session key/id
  • deleted file paths
  • whether sessions.json changed
  • verification result

Guardrails

  • Do not guess the target session.
  • Do not delete unrelated sessions in the same folder.
  • If the session is missing on disk but still indexed, clean the index too.
  • If the session is active/running, stop and ask before forcing deletion.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 00:46 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 688 📥 331,715
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 199 📥 68,361
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,210