hermes - 💡(How to fix) Fix Cron job profile switching leaks Feishu pairing state across profiles [1 pull requests]

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…

When a cron job is triggered from a different profile context (default profile) but configured with profile: other_profile (e.g. gouxiaoqian), the Feishu platform pairing state (feishu.mode: pairing) from the target profile leaks into the source profile, causing the source profile's Feishu adapter to suddenly switch to pairing mode and mark previously authorized users as Unauthorized user.

Root Cause

When a cron job is triggered from a different profile context (default profile) but configured with profile: other_profile (e.g. gouxiaoqian), the Feishu platform pairing state (feishu.mode: pairing) from the target profile leaks into the source profile, causing the source profile's Feishu adapter to suddenly switch to pairing mode and mark previously authorized users as Unauthorized user.

Fix Action

Fixed

Code Example

WARNING gateway.run: Unauthorized user: <user_id> (<user_name>) on feishu
RAW_BUFFERClick to expand / collapse

Description

When a cron job is triggered from a different profile context (default profile) but configured with profile: other_profile (e.g. gouxiaoqian), the Feishu platform pairing state (feishu.mode: pairing) from the target profile leaks into the source profile, causing the source profile's Feishu adapter to suddenly switch to pairing mode and mark previously authorized users as Unauthorized user.

Steps to Reproduce

  1. Profile A (default) has Feishu configured via .env (FEISHU_APP_ID/FEISHU_APP_SECRET), no feishu.mode set
  2. Profile B (e.g. gouxiaoqian) has Feishu configured with feishu.mode: pairing in config.yaml, separate Feishu app
  3. Create a cron job with profile: gouxiaoqian and deliver: feishu:<chat_id>
  4. From the default profile context, run: cronjob(action='run', job_id='<job_id>')
  5. Immediately after, the default profile's Feishu adapter starts rejecting messages with:
    WARNING gateway.run: Unauthorized user: <user_id> (<user_name>) on feishu
  6. A pending pairing code entry appears in ~/.hermes/pairing/feishu-pending.json for the default profile's user even though no pairing was ever configured for this profile

Expected Behavior

Cron job profile switching should be fully isolated — running a job with profile: other_profile should NOT modify or contaminate the source profile's Feishu platform state.

Actual Behavior

The target profile's feishu.mode: pairing setting leaks into the source profile's gateway runtime state. After the cron job executes:

  • The source profile's Feishu adapter starts checking feishu-approved.json
  • Users who were previously authorized become Unauthorized user
  • The only fix is to manually create feishu-approved.json and restart the gateway

Environment

  • Hermes Agent v2026.5.16-745-g729a778af
  • Platform: Feishu/Lark
  • Linux (Alibaba Cloud Linux 3)
  • Config: default profile (no feishu.mode) + gouxiaoqian profile (feishu.mode: pairing)

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 Cron job profile switching leaks Feishu pairing state across profiles [1 pull requests]