hermes - 💡(How to fix) Fix [Bug]: sb Hermes误删了我的所有助手,12个助手全都被清空

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example

pm2 delete clerk-bot coder-bot
pm2 save
rm /home/wazy/NanoGemClaw/bots/coder_logic.mjs
rm /home/wazy/NanoGemClaw/bots/clerk.mjs
hermes update   # 先更新到最新版
hermes gateway setup

---

hermes update   # 先更新到最新版

---

# hermes_cli/main.py
"  Try manually: git fetch origin && git reset --hard origin/main"

---

⚠️  This will upload the following to a public paste service:
System info (OS, Python version, Hermes version, provider, which API keys
    are configured — NOT the actual keys)
Recent log lines (agent.log, errors.log, gateway.log — may contain
    conversation fragments and file paths)
Full agent.log and gateway.log (up to 512 KB each — likely contains
    conversation content, tool outputs, and file paths)

Pastes auto-delete after 6 hours.

Collecting debug report...
Uploading...

Debug report uploaded:
  Report     https://paste.rs/yE5vJ
  agent.log  https://paste.rs/fWdQq

Pastes will auto-delete in 6 hours.
To delete now:  hermes debug delete <url>

Share these links with the Hermes team for support.

---
RAW_BUFFERClick to expand / collapse

Bug Description

诊断结果

根本原因:hermes update 触发 git reset --hard

关键证据

~/.bash_history 第 468-478 行发现:

pm2 delete clerk-bot coder-bot
pm2 save
rm /home/wazy/NanoGemClaw/bots/coder_logic.mjs
rm /home/wazy/NanoGemClaw/bots/clerk.mjs
hermes update   # 先更新到最新版
hermes gateway setup

hermes 记忆文件明确警告

不要用 hermes update:会触发 git reset --hard 清空本地修改


丢失文件清单

文件状态原因
~/.ssh完全丢失git reset --hard
~/.gnupg完全丢失git reset --hard
~/.docker/config.json丢失git reset --hard
PM2 进程配置被删除pm2 delete + pm2 save
NanoGemClaw 脚本被删除rm 命令
Node.js v22.22.2被替换NVM 更新到 v24.15.0

时间线

  1. 5 月 11 日 07:09 - PM2 目录被修改,进程被删除
  2. 5 月 11 07:16 - hermes cron 目录创建
  3. 5 月 11 07:50 - tick.lock 文件创建
  4. 5 月 11 07:54 - WSL 异常关闭,PM2 服务失败

恢复方案

需要确认:

  1. 是否要恢复 PM2 助手? 需要重新创建脚本并添加到 PM2
  2. SSH 密钥是否有备份? 如果没有需要重新生成
  3. NanoGemClaw 脚本 是否有 Git 备份?

我可以帮你:

  1. 修复 PM2 服务配置(更新为 v24.15.0)
  2. 检查是否有 Git 历史可以恢复脚本
  3. 重新创建 SSH 密钥

你想先恢复哪个?

Hermes 是什么?

Hermes 是一个开源的 AI 助手系统(管家),由 NousResearch 开发,通过飞书、微信等平台接收任务。你安装了它,并配置了:

  • 飞书通道(配对码:6BFWS2RC)
  • 多个 AI 模型(ARK、OpenRouter 等)
  • 多个 PM2 助手(clerk-bot、audit-bot、coder-bot 等)

为什么会发生这种事?

根本原因:hermes update 执行了 git reset --hard

~/.bash_history 第 478 行发现:

hermes update   # 先更新到最新版

hermes 的代码注释明确承认

When the user upgrades code via git pull (or hermes update crashes between git reset --hard and uv pip install -e .)...

hermes 记忆文件也警告过

不要用 hermes update:会触发 git reset --hard 清空本地修改


发生了什么

  1. 你(或 hermes agent)执行了 hermes update
  2. hermes update 内部执行了 git reset --hard origin/main
  3. 这清空了所有本地配置文件
    • ~/.ssh - SSH 密钥
    • ~/.gnupg - GPG 密钥
    • ~/.docker/config.json - Docker 配置
    • PM2 进程配置
    • NanoGemClaw 脚本

这是设计缺陷还是 bug?

是设计缺陷

  1. hermes update 默认执行 git reset --hard,不警告用户
  2. 没有备份用户的配置文件
  3. 记忆文件中的警告不够明显

hermes 代码中的证据

# hermes_cli/main.py
"  Try manually: git fetch origin && git reset --hard origin/main"

当前状态

项目状态能否恢复
PM2 助手全部丢失需要重新创建脚本
SSH 密钥丢失需要重新生成
NanoGemClaw 脚本被删除不是 git 仓库,无法恢复
hermes 配置正常未受影响

恢复方案

  1. PM2 服务:修复配置(更新为 v24.15.0),重新创建助手脚本
  2. SSH 密钥:重新生成
  3. NanoGemClaw:检查是否有备份

需要你确认

  1. 你是否记得执行过 hermes update
  2. 是否有备份这些脚本?
  3. 想先恢复哪个?

这是一个严重的安全问题,我建议:

  1. 永远不要使用 hermes update
  2. 使用 git pull 代替,但先备份配置文件

Steps to Reproduce

不知道如何触发的

Expected Behavior

恢复所有被删文件

Actual Behavior

删除了我所有的助手和配置文件

Affected Component

Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

No response

Debug Report

⚠️  This will upload the following to a public paste service:
  • System info (OS, Python version, Hermes version, provider, which API keys
    are configured — NOT the actual keys)
  • Recent log lines (agent.log, errors.log, gateway.log — may contain
    conversation fragments and file paths)
  • Full agent.log and gateway.log (up to 512 KB each — likely contains
    conversation content, tool outputs, and file paths)

Pastes auto-delete after 6 hours.

Collecting debug report...
Uploading...

Debug report uploaded:
  Report     https://paste.rs/yE5vJ
  agent.log  https://paste.rs/fWdQq

⏱  Pastes will auto-delete in 6 hours.
To delete now:  hermes debug delete <url>

Share these links with the Hermes team for support.

Operating System

Ubuntu 24.04

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug]: sb Hermes误删了我的所有助手,12个助手全都被清空