hermes - 💡(How to fix) Fix [i18n] Thai Translation: Messaging Part b - discord, email, feishu [1 participants]
ON THIS PAGE
Recommended Tools
×6Utilities 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
Error Message
Interactive cards ต้องการการตั้งค่า สาม ขั้นตอนใน Feishu Developer Console การขาดขั้นตอนใดขั้นตอนหนึ่งจะทำให้เกิด error 200340 เมื่อผู้ใช้คลิกปุ่ม card
หากขาดทั้งสามขั้นตอน, Feishu จะสามารถ ส่ง interactive cards ได้สำเร็จ (การส่งเท่านั้นที่ต้องการ permission im:message:send), แต่การคลิกปุ่มใดๆ จะส่งคืน error 200340 card จะดูเหมือนทำงาน - error จะปรากฏก็ต่อเมื่อผู้ใช้โต้ตอบกับมันเท่านั้น
adapter ติดตามการตอบกลับ error ติดต่อกันต่อ IP address หลังจากเกิดข้อผิดพลาดติดต่อกัน 25 ครั้งจาก IP เดียวกันภายในช่วง 6 ชั่วโมง, จะมีการบันทึก warning สิ่งนี้ช่วยตรวจจับ client ที่ตั้งค่าผิดพลาดหรือความพยายามในการ probing
| Error 200340 when clicking approval buttons | เปิดใช้งานความสามารถ Interactive Card และกำหนดค่า Card Request URL ใน Feishu Developer Console ดูที่ Required Feishu App Configuration ด้านบน |
Code Example
group_sessions_per_user: true
---
group_sessions_per_user: false
---
https://discord.com/oauth2/authorize?client_id=YOUR_APP_ID&scope=bot+applications.commands&permissions=274878286912
---
hermes gateway setup
---
# Required
DISCORD_BOT_TOKEN=your-bot-token
DISCORD_ALLOWED_USERS=284102345871466496
# Multiple allowed users (comma-separated)
# DISCORD_ALLOWED_USERS=284102345871466496,198765432109876543
---
hermes gateway
---
# Discord-specific settings
discord:
require_mention: true # Require @mention in server channels
free_response_channels: "" # Comma-separated channel IDs (or YAML list)
auto_thread: true # Auto-create threads on @mention
reactions: true # Add emoji reactions during processing
ignored_channels: [] # Channel IDs where bot never responds
no_thread_channels: [] # Channel IDs where bot responds without threading
channel_prompts: {} # Per-channel ephemeral system prompts
allow_mentions: # What the bot is allowed to ping (safe defaults)
everyone: false # @everyone / @here pings (default: false)
roles: false # @role pings (default: false)
users: true # @user pings (default: true)
replied_user: true # reply-reference pings the author (default: true)
# Session isolation (applies to all gateway platforms, not just Discord)
group_sessions_per_user: true # Isolate sessions per user in shared channels
---
# String format
discord:
free_response_channels: "1234567890,9876543210"
# List format
discord:
free_response_channels:
- 1234567890
- 9876543210
---
# String format
discord:
ignored_channels: "1234567890,9876543210"
# List format
discord:
ignored_channels:
- 1234567890
- 9876543210
---
discord:
no_thread_channels:
- 1234567890 # Bot responds inline here
---
discord:
channel_prompts:
"1234567890": |
This channel is for research tasks. Prefer deep comparisons,
citations, and concise synthesis.
"9876543210": |
This forum is for therapy-style support. Be warm, grounded,
and non-judgmental.
---
group_sessions_per_user: true
---
display:
tool_progress: "all" # off | new | all | verbose
---
display:
tool_progress_command: true
---
DISCORD_HOME_CHANNEL=123456789012345678
DISCORD_HOME_CHANNEL_NAME="#bot-updates"
---
group_sessions_per_user: true
---
# ~/.hermes/.env — ทำงานร่วมกับหรือแทนที่ DISCORD_ALLOWED_USERS
DISCORD_ALLOWED_ROLES=987654321098765432,876543210987654321
---
# ~/.hermes/config.yaml
discord:
allow_mentions:
everyone: false # อนุญาตให้ bot ping @everyone / @here
roles: false # อนุญาตให้ bot ping @role mentions
users: true # อนุญาตให้ bot ping @users รายบุคคล
replied_user: true # ping ผู้เขียนเมื่อตอบกลับข้อความของพวกเขา
---
# ~/.hermes/.env — env vars ชนะ config.yaml
DISCORD_ALLOW_MENTION_EVERYONE=false
DISCORD_ALLOW_MENTION_ROLES=false
DISCORD_ALLOW_MENTION_USERS=true
DISCORD_ALLOW_MENTION_REPLIED_USER=true
---
hermes gateway setup
---
# Required
EMAIL_ADDRESS=hermes@gmail.com
EMAIL_PASSWORD=abcd efgh ijkl mnop # App password (not your regular password)
EMAIL_IMAP_HOST=imap.gmail.com
EMAIL_SMTP_HOST=smtp.gmail.com
# Security (recommended)
EMAIL_ALLOWED_USERS=your@email.com,colleague@work.com
# Optional
EMAIL_IMAP_PORT=993 # Default: 993 (IMAP SSL)
EMAIL_SMTP_PORT=587 # Default: 587 (SMTP STARTTLS)
EMAIL_POLL_INTERVAL=15 # Seconds between inbox checks (default: 15)
EMAIL_HOME_ADDRESS=your@email.com # Default delivery target for cron jobs
---
hermes gateway # Run in foreground
hermes gateway install # Install as a user service
sudo hermes gateway install --system # Linux only: boot-time system service
---
platforms:
email:
skip_attachments: true
---
group_sessions_per_user: true
---
hermes gateway setup
---
FEISHU_CONNECTION_MODE=websocket
---
FEISHU_CONNECTION_MODE=webhook
---
/feishu/webhook
---
FEISHU_WEBHOOK_HOST=127.0.0.1 # default: 127.0.0.1
FEISHU_WEBHOOK_PORT=8765 # default: 8765
FEISHU_WEBHOOK_PATH=/feishu/webhook # default: /feishu/webhook
---
hermes gateway setup
---
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=secret_xxx
FEISHU_DOMAIN=feishu
FEISHU_CONNECTION_MODE=websocket
# Optional but strongly recommended
FEISHU_ALLOWED_USERS=ou_xxx,ou_yyy
FEISHU_HOME_CHANNEL=oc_xxx
---
hermes gateway
---
FEISHU_HOME_CHANNEL=oc_xxx
---
FEISHU_ALLOWED_USERS=ou_xxx,ou_yyy
---
FEISHU_ENCRYPT_KEY=your-encrypt-key
---
SHA256(timestamp + nonce + encrypt_key + body)
---
FEISHU_VERIFICATION_TOKEN=your-verification-token
---
FEISHU_GROUP_POLICY=allowlist # default
---
FEISHU_BOT_OPEN_ID=ou_xxx
FEISHU_BOT_USER_ID=xxx
FEISHU_BOT_NAME=MyBot
---
# ตรวจสอบ rules และสถานะ pairing ปัจจุบัน
python -m gateway.platforms.feishu_comment_rules status
# จำลองการตรวจสอบการเข้าถึงสำหรับ doc + user เฉพาะ
python -m gateway.platforms.feishu_comment_rules check <fileType:fileToken> <user_open_id>
# จัดการ pairing grants ใน runtime
python -m gateway.platforms.feishu_comment_rules pairing list
python -m gateway.platforms.feishu_comment_rules pairing add <user_open_id>
python -m gateway.platforms.feishu_comment_rules pairing remove <user_open_id>
---
platforms:
feishu:
extra:
ws_reconnect_interval: 120 # วินาทีระหว่างการพยายาม reconnect (default: 120)
ws_ping_interval: 30 # วินาทีระหว่าง WebSocket pings (optional; SDK default if unset)
---
platforms:
feishu:
extra:
default_group_policy: "open" # Default สำหรับกลุ่มที่ไม่ได้อยู่ใน group_rules
admins: # ผู้ใช้ที่สามารถจัดการ bot settings
- "ou_admin_open_id"
group_rules:
"oc_group_chat_id_1":
policy: "allowlist" # open | allowlist | blacklist | admin_only | disabled
allowlist:
- "ou_user_open_id_1"
- "ou_user_open_id_2"
"oc_group_chat_id_2":
policy: "admin_only"
"oc_group_chat_id_3":
policy: "blacklist"
blacklist:
- "ou_blocked_user"RAW_BUFFERClick to expand / collapse
📄 user-guide/messaging/discord.md
sidebar_position: 3 title: "Discord" description: "Set up Hermes Agent as a Discord bot"
การตั้งค่า Discord
Hermes Agent ผสานรวมกับ Discord ในรูปแบบบอท ทำให้คุณสามารถแชทกับ AI assistant ของคุณผ่าน direct messages หรือช่องทางในเซิร์ฟเวอร์ได้ บอทจะรับข้อความของคุณ ประมวลผลผ่าน pipeline ของ Hermes Agent (รวมถึง tool use, memory, และ reasoning) และตอบกลับแบบ real time รองรับข้อความประเภท text, voice messages, file attachments, และ slash commands
ก่อนการตั้งค่า นี่คือส่วนที่คนส่วนใหญ่ต้องการทราบ: Hermes มีพฤติกรรมอย่างไรเมื่ออยู่ในเซิร์ฟเวอร์ของคุณ
วิธีการทำงานของ Hermes
| Context | Behavior |
|---|---|
| DMs | Hermes จะตอบกลับทุกข้อความ ไม่จำเป็นต้อง @mention แต่ละ DM จะมี session เป็นของตัวเอง |
| Server channels | โดยค่าเริ่มต้น Hermes จะตอบกลับเมื่อคุณ @mention เท่านั้น หากคุณโพสต์ในช่องโดยไม่ได้ mention Hermes จะเพิกเฉยต่อข้อความนั้น |
| Free-response channels | คุณสามารถกำหนดให้ช่องเฉพาะไม่จำเป็นต้อง mention ได้ด้วย DISCORD_FREE_RESPONSE_CHANNELS หรือปิดการใช้งาน mention ทั่วโลกด้วย DISCORD_REQUIRE_MENTION=false ข้อความในช่องเหล่านี้จะถูกตอบกลับแบบ inline - จะข้าม auto-threading เพื่อให้ช่องยังคงเป็น chat ที่เบาและใช้งานง่าย |
| Threads | Hermes จะตอบกลับใน thread เดียวกัน กฎการ mention ยังคงใช้ได้ เว้นแต่ว่า thread นั้นหรือช่องหลัก (parent channel) จะถูกตั้งค่าให้เป็น free-response Threads จะแยกออกจาก parent channel เพื่อรักษาประวัติ session |
| Shared channels with multiple users | โดยค่าเริ่มต้น Hermes จะแยก session history ต่อผู้ใช้แต่ละคนภายในช่องนั้นเพื่อความปลอดภัยและความชัดเจน ผู้คนสองคนที่คุยกันในช่องเดียวกันจะไม่แชร์ transcript เดียวกัน เว้นแต่คุณจะปิดการใช้งานอย่างชัดเจน |
| Messages mentioning other users | เมื่อ DISCORD_IGNORE_NO_MENTION เป็น true (ค่าเริ่มต้น) Hermes จะนิ่งเงียบหากข้อความ @mention ผู้ใช้คนอื่น แต่ไม่ได้ mention บอท สิ่งนี้ป้องกันไม่ให้บอทกระโดดเข้าไปในบทสนทนาที่มุ่งเป้าไปที่คนอื่น ให้ตั้งค่าเป็น false หากคุณต้องการให้บอทตอบกลับทุกข้อความโดยไม่คำนึงว่าใครถูก mention สิ่งนี้ใช้ได้เฉพาะใน server channels ไม่ใช่ DMs |
:::tip
หากคุณต้องการช่องสำหรับให้คนคุยกับ Hermes โดยไม่ต้อง tag มันทุกครั้ง ให้เพิ่มช่องนั้นใน DISCORD_FREE_RESPONSE_CHANNELS
:::
Discord Gateway Model
Hermes บน Discord ไม่ใช่ webhook ที่ตอบกลับแบบ statelessly แต่ทำงานผ่าน full messaging gateway ซึ่งหมายความว่าทุกข้อความที่เข้ามาจะผ่าน:
- authorization (
DISCORD_ALLOWED_USERS) - mention / free-response checks
- session lookup
- session transcript loading
- normal Hermes agent execution, including tools, memory, and slash commands
- response delivery back to Discord
สิ่งนี้มีความสำคัญเพราะพฤติกรรมในเซิร์ฟเวอร์ที่ยุ่งเหยิงขึ้นอยู่กับการกำหนดเส้นทางของ Discord และนโยบาย session ของ Hermes
Session Model in Discord
โดยค่าเริ่มต้น:
- แต่ละ DM จะได้ session ของตัวเอง
- แต่ละ server thread จะได้ session namespace ของตัวเอง
- ผู้ใช้แต่ละคนใน shared channel จะได้ session ของตัวเองภายในช่องนั้น
ดังนั้น หาก Alice และ Bob คุยกับ Hermes ใน #research ทั้งคู่ Hermes จะถือว่านั่นเป็นการสนทนาที่แยกจากกันโดยค่าเริ่มต้น แม้ว่าพวกเขาจะใช้ Discord channel ที่มองเห็นร่วมกันก็ตาม
สิ่งนี้ถูกควบคุมโดย config.yaml:
group_sessions_per_user: trueให้ตั้งค่าเป็น false เฉพาะเมื่อคุณต้องการให้ห้องแชร์การสนทนาร่วมกันทั้งหมด:
group_sessions_per_user: falseShared sessions อาจมีประโยชน์สำหรับห้องทำงานร่วมกัน แต่ก็หมายความว่า:
- ผู้ใช้แชร์ context growth และ token costs
- งานที่ใช้ tool หนักของคนหนึ่งสามารถทำให้ context ของคนอื่นบวมได้
- การรันแบบ in-flight ของคนหนึ่งสามารถขัดจังหวะการติดตามผลของอีกคนในห้องเดียวกันได้
Interrupts and Concurrency
Hermes ติดตาม agents ที่กำลังทำงานอยู่ด้วย session key
ด้วยค่าเริ่มต้น group_sessions_per_user: true:
- การที่ Alice ขัดจังหวะคำขอ in-flight ของตัวเองจะส่งผลกระทบเฉพาะ session ของ Alice ในช่องนั้น
- Bob สามารถพูดคุยต่อไปในช่องเดียวกันได้โดยไม่ได้รับประวัติของ Alice หรือขัดจังหวะการทำงานของ Alice
ด้วย group_sessions_per_user: false:
- ทั้งห้องจะแชร์ slot ของ running-agent เดียวกันสำหรับช่อง/thread นั้น
- ข้อความติดตามผลจากคนต่างกันสามารถขัดจังหวะหรือเข้าคิวต่อกันได้
คู่มือนี้จะพาคุณไปตลอดกระบวนการตั้งค่า - ตั้งแต่การสร้างบอทของคุณบน Discord's Developer Portal ไปจนถึงการส่งข้อความแรกของคุณ
Step 1: Create a Discord Application
- ไปที่ Discord Developer Portal และลงชื่อเข้าใช้ด้วยบัญชี Discord ของคุณ
- คลิก New Application ที่มุมขวาบน
- ป้อนชื่อสำหรับแอปพลิเคชันของคุณ (เช่น "Hermes Agent") และยอมรับ Developer Terms of Service
- คลิก Create
คุณจะเข้าสู่หน้า General Information ให้จด Application ID ไว้ - คุณจะต้องใช้สิ่งนี้ในภายหลังเพื่อสร้าง invite URL
Step 2: Create the Bot
- ในแถบด้านซ้าย คลิก Bot
- Discord จะสร้างผู้ใช้บอทสำหรับแอปพลิเคชันของคุณโดยอัตโนมัติ คุณจะเห็นชื่อผู้ใช้บอท ซึ่งคุณสามารถปรับแต่งได้
- ใต้ Authorization Flow:
- ตั้งค่า Public Bot เป็น ON - จำเป็นสำหรับการใช้ Discord-provided invite link (แนะนำ) สิ่งนี้ช่วยให้แท็บ Installation สามารถสร้าง default authorization URL ได้
- ปล่อย Require OAuth2 Code Grant เป็น OFF
:::tip คุณสามารถตั้งค่า avatar และ banner แบบกำหนดเองสำหรับบอทของคุณในหน้านี้ นี่คือสิ่งที่ผู้ใช้จะเห็นใน Discord :::
:::info[Private Bot Alternative] หากคุณต้องการให้บอทของคุณเป็นส่วนตัว (Public Bot = OFF) คุณ ต้อง ใช้ method Manual URL ใน Step 5 แทนแท็บ Installation ลิงก์ที่ Discord ให้มาต้องเปิดใช้งาน Public Bot :::
Step 3: Enable Privileged Gateway Intents
นี่คือขั้นตอนที่สำคัญที่สุดในการตั้งค่าทั้งหมด หากไม่มีการเปิดใช้งาน intents ที่ถูกต้อง บอทของคุณจะเชื่อมต่อกับ Discord ได้ แต่ จะไม่สามารถอ่านเนื้อหาข้อความได้
ในหน้า Bot ให้เลื่อนลงไปที่ Privileged Gateway Intents คุณจะเห็นสวิตช์สามตัว:
| Intent | Purpose | Required? |
|---|---|---|
| Presence Intent | ดูสถานะ online/offline ของผู้ใช้ | Optional |
| Server Members Intent | เข้าถึงรายชื่อสมาชิก, resolve usernames | Required |
| Message Content Intent | อ่านเนื้อหาข้อความ | Required |
เปิดใช้งานทั้ง Server Members Intent และ Message Content Intent โดยการสลับเป็น ON
- หากไม่มี Message Content Intent บอทของคุณจะได้รับ message events แต่ข้อความจะว่างเปล่า - บอทไม่สามารถเห็นสิ่งที่คุณพิมพ์ได้จริง ๆ
- หากไม่มี Server Members Intent บอทจะไม่สามารถ resolve usernames สำหรับรายชื่อผู้ใช้ที่อนุญาต และอาจล้มเหลวในการระบุว่าใครกำลังส่งข้อความถึงมัน
:::warning[นี่คือเหตุผลอันดับ 1 ที่บอท Discord ไม่ทำงาน] หากบอทของคุณออนไลน์อยู่แต่ไม่ตอบกลับข้อความเลย Message Content Intent เกือบจะถูกปิดใช้งานแล้ว ให้กลับไปที่ Developer Portal, เลือกแอปพลิเคชันของคุณ → Bot → Privileged Gateway Intents และตรวจสอบให้แน่ใจว่า Message Content Intent ถูกสลับเป็น ON คลิก Save Changes :::
เกี่ยวกับจำนวนเซิร์ฟเวอร์:
- หากบอทของคุณอยู่ใน น้อยกว่า 100 เซิร์ฟเวอร์ คุณสามารถสลับ intents เปิด-ปิดได้อย่างอิสระ
- หากบอทของคุณอยู่ใน 100 เซิร์ฟเวอร์หรือมากกว่า Discord กำหนดให้คุณต้องส่งใบสมัครตรวจสอบเพื่อใช้ privileged intents สำหรับการใช้งานส่วนตัว สิ่งนี้ไม่ใช่ข้อกังวล
คลิก Save Changes ที่ด้านล่างของหน้า
Step 4: Get the Bot Token
bot token คือ credential ที่ Hermes Agent ใช้ในการเข้าสู่ระบบในฐานะบอทของคุณ ยังคงอยู่ในหน้า Bot:
- ใต้ส่วน Token คลิก Reset Token
- หากคุณเปิดใช้งาน two-factor authentication บนบัญชี Discord ของคุณ ให้ป้อนรหัส 2FA ของคุณ
- Discord จะแสดง token ใหม่ของคุณ คัดลอกทันที
:::warning[Token แสดงเพียงครั้งเดียว] token จะแสดงเพียงครั้งเดียว หากคุณทำหาย คุณจะต้องรีเซ็ตและสร้างใหม่ ห้ามแชร์ token ของคุณสู่สาธารณะหรือ commit มันไปยัง Git - ใครก็ตามที่มี token นี้จะควบคุมบอทของคุณได้อย่างเต็มที่ :::
เก็บ token ไว้ในที่ปลอดภัย (เช่น password manager) คุณจะต้องใช้มันใน Step 8
Step 5: Generate the Invite URL
คุณต้องการ OAuth2 URL เพื่อเชิญบอทไปยังเซิร์ฟเวอร์ของคุณ มีสองวิธีในการทำสิ่งนี้:
Option A: Using the Installation Tab (Recommended)
:::note[Requires Public Bot] วิธีนี้ต้องตั้งค่า Public Bot เป็น ON ใน Step 2 หากคุณตั้ง Public Bot เป็น OFF ให้ใช้วิธี Manual URL ด้านล่างแทน :::
- ในแถบด้านซ้าย คลิก Installation
- ใต้ Installation Contexts เปิดใช้งาน Guild Install
- สำหรับ Install Link ให้เลือก Discord Provided Link
- ใต้ Default Install Settings สำหรับ Guild Install:
- Scopes: เลือก
botและapplications.commands - Permissions: เลือก permissions ที่ระบุไว้ด้านล่าง
- Scopes: เลือก
Option B: Manual URL
คุณสามารถสร้าง invite URL ได้โดยตรงโดยใช้รูปแบบนี้:
https://discord.com/oauth2/authorize?client_id=YOUR_APP_ID&scope=bot+applications.commands&permissions=274878286912แทนที่ YOUR_APP_ID ด้วย Application ID จาก Step 1
Required Permissions
เหล่านี้คือ permissions ขั้นต่ำที่บอทของคุณต้องการ:
- View Channels - ดูช่องที่เข้าถึงได้
- Send Messages - ตอบกลับข้อความของคุณ
- Embed Links - จัดรูปแบบการตอบกลับที่สวยงาม
- Attach Files - ส่งรูปภาพ, เสียง, และไฟล์ output
- Read Message History - รักษา context การสนทนา
Recommended Additional Permissions
- Send Messages in Threads - ตอบกลับในบทสนทนาแบบ thread
- Add Reactions - แสดง reaction กับข้อความเพื่อการรับทราบ
Permission Integers
| Level | Permissions Integer | What's Included |
|---|---|---|
| Minimal | 117760 | View Channels, Send Messages, Read Message History, Attach Files |
| Recommended | 274878286912 | ทั้งหมดข้างต้น บวก Embed Links, Send Messages in Threads, Add Reactions |
Step 6: Invite to Your Server
- เปิด invite URL ในเบราว์เซอร์ของคุณ (จากแท็บ Installation หรือ manual URL ที่คุณสร้างขึ้น)
- ในเมนูแบบเลื่อนลง Add to Server ให้เลือกเซิร์ฟเวอร์ของคุณ
- คลิก Continue, จากนั้น Authorize
- ทำ CAPTCHA ให้เสร็จสิ้นหากมีการแจ้งเตือน
:::info คุณต้องมี permission Manage Server ใน Discord server เพื่อเชิญบอท หากคุณไม่เห็นเซิร์ฟเวอร์ของคุณในเมนูแบบเลื่อนลง ให้ขอให้แอดมินเซิร์ฟเวอร์ใช้ invite link แทน :::
หลังจาก authorize แล้ว บอทจะปรากฏในรายชื่อสมาชิกของเซิร์ฟเวอร์ของคุณ (จะแสดงเป็น offline จนกว่าคุณจะเริ่ม Hermes gateway)
Step 7: Find Your Discord User ID
Hermes Agent ใช้ Discord User ID ของคุณเพื่อควบคุมว่าใครสามารถโต้ตอบกับบอทได้ คุณสามารถค้นหาได้โดย:
- เปิด Discord (desktop หรือ web app)
- ไปที่ Settings → Advanced → สลับ Developer Mode เป็น ON
- ปิด settings
- คลิกขวาที่ชื่อผู้ใช้ของคุณเอง (ในข้อความ, member list, หรือ profile) → Copy User ID
User ID ของคุณคือตัวเลขยาว ๆ เช่น 284102345871466496
:::tip Developer Mode ยังช่วยให้คุณคัดลอก Channel IDs และ Server IDs ในลักษณะเดียวกัน - คลิกขวาที่ชื่อช่องหรือเซิร์ฟเวอร์และเลือก Copy ID คุณจะต้องใช้ Channel ID หากคุณต้องการตั้งค่า home channel ด้วยตนเอง :::
Step 8: Configure Hermes Agent
Option A: Interactive Setup (Recommended)
รันคำสั่ง setup แบบ guided:
hermes gateway setupเลือก Discord เมื่อถูกแจ้งเตือน จากนั้นวาง bot token และ user ID ของคุณเมื่อถูกถาม
Option B: Manual Configuration
เพิ่มสิ่งต่อไปนี้ในไฟล์ ~/.hermes/.env ของคุณ:
# Required
DISCORD_BOT_TOKEN=your-bot-token
DISCORD_ALLOWED_USERS=284102345871466496
# Multiple allowed users (comma-separated)
# DISCORD_ALLOWED_USERS=284102345871466496,198765432109876543จากนั้นเริ่ม gateway:
hermes gatewayบอทควรจะออนไลน์ใน Discord ภายในไม่กี่วินาที ส่งข้อความให้มัน - ไม่ว่าจะเป็น DM หรือในช่องที่มันมองเห็น - เพื่อทดสอบ
:::tip
คุณสามารถรัน hermes gateway ใน background หรือเป็น systemd service สำหรับการทำงานที่ต่อเนื่อง ดูเอกสาร deployment สำหรับรายละเอียด
:::
Configuration Reference
พฤติกรรมของ Discord ถูกควบคุมผ่านสองไฟล์: ~/.hermes/.env สำหรับ credentials และ env-level toggles และ ~/.hermes/config.yaml สำหรับการตั้งค่าที่มีโครงสร้าง Environment variables จะมีลำดับความสำคัญเหนือกว่าค่าใน config.yaml เสมอเมื่อทั้งสองถูกตั้งค่า
Environment Variables (.env)
| Variable | Required | Default | Description |
|---|---|---|---|
DISCORD_BOT_TOKEN | Yes | — | Bot token จาก Discord Developer Portal. |
DISCORD_ALLOWED_USERS | Yes | — | Discord user IDs ที่คั่นด้วยเครื่องหมายจุลภาคที่ได้รับอนุญาตให้โต้ตอบกับบอท หากไม่มีสิ่งนี้ หรือ DISCORD_ALLOWED_ROLES gateway จะปฏิเสธผู้ใช้ทั้งหมด |
DISCORD_ALLOWED_ROLES | No | — | Discord role IDs ที่คั่นด้วยเครื่องหมายจุลภาค สมาชิกที่มี role ใด role หนึ่งจะได้รับอนุญาต - มีความหมายแบบ OR กับ DISCORD_ALLOWED_USERS เปิดใช้งาน Server Members Intent โดยอัตโนมัติเมื่อเชื่อมต่อ มีประโยชน์เมื่อทีม moderation มีการเปลี่ยนแปลง: mod ใหม่จะเข้าถึงได้ทันทีที่ได้รับ role ไม่จำเป็นต้อง push config |
DISCORD_HOME_CHANNEL | No | — | Channel ID ที่บอทส่งข้อความเชิงรุก (cron output, reminders, notifications) |
DISCORD_HOME_CHANNEL_NAME | No | "Home" | ชื่อที่แสดงสำหรับ home channel ใน logs และ status output |
DISCORD_REQUIRE_MENTION | No | true | เมื่อเป็น true บอทจะตอบกลับใน server channels เมื่อมีการ @mention เท่านั้น DMs จะตอบกลับเสมอไม่ว่าการตั้งค่าจะเป็นอย่างไร |
DISCORD_FREE_RESPONSE_CHANNELS | No | — | Channel IDs ที่คั่นด้วยเครื่องหมายจุลภาคที่บอทตอบกลับโดยไม่จำเป็นต้อง @mention แม้ว่า DISCORD_REQUIRE_MENTION จะเป็น true |
DISCORD_IGNORE_NO_MENTION | No | true | เมื่อเป็น true บอทจะนิ่งเงียบหากข้อความ @mention ผู้ใช้คนอื่น แต่ไม่ได้ mention บอท ป้องกันไม่ให้บอทกระโดดเข้าไปในบทสนทนาที่มุ่งเป้าไปที่คนอื่น ใช้ได้เฉพาะใน server channels ไม่ใช่ DMs |
DISCORD_AUTO_THREAD | No | true | เมื่อเป็น true จะสร้าง thread ใหม่โดยอัตโนมัติสำหรับทุก @mention ใน text channel ทำให้แต่ละบทสนทนาถูกแยกออก (คล้ายกับพฤติกรรมของ Slack) ข้อความที่อยู่ใน thread หรือ DMs อยู่แล้วไม่ได้รับผลกระทบ |
DISCORD_ALLOW_BOTS | No | "none" | ควบคุมวิธีการที่บอทจัดการข้อความจากบอท Discord อื่น ๆ "none" - เพิกเฉยต่อบอทอื่นทั้งหมด "mentions" - ยอมรับเฉพาะข้อความบอทที่ @mention Hermes "all" - ยอมรับข้อความบอททั้งหมด |
DISCORD_REACTIONS | No | true | เมื่อเป็น true บอทจะเพิ่ม emoji reactions ให้กับข้อความระหว่างการประมวลผล (👀 เมื่อเริ่ม, ✅ เมื่อสำเร็จ, ❌ เมื่อเกิดข้อผิดพลาด) ตั้งค่าเป็น false เพื่อปิดการใช้งาน reactions ทั้งหมด |
DISCORD_IGNORED_CHANNELS | No | — | Channel IDs ที่คั่นด้วยเครื่องหมายจุลภาคที่บอท จะไม่ ตอบกลับเลย แม้ว่าจะถูก @mention ก็ตาม มีลำดับความสำคัญสูงสุด - หากช่องอยู่ในรายการนี้ บอทจะเพิกเฉยต่อข้อความทั้งหมดโดยเงียบ ๆ ไม่ว่าจะเป็น require_mention, free_response_channels, หรือการตั้งค่าอื่น ๆ |
DISCORD_ALLOWED_CHANNELS | No | — | Channel IDs ที่คั่นด้วยเครื่องหมายจุลภาค เมื่อตั้งค่า บอทจะ ตอบกลับ เฉพาะในช่องเหล่านี้ (บวก DMs หากได้รับอนุญาต) จะแทนที่ config.yaml discord.allowed_channels ผสมผสานกับ DISCORD_IGNORED_CHANNELS เพื่อแสดงกฎ allow/deny |
DISCORD_NO_THREAD_CHANNELS | No | — | Channel IDs ที่คั่นด้วยเครื่องหมายจุลภาคที่บอทตอบกลับโดยตรงในช่องแทนการสร้าง thread สิ่งนี้มีผลเฉพาะเมื่อ DISCORD_AUTO_THREAD เป็น true เท่านั้น ในช่องเหล่านี้ บอทจะตอบกลับแบบ inline เหมือนข้อความปกติแทนการสร้าง thread ใหม่ |
DISCORD_REPLY_TO_MODE | No | "first" | ควบคุมพฤติกรรมการอ้างอิงการตอบกลับ: "off" - ไม่เคยตอบกลับข้อความต้นฉบับ, "first" - อ้างอิงการตอบกลับเฉพาะใน message chunk แรกเท่านั้น (ค่าเริ่มต้น), "all" - อ้างอิงการตอบกลับในทุก chunk |
DISCORD_ALLOW_MENTION_EVERYONE | No | false | เมื่อเป็น false (ค่าเริ่มต้น) บอทไม่สามารถ ping @everyone หรือ @here ได้แม้ว่าการตอบกลับจะมี token เหล่านั้นก็ตาม ตั้งค่าเป็น true เพื่อเปิดใช้งานอีกครั้ง ดู Mention Control ด้านล่าง |
DISCORD_ALLOW_MENTION_ROLES | No | false | เมื่อเป็น false (ค่าเริ่มต้น) บอทไม่สามารถ ping @role mentions ได้ ตั้งค่าเป็น true เพื่ออนุญาต |
DISCORD_ALLOW_MENTION_USERS | No | true | เมื่อเป็น true (ค่าเริ่มต้น) บอทสามารถ ping ผู้ใช้รายบุคคลด้วย ID ได้ |
DISCORD_ALLOW_MENTION_REPLIED_USER | No | true | เมื่อเป็น true (ค่าเริ่มต้น) การตอบกลับข้อความจะ ping ผู้เขียนต้นฉบับ |
DISCORD_PROXY | No | — | Proxy URL สำหรับการเชื่อมต่อ Discord (HTTP, WebSocket, REST) แทนที่ HTTPS_PROXY/ALL_PROXY รองรับ schemes http://, https://, และ socks5:// |
HERMES_DISCORD_TEXT_BATCH_DELAY_SECONDS | No | 0.6 | ช่วงเวลาที่ adapter รอก่อนที่จะ flush text chunk ที่อยู่ในคิว มีประโยชน์สำหรับการทำให้ output แบบ stream ราบรื่นขึ้น |
HERMES_DISCORD_TEXT_BATCH_SPLIT_DELAY_SECONDS | No | 0.1 | ความล่าช้าระหว่าง split chunks เมื่อข้อความเดียวเกินขีดจำกัดความยาวของ Discord |
Config File (config.yaml)
ส่วน discord ใน ~/.hermes/config.yaml สะท้อนถึง env vars ข้างต้น การตั้งค่า config.yaml จะถูกใช้เป็นค่าเริ่มต้น - หาก env var ที่เทียบเท่าถูกตั้งค่าไว้แล้ว env var จะมีลำดับความสำคัญกว่า
# Discord-specific settings
discord:
require_mention: true # Require @mention in server channels
free_response_channels: "" # Comma-separated channel IDs (or YAML list)
auto_thread: true # Auto-create threads on @mention
reactions: true # Add emoji reactions during processing
ignored_channels: [] # Channel IDs where bot never responds
no_thread_channels: [] # Channel IDs where bot responds without threading
channel_prompts: {} # Per-channel ephemeral system prompts
allow_mentions: # What the bot is allowed to ping (safe defaults)
everyone: false # @everyone / @here pings (default: false)
roles: false # @role pings (default: false)
users: true # @user pings (default: true)
replied_user: true # reply-reference pings the author (default: true)
# Session isolation (applies to all gateway platforms, not just Discord)
group_sessions_per_user: true # Isolate sessions per user in shared channelsdiscord.require_mention
Type: boolean — Default: true
เมื่อเปิดใช้งาน บอทจะตอบกลับใน server channels เมื่อมีการ @mention โดยตรงเท่านั้น DMs จะได้รับคำตอบเสมอไม่ว่าการตั้งค่าจะเป็นอย่างไร
discord.free_response_channels
Type: string or list — Default: ""
Channel IDs ที่บอทตอบกลับทุกข้อความโดยไม่จำเป็นต้อง @mention ยอมรับได้ทั้ง string ที่คั่นด้วยจุลภาค หรือ YAML list:
# String format
discord:
free_response_channels: "1234567890,9876543210"
# List format
discord:
free_response_channels:
- 1234567890
- 9876543210หาก parent channel ของ thread อยู่ในรายการนี้ thread นั้นก็จะกลายเป็น mention-free ด้วย
Free-response channels ยัง ข้าม auto-threading - บอทจะตอบกลับแบบ inline แทนการสร้าง thread ใหม่ต่อข้อความ สิ่งนี้ทำให้ช่องยังคงใช้งานได้เป็น chat ที่เบาและใช้งานง่าย หากคุณต้องการพฤติกรรมการสร้าง thread อย่าระบุช่องนั้นเป็น free-response (ให้ใช้ flow @mention ปกติแทน)
discord.auto_thread
Type: boolean — Default: true
เมื่อเปิดใช้งาน ทุก @mention ใน text channel ปกติจะสร้าง thread ใหม่โดยอัตโนมัติสำหรับการสนทนานั้น สิ่งนี้ทำให้ main channel สะอาด และให้แต่ละบทสนทนามี session history ที่แยกจากกัน เมื่อสร้าง thread แล้ว ข้อความถัดไปใน thread นั้นไม่จำเป็นต้อง @mention - บอทรู้ว่ากำลังเข้าร่วมอยู่แล้ว
ข้อความที่ส่งใน thread หรือ DMs ที่มีอยู่แล้วไม่ได้รับผลกระทบจากการตั้งค่านี้ ช่องที่ระบุใน discord.free_response_channels หรือ discord.no_thread_channels ก็จะข้าม auto-threading และได้รับคำตอบแบบ inline แทน
discord.reactions
Type: boolean — Default: true
ควบคุมว่าบอทจะเพิ่ม emoji reactions ให้กับข้อความหรือไม่เพื่อเป็น visual feedback:
- 👀 เพิ่มเมื่อบอทเริ่มประมวลผลข้อความของคุณ
- ✅ เพิ่มเมื่อส่งการตอบกลับสำเร็จ
- ❌ เพิ่มหากเกิดข้อผิดพลาดระหว่างการประมวลผล
ปิดการใช้งานสิ่งนี้หากคุณพบว่า reactions รบกวน หรือหาก role ของบอทไม่มี permission Add Reactions
discord.ignored_channels
Type: string or list — Default: []
Channel IDs ที่บอท จะไม่ ตอบกลับเลย แม้ว่าจะถูก @mention โดยตรง สิ่งนี้มีลำดับความสำคัญสูงสุด - หากช่องอยู่ในรายการนี้ บอทจะเพิกเฉยต่อข้อความทั้งหมดโดยเงียบ ๆ ไม่ว่าจะเป็น require_mention, free_response_channels, หรือการตั้งค่าอื่น ๆ
# String format
discord:
ignored_channels: "1234567890,9876543210"
# List format
discord:
ignored_channels:
- 1234567890
- 9876543210หาก parent channel ของ thread อยู่ในรายการนี้ ข้อความใน thread นั้นก็จะถูกเพิกเฉยด้วย
discord.no_thread_channels
Type: string or list — Default: []
Channel IDs ที่บอทตอบกลับโดยตรงในช่องแทนการสร้าง thread สิ่งนี้มีผลเฉพาะเมื่อ auto_thread เป็น true เท่านั้น ในช่องเหล่านี้ บอทจะตอบกลับแบบ inline เหมือนข้อความปกติแทนการสร้าง thread ใหม่
discord:
no_thread_channels:
- 1234567890 # Bot responds inline hereมีประโยชน์สำหรับช่องที่ทุ่มเทให้กับการโต้ตอบกับบอท ซึ่ง thread จะเพิ่ม noise ที่ไม่จำเป็น
discord.channel_prompts
Type: mapping — Default: {}
Per-channel ephemeral system prompts ที่ถูกฉีดในทุก turn ใน Discord channel หรือ thread ที่ตรงกันโดยไม่ถูกบันทึกใน transcript history
discord:
channel_prompts:
"1234567890": |
This channel is for research tasks. Prefer deep comparisons,
citations, and concise synthesis.
"9876543210": |
This forum is for therapy-style support. Be warm, grounded,
and non-judgmental.พฤติกรรม:
- การจับคู่ ID ของ thread/channel ที่ตรงกันจะชนะ
- หากข้อความมาถึงภายใน thread หรือ forum post และ thread นั้นไม่มี entry ที่ชัดเจน Hermes จะย้อนกลับไปใช้ parent channel/forum ID
- Prompts ถูกนำไปใช้แบบ ephemerally ที่ runtime ดังนั้นการเปลี่ยนแปลงจะส่งผลต่อ future turns ทันทีโดยไม่ต้องเขียนทับ history ของ session ที่ผ่านมา
group_sessions_per_user
Type: boolean — Default: true
นี่คือการตั้งค่า gateway ทั่วโลก (ไม่เฉพาะ Discord) ที่ควบคุมว่าผู้ใช้ในช่องเดียวกันจะได้ session histories ที่แยกจากกันหรือไม่
เมื่อเป็น true: Alice และ Bob ที่คุยกันใน #research แต่ละคนจะมีบทสนทนากับ Hermes แยกกัน เมื่อเป็น false: ทั้งช่องจะแชร์ transcript การสนทนาและ slot ของ running-agent เดียวกัน
group_sessions_per_user: trueดูที่ส่วน Session Model ด้านบนสำหรับนัยยะทั้งหมดของแต่ละโหมด
display.tool_progress
Type: string — Default: "all" — Values: off, new, all, verbose
ควบคุมว่าบอทจะส่ง progress messages ใน chat ขณะประมวลผลหรือไม่ (เช่น "Reading file...", "Running terminal command...") นี่คือการตั้งค่า gateway ทั่วโลกที่ใช้ได้กับทุกแพลตฟอร์ม
display:
tool_progress: "all" # off | new | all | verboseoff— ไม่มี progress messagesnew— แสดงเฉพาะ tool call แรกต่อ turnall— แสดง tool calls ทั้งหมด (ถูกตัดให้เหลือ 40 ตัวอักษรใน gateway messages)verbose— แสดงรายละเอียด tool call ทั้งหมด (อาจสร้างข้อความยาว)
display.tool_progress_command
Type: boolean — Default: false
เมื่อเปิดใช้งาน จะทำให้ slash command /verbose พร้อมใช้งานใน gateway ทำให้คุณสามารถวนรอบโหมด tool progress ได้ (off → new → all → verbose → off) โดยไม่ต้องแก้ไข config.yaml
display:
tool_progress_command: trueตัวเลือก Model แบบโต้ตอบ (Interactive Model Picker)
ส่ง /model โดยไม่มี argument ในช่อง Discord เพื่อเปิดตัวเลือก Model แบบ Dropdown:
- Provider selection - Dropdown ที่แสดง Provider ที่พร้อมใช้งาน (สูงสุด 25 รายการ)
- Model selection - Dropdown ตัวที่สองที่แสดง Model สำหรับ Provider ที่เลือก (สูงสุด 25 รายการ)
ตัวเลือกนี้จะหมดเวลา (time out) หลังจาก 120 วินาที อนุญาตให้เฉพาะผู้ใช้ที่ได้รับอนุญาต (ผู้ที่อยู่ใน DISCORD_ALLOWED_USERS) เท่านั้นที่สามารถโต้ตอบกับตัวเลือกนี้ได้ หากคุณทราบชื่อ Model ให้พิมพ์ /model <name> ได้โดยตรง
คำสั่ง Slash แบบ Native สำหรับ Skills
Hermes จะลงทะเบียน Skills ที่ติดตั้งโดยอัตโนมัติเป็น Discord Application Commands แบบ Native ซึ่งหมายความว่า Skills เหล่านี้จะปรากฏในเมนู autocomplete / ของ Discord ควบคู่ไปกับคำสั่ง built-in
- แต่ละ Skill จะกลายเป็น Discord slash command (เช่น
/code-review,/ascii-art) - Skills สามารถรับพารามิเตอร์ string ชื่อ
argsแบบทางเลือก - Discord มีข้อจำกัดที่ 100 application commands ต่อ bot - หากคุณมี Skills มากกว่าจำนวนช่องว่างที่มีอยู่ Skills ส่วนเกินจะถูกข้ามไปพร้อมกับการแจ้งเตือนใน logs
- Skills จะถูกลงทะเบียนในระหว่างการเริ่มต้น bot ควบคู่ไปกับคำสั่ง built-in เช่น
/model,/reset, และ/background
ไม่จำเป็นต้องมีการตั้งค่าเพิ่มเติม - Skills ใดๆ ที่ติดตั้งผ่าน hermes skills install จะถูกลงทะเบียนเป็น Discord slash command โดยอัตโนมัติเมื่อมีการรีสตาร์ท gateway ครั้งถัดไป
ช่องหลัก (Home Channel)
คุณสามารถกำหนด "ช่องหลัก" ที่ bot จะส่งข้อความเชิงรุก (เช่น ผลลัพธ์ของ cron job, การแจ้งเตือน, และการแจ้งเตือนต่างๆ) มีสองวิธีในการตั้งค่า:
การใช้ Slash Command
พิมพ์ /sethome ในช่อง Discord ใดก็ได้ที่ bot อยู่ ช่องนั้นจะกลายเป็นช่องหลัก
การตั้งค่าด้วยตนเอง (Manual Configuration)
เพิ่มสิ่งเหล่านี้ลงใน ~/.hermes/.env ของคุณ:
DISCORD_HOME_CHANNEL=123456789012345678
DISCORD_HOME_CHANNEL_NAME="#bot-updates"แทนที่ ID ด้วย Channel ID จริง (คลิกขวา -> Copy Channel ID with Developer Mode)
ข้อความเสียง (Voice Messages)
Hermes Agent รองรับข้อความเสียงของ Discord:
- ข้อความเสียงขาเข้า (Incoming voice messages) จะถูกถอดเสียง (transcribed) โดยอัตโนมัติโดยใช้ STT provider ที่กำหนดค่าไว้: local
faster-whisper(ไม่มี key), Groq Whisper (GROQ_API_KEY), หรือ OpenAI Whisper (VOICE_TOOLS_OPENAI_KEY) - Text-to-speech: ใช้
/voice ttsเพื่อให้ bot ส่งการตอบกลับแบบเสียง (spoken audio) ควบคู่ไปกับข้อความตัวอักษร - ช่องเสียง Discord: Hermes ยังสามารถเข้าร่วมช่องเสียง ฟังผู้ใช้พูด และตอบกลับในช่องนั้นได้
สำหรับคู่มือการตั้งค่าและการใช้งานฉบับเต็ม โปรดดูที่:
ช่อง Forum (Forum Channels)
Discord forum channels (ประเภท 15) ไม่รับข้อความส่วนตัว (direct messages) - ทุกโพสต์ในฟอรัมจะต้องเป็น thread เท่านั้น Hermes จะตรวจจับ forum channels โดยอัตโนมัติ และสร้างโพสต์ thread ใหม่ทุกครั้งที่จำเป็นต้องส่งข้อความไปที่นั่น ดังนั้น send_message, TTS, รูปภาพ, ข้อความเสียง, และไฟล์แนบจึงทำงานได้ทั้งหมดโดยไม่ต้องมีการจัดการพิเศษจาก agent
- Thread name จะถูกดึงมาจากบรรทัดแรกของข้อความ (ลบ prefix ของ markdown heading และจำกัดสูงสุด 100 ตัวอักษร) เมื่อข้อความมีเฉพาะไฟล์แนบ ชื่อไฟล์จะถูกใช้เป็น thread name สำรอง
- Attachments จะถูกส่งไปพร้อมกับข้อความเริ่มต้นของ thread ใหม่ - ไม่ต้องมีการอัปโหลดแยกขั้นตอน และไม่มีการส่งแบบบางส่วน
- หนึ่งคำสั่ง, หนึ่ง thread: การส่งไปยัง forum แต่ละครั้งจะสร้าง thread ใหม่ ดังนั้นการส่งต่อเนื่องไปยัง forum เดียวกันจะสร้าง thread แยกกัน
- การตรวจจับมีสามระดับ: คือ cache ของ directory ช่องก่อน, cache ของ process-local ถัดมา, และการ probe แบบ live
GET /channels/{id}เป็นทางเลือกสุดท้าย (ซึ่งผลลัพธ์จะถูก memoize ตลอดอายุของ process)
การรีเฟรช directory (/channels refresh บนแพลตฟอร์มที่เปิดเผย หรือการรีสตาร์ท gateway) จะเติม cache ด้วย forum channels ใดๆ ที่ถูกสร้างขึ้นหลังจากที่ bot เริ่มทำงาน
การแก้ไขปัญหา (Troubleshooting)
Bot ออนไลน์แต่ไม่ตอบสนองต่อข้อความ
สาเหตุ: Message Content Intent ถูกปิดใช้งาน
วิธีแก้ไข: ไปที่ Developer Portal -> app ของคุณ -> Bot -> Privileged Gateway Intents -> เปิดใช้งาน Message Content Intent -> Save Changes และรีสตาร์ท gateway
ข้อผิดพลาด "Disallowed Intents" เมื่อเริ่มต้น
สาเหตุ: โค้ดของคุณร้องขอ intents ที่ไม่ได้เปิดใช้งานใน Developer Portal
วิธีแก้ไข: เปิดใช้งาน Privileged Gateway Intents ทั้งสาม (Presence, Server Members, Message Content) ใน Bot settings จากนั้นรีสตาร์ท
Bot ไม่เห็นข้อความในช่องใดช่องหนึ่ง
สาเหตุ: Role ของ bot ไม่มีสิทธิ์ในการดูช่องนั้น
วิธีแก้ไข: ใน Discord ให้ไปที่การตั้งค่าของช่อง -> Permissions -> เพิ่ม role ของ bot พร้อมเปิดใช้งาน View Channel และ Read Message History
ข้อผิดพลาด 403 Forbidden
สาเหตุ: bot ขาดสิทธิ์ที่จำเป็น
วิธีแก้ไข: เชิญ bot ใหม่ด้วยสิทธิ์ที่ถูกต้องโดยใช้ URL จากขั้นตอนที่ 5 หรือปรับสิทธิ์ role ของ bot ด้วยตนเองใน Server Settings -> Roles
Bot ออฟไลน์
สาเหตุ: Hermes gateway ไม่ได้ทำงาน หรือ token ไม่ถูกต้อง
วิธีแก้ไข: ตรวจสอบว่า hermes gateway กำลังทำงานอยู่ ตรวจสอบ DISCORD_BOT_TOKEN ในไฟล์ .env ของคุณ หากคุณเพิ่งรีเซ็ต token ให้ทำการอัปเดต
"User not allowed" / Bot ไม่สนใจคุณ
สาเหตุ: User ID ของคุณไม่ได้อยู่ใน DISCORD_ALLOWED_USERS
วิธีแก้ไข: เพิ่ม User ID ของคุณใน DISCORD_ALLOWED_USERS ใน ~/.hermes/.env และรีสตาร์ท gateway
ผู้คนในช่องเดียวกันแชร์ context กันโดยไม่คาดคิด
สาเหตุ: group_sessions_per_user ถูกปิดใช้งาน หรือแพลตฟอร์มไม่สามารถให้ user ID สำหรับข้อความในบริบทนั้นได้
วิธีแก้ไข: ตั้งค่าสิ่งนี้ใน ~/.hermes/config.yaml และรีสตาร์ท gateway:
group_sessions_per_user: trueหากคุณต้องการการสนทนาห้องแชร์โดยเจตนา ให้ปล่อยค่านี้ไว้ — เพียงแค่คาดหวังประวัติการถอดเสียงที่แชร์และพฤติกรรม interrupt ที่แชร์
ความปลอดภัย (Security)
:::warning
ควรตั้งค่า DISCORD_ALLOWED_USERS (หรือ DISCORD_ALLOWED_ROLES) เสมอ เพื่อจำกัดผู้ที่สามารถโต้ตอบกับ bot หากไม่มีการตั้งค่าใดๆ gateway จะปฏิเสธผู้ใช้ทั้งหมดโดยค่าเริ่มต้นเพื่อความปลอดภัย อนุญาตเฉพาะผู้ที่คุณเชื่อถือเท่านั้น - ผู้ใช้ที่ได้รับอนุญาตจะเข้าถึงความสามารถทั้งหมดของ agent รวมถึงการใช้ tool และการเข้าถึงระบบ
:::
การควบคุมการเข้าถึงตาม Role (Role-Based Access Control)
สำหรับเซิร์ฟเวอร์ที่การเข้าถึงถูกจัดการด้วย role แทนที่จะเป็นรายการผู้ใช้รายบุคคล (เช่น ทีม moderator, เจ้าหน้าที่สนับสนุน, เครื่องมือภายใน) ให้ใช้ DISCORD_ALLOWED_ROLES - ซึ่งเป็นรายการ role ID ที่คั่นด้วยเครื่องหมายคอมมา สมาชิกคนใดที่มี role เหล่านั้นจะได้รับอนุญาต
# ~/.hermes/.env — ทำงานร่วมกับหรือแทนที่ DISCORD_ALLOWED_USERS
DISCORD_ALLOWED_ROLES=987654321098765432,876543210987654321ความหมาย:
- OR กับ user allowlist. ผู้ใช้จะได้รับอนุญาตหาก ID ของพวกเขาอยู่ใน
DISCORD_ALLOWED_USERSหรือ พวกเขามี role ใดๆ ในDISCORD_ALLOWED_ROLES - Server Members Intent auto-enabled. เมื่อตั้งค่า
DISCORD_ALLOWED_ROLESbot จะเปิดใช้งาน Members intent เมื่อเชื่อมต่อ - ซึ่งจำเป็นสำหรับ Discord ในการส่งข้อมูล role พร้อมกับ record ของสมาชิก - Role IDs ไม่ใช่ชื่อ. ดึงจาก Discord: User Settings → Advanced → Developer Mode ON, จากนั้นคลิกขวาที่ role ใดๆ -> Copy Role ID
- DM fallback. ใน DMs การตรวจสอบ role จะสแกน guild ร่วมกัน ผู้ใช้ที่มี role ที่ได้รับอนุญาตในเซิร์ฟเวอร์ที่แชร์ใดๆ จะได้รับอนุญาตใน DMs ด้วย
นี่คือรูปแบบที่แนะนำเมื่อทีม moderation มีการเปลี่ยนแปลง - moderator ใหม่จะได้รับสิทธิ์ทันทีที่ role ได้รับการมอบให้ โดยไม่ต้องแก้ไข .env หรือรีสตาร์ท gateway
การควบคุมการกล่าวถึง (Mention Control)
โดยค่าเริ่มต้น Hermes จะบล็อกไม่ให้ bot ping @everyone, @here, และการกล่าวถึง role แม้ว่าการตอบกลับของมันจะมี token เหล่านั้นก็ตาม สิ่งนี้ป้องกันไม่ให้ prompt ที่เขียนไม่ดีหรือเนื้อหาผู้ใช้ที่สะท้อนกลับไปสแปมทั้งเซิร์ฟเวอร์ การ ping @user รายบุคคล และการ ping อ้างอิงการตอบกลับ (ชิป "replying to...") ยังคงเปิดใช้งานเพื่อให้การสนทนาปกติยังคงทำงานได้
คุณสามารถผ่อนคลายค่าเริ่มต้นเหล่านี้ได้ผ่าน env vars หรือ config.yaml:
# ~/.hermes/config.yaml
discord:
allow_mentions:
everyone: false # อนุญาตให้ bot ping @everyone / @here
roles: false # อนุญาตให้ bot ping @role mentions
users: true # อนุญาตให้ bot ping @users รายบุคคล
replied_user: true # ping ผู้เขียนเมื่อตอบกลับข้อความของพวกเขา# ~/.hermes/.env — env vars ชนะ config.yaml
DISCORD_ALLOW_MENTION_EVERYONE=false
DISCORD_ALLOW_MENTION_ROLES=false
DISCORD_ALLOW_MENTION_USERS=true
DISCORD_ALLOW_MENTION_REPLIED_USER=true:::tip
ปล่อย everyone และ roles ไว้ที่ false เว้นแต่คุณจะทราบแน่ชัดว่าทำไมคุณถึงต้องการมัน มันง่ายมากที่ LLM จะสร้าง string @everyone ในการตอบกลับที่ดูเป็นปกติ; หากไม่มีการป้องกันนี้ นั่นจะแจ้งเตือนสมาชิกทุกคนในเซิร์ฟเวอร์ของคุณ
:::
สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการรักษาความปลอดภัยการติดตั้ง Hermes Agent ของคุณ โปรดดูที่ Security Guide
📄 user-guide/messaging/email.md
sidebar_position: 7 title: "อีเมล" description: "ตั้งค่า Hermes Agent ให้เป็นผู้ช่วยอีเมลผ่าน IMAP/SMTP"
การตั้งค่าอีเมล
Hermes สามารถรับและตอบกลับอีเมลโดยใช้โปรโตคอล IMAP และ SMTP มาตรฐาน ส่งอีเมลไปยังที่อยู่ของ agent และมันจะตอบกลับในเธรด (in-thread) โดยไม่จำเป็นต้องมี client หรือ bot API พิเศษ รองรับ Gmail, Outlook, Yahoo, Fastmail หรือผู้ให้บริการใดๆ ที่รองรับ IMAP/SMTP
:::info ไม่ต้องพึ่งพาภายนอก
Email adapter ใช้โมดูล imaplib, smtplib, และ email ที่มาพร้อมกับ Python ไม่จำเป็นต้องใช้แพ็กเกจเพิ่มเติมหรือบริการภายนอก
:::
ข้อกำหนดเบื้องต้น
- บัญชีอีเมลเฉพาะ สำหรับ Hermes agent ของคุณ (ห้ามใช้บัญชีส่วนตัว)
- เปิดใช้งาน IMAP บนบัญชีอีเมล
- รหัสผ่านแอป (App password) หากใช้ Gmail หรือผู้ให้บริการอื่นที่มี 2FA
การตั้งค่า Gmail
- เปิดใช้งาน 2-Factor Authentication บน Google Account ของคุณ
- ไปที่ App Passwords
- สร้าง App Password ใหม่ (เลือก "Mail" หรือ "Other")
- คัดลอกรหัสผ่าน 16 ตัวอักษร - คุณจะใช้รหัสนี้แทนรหัสผ่านปกติของคุณ
Outlook / Microsoft 365
- ไปที่ Security Settings
- เปิดใช้งาน 2FA หากยังไม่ได้เปิดใช้งาน
- สร้าง App Password ภายใต้ "Additional security options"
- IMAP host:
outlook.office365.com, SMTP host:smtp.office365.com
ผู้ให้บริการอื่น ๆ
ผู้ให้บริการอีเมลส่วนใหญ่รองรับ IMAP/SMTP โปรดตรวจสอบเอกสารของผู้ให้บริการของคุณสำหรับ:
- IMAP host และ port (โดยปกติคือ port 993 พร้อม SSL)
- SMTP host และ port (โดยปกติคือ port 587 พร้อม STARTTLS)
- การใช้ app passwords
ขั้นตอนที่ 1: กำหนดค่า Hermes
วิธีที่ง่ายที่สุด:
hermes gateway setupเลือก Email จากเมนูแพลตฟอร์ม ตัวช่วย (wizard) จะแจ้งให้คุณระบุอีเมลแอดเดรส รหัสผ่าน host ของ IMAP/SMTP และผู้ส่งที่อนุญาต
การกำหนดค่าด้วยตนเอง
เพิ่มใน ~/.hermes/.env:
# Required
EMAIL_ADDRESS=[email protected]
EMAIL_PASSWORD=abcd efgh ijkl mnop # App password (not your regular password)
EMAIL_IMAP_HOST=imap.gmail.com
EMAIL_SMTP_HOST=smtp.gmail.com
# Security (recommended)
EMAIL_ALLOWED_USERS=[email protected],[email protected]
# Optional
EMAIL_IMAP_PORT=993 # Default: 993 (IMAP SSL)
EMAIL_SMTP_PORT=587 # Default: 587 (SMTP STARTTLS)
EMAIL_POLL_INTERVAL=15 # Seconds between inbox checks (default: 15)
EMAIL_HOME_ADDRESS=[email protected] # Default delivery target for cron jobsขั้นตอนที่ 2: เริ่มต้น Gateway
hermes gateway # Run in foreground
hermes gateway install # Install as a user service
sudo hermes gateway install --system # Linux only: boot-time system serviceเมื่อเริ่มต้นใช้งาน adapter จะ:
- ทดสอบการเชื่อมต่อ IMAP และ SMTP
- ทำเครื่องหมายข้อความใน inbox ที่มีอยู่ทั้งหมดเป็น "seen" (ประมวลผลเฉพาะอีเมลใหม่)
- เริ่มการตรวจสอบข้อความใหม่ (polling)
การทำงาน
การรับข้อความ
adapter จะตรวจสอบ inbox ของ IMAP เพื่อหาข้อความที่ยังไม่ได้อ่าน (UNSEEN) ในช่วงเวลาที่กำหนดได้ (ค่าเริ่มต้น: 15 วินาที) สำหรับอีเมลใหม่แต่ละฉบับ:
- Subject line จะถูกรวมเป็นบริบท (เช่น
[Subject: Deploy to production]) - Reply emails (subject ขึ้นต้นด้วย
Re:) จะข้ามการใส่ prefix subject - บริบทของเธรดได้ถูกกำหนดไว้แล้ว - Attachments จะถูกแคชในเครื่อง:
- รูปภาพ (JPEG, PNG, GIF, WebP) → พร้อมใช้งานสำหรับ vision tool
- เอกสาร (PDF, ZIP, etc.) → พร้อมใช้งานสำหรับการเข้าถึงไฟล์
- HTML-only emails จะมีการลบแท็กออกเพื่อดึงข้อความที่เป็น plain text
- Self-messages จะถูกกรองออกเพื่อป้องกันวงจรการตอบกลับ (reply loops)
- Automated/noreply senders จะถูกเพิกเฉยอย่างเงียบๆ - เช่น
noreply@,mailer-daemon@,bounce@,no-reply@, และอีเมลที่มี headerAuto-Submitted,Precedence: bulk, หรือList-Unsubscribe
การส่งการตอบกลับ
การตอบกลับจะถูกส่งผ่าน SMTP พร้อมการจัดการเธรดอีเมลที่เหมาะสม:
- In-Reply-To และ References headers จะรักษาเธรด
- Subject line จะถูกเก็บรักษาพร้อม prefix
Re:(ไม่ให้มีRe: Re:) - Message-ID จะถูกสร้างด้วย domain ของ agent
- การตอบกลับจะถูกส่งเป็น plain text (UTF-8)
File Attachments
agent สามารถส่งไฟล์แนบได้ในการตอบกลับ ให้รวม MEDIA:/path/to/file ใน response และไฟล์นั้นจะถูกแนบไปกับอีเมลที่ส่งออก
การข้าม Attachments
หากต้องการเพิกเฉยต่อไฟล์แนบขาเข้าทั้งหมด (เพื่อป้องกันมัลแวร์หรือประหยัดแบนด์วิดท์) ให้เพิ่มใน config.yaml ของคุณ:
platforms:
email:
skip_attachments: trueเมื่อเปิดใช้งาน จะมีการข้าม attachment และ inline parts ก่อนการถอดรหัส payload ข้อความในเนื้อหาอีเมลยังคงถูกประมวลผลตามปกติ
การควบคุมการเข้าถึง
การเข้าถึงอีเมลเป็นไปตามรูปแบบเดียวกับแพลตฟอร์ม Hermes อื่น ๆ:
EMAIL_ALLOWED_USERSถูกกำหนดค่า → จะประมวลผลเฉพาะอีเมลจากที่อยู่นเหล่านั้น- ไม่มีการกำหนด allowlist → ผู้ส่งที่ไม่ทราบจะได้รับรหัสจับคู่ (pairing code)
EMAIL_ALLOW_ALL_USERS=true→ ยอมรับผู้ส่งทุกคน (ควรใช้ด้วยความระมัดระวัง)
:::warning
ต้องกำหนดค่า EMAIL_ALLOWED_USERS เสมอ หากไม่มีการกำหนด ผู้ใดก็ตามที่รู้ที่อยู่อีเมลของ agent สามารถส่งคำสั่งได้ โดยค่าเริ่มต้น agent มีสิทธิ์เข้าถึง terminal
:::
การแก้ไขปัญหา
| ปัญหา | วิธีแก้ไข |
|---|---|
| "IMAP connection failed" เมื่อเริ่มต้น | ตรวจสอบ EMAIL_IMAP_HOST และ EMAIL_IMAP_PORT ให้แน่ใจว่าเปิดใช้งาน IMAP บนบัญชีแล้ว สำหรับ Gmail ให้เปิดใช้งานใน Settings → Forwarding and POP/IMAP |
| "SMTP connection failed" เมื่อเริ่มต้น | ตรวจสอบ EMAIL_SMTP_HOST และ EMAIL_SMTP_PORT ตรวจสอบว่ารหัสผ่านถูกต้อง (ใช้ App Password สำหรับ Gmail) |
| ข้อความไม่ได้รับ | ตรวจสอบว่า EMAIL_ALLOWED_USERS รวมถึงอีเมลของผู้ส่ง ตรวจสอบโฟลเดอร์สแปม - ผู้ให้บริการบางรายอาจทำเครื่องหมายการตอบกลับอัตโนมัติ |
| "Authentication failed" | สำหรับ Gmail คุณต้องใช้ App Password ไม่ใช่รหัสผ่านปกติของคุณ ต้องแน่ใจว่าเปิดใช้งาน 2FA ก่อน |
| การตอบกลับซ้ำซ้อน | ตรวจสอบให้แน่ใจว่ามี gateway instance ทำงานอยู่เพียงตัวเดียว ตรวจสอบ hermes gateway status |
| การตอบสนองช้า | ช่วงเวลา poll เริ่มต้นคือ 15 วินาที สามารถลดได้ด้วย EMAIL_POLL_INTERVAL=5 เพื่อการตอบสนองที่เร็วขึ้น (แต่มีการเชื่อมต่อ IMAP มากขึ้น) |
| การตอบกลับไม่เป็นเธรด | adapter ใช้ In-Reply-To headers อีเมลไคลเอนต์บางตัว (โดยเฉพาะแบบ web-based) อาจไม่สามารถจัดการเธรดกับข้อความอัตโนมัติได้อย่างถูกต้อง |
ความปลอดภัย
:::warning
ใช้บัญชีอีเมลเฉพาะ ห้ามใช้บัญชีส่วนตัว - agent จะจัดเก็บรหัสผ่านใน .env และมีสิทธิ์เข้าถึง inbox ทั้งหมดผ่าน IMAP
:::
- ใช้ App Passwords แทนรหัสผ่านหลักของคุณ (จำเป็นสำหรับ Gmail ที่เปิด 2FA)
- กำหนด
EMAIL_ALLOWED_USERSเพื่อจำกัดว่าใครสามารถโต้ตอบกับ agent ได้ - รหัสผ่านถูกจัดเก็บใน
~/.hermes/.env- โปรดป้องกันไฟล์นี้ (chmod 600) - IMAP ใช้ SSL (port 993) และ SMTP ใช้ STARTTLS (port 587) โดยค่าเริ่มต้น - การเชื่อมต่อจะถูกเข้ารหัส
ข้อมูลอ้างอิงตัวแปร Environment
| Variable | Required | Default | Description |
|---|---|---|---|
EMAIL_ADDRESS | Yes | — | ที่อยู่อีเมลของ Agent |
EMAIL_PASSWORD | Yes | — | รหัสผ่านอีเมล หรือ app password |
EMAIL_IMAP_HOST | Yes | — | IMAP server host (เช่น imap.gmail.com) |
EMAIL_SMTP_HOST | Yes | — | SMTP server host (เช่น smtp.gmail.com) |
EMAIL_IMAP_PORT | No | 993 | IMAP server port |
EMAIL_SMTP_PORT | No | 587 | SMTP server port |
EMAIL_POLL_INTERVAL | No | 15 | วินาทีระหว่างการตรวจสอบ inbox |
EMAIL_ALLOWED_USERS | No | — | ที่อยู่ผู้ส่งที่อนุญาตแบบคั่นด้วย comma |
EMAIL_HOME_ADDRESS | No | — | ที่อยู่ปลายทางเริ่มต้นสำหรับ cron jobs |
EMAIL_ALLOW_ALL_USERS | No | false | อนุญาตผู้ส่งทุกคน (ไม่แนะนำ) |
📄 user-guide/messaging/feishu.md
sidebar_position: 11 title: "Feishu / Lark" description: "Set up Hermes Agent as a Feishu or Lark bot"
การตั้งค่า Feishu / Lark
Hermes Agent ทำงานร่วมกับ Feishu และ Lark ในรูปแบบของ bot ที่มีคุณสมบัติครบถ้วน เมื่อเชื่อมต่อแล้ว คุณสามารถแชทกับ agent ได้ทั้งใน Direct messages หรือ group chats, รับผลลัพธ์ของ cron job ใน home chat, และส่งข้อความ รูปภาพ เสียง และไฟล์แนบผ่าน normal gateway flow
การเชื่อมต่อรองรับโหมดการเชื่อมต่อทั้งสองแบบ:
websocket- แนะนำ; Hermes จะเปิด outbound connection และคุณไม่จำเป็นต้องมี public webhook endpointwebhook- มีประโยชน์เมื่อคุณต้องการให้ Feishu/Lark push events เข้ามาที่ gateway ของคุณผ่าน HTTP
วิธีการทำงานของ Hermes
| Context | Behavior |
|---|---|
| Direct messages | Hermes จะตอบกลับทุกข้อความ |
| Group chats | Hermes จะตอบกลับเมื่อ bot ถูก @mention ใน chat เท่านั้น |
| Shared group chats | โดยค่าเริ่มต้น ประวัติ session จะถูกแยกตามผู้ใช้ภายใน shared chat |
พฤติกรรมของ shared-chat นี้ถูกควบคุมโดย config.yaml:
group_sessions_per_user: trueให้ตั้งค่าเป็น false เฉพาะเมื่อคุณต้องการให้มีบทสนทนาที่แชร์กันเพียงครั้งเดียวต่อ chat เท่านั้น
ขั้นตอนที่ 1: สร้างแอป Feishu / Lark
แนะนำ: Scan-to-Create (คำสั่งเดียว)
hermes gateway setupเลือก Feishu / Lark และสแกน QR code ด้วยแอปมือถือ Feishu หรือ Lark ของคุณ Hermes จะสร้างแอป bot โดยอัตโนมัติพร้อมสิทธิ์ที่ถูกต้องและบันทึก credentials
ทางเลือก: การตั้งค่าด้วยตนเอง (Manual Setup)
หากไม่สามารถใช้ scan-to-create ได้ wizard จะย้อนกลับไปใช้การป้อนข้อมูลด้วยตนเอง:
- เปิด developer console ของ Feishu หรือ Lark:
- Feishu: https://open.feishu.cn/
- Lark: https://open.larksuite.com/
- สร้างแอปใหม่
- ในส่วน Credentials & Basic Info ให้คัดลอก App ID และ App Secret
- เปิดใช้งานความสามารถ Bot สำหรับแอป
- รัน
hermes gateway setup, เลือก Feishu / Lark, และป้อน credentials เมื่อระบบแจ้ง
:::warning เก็บ App Secret เป็นความลับ ใครก็ตามที่มีสิ่งนี้สามารถปลอมตัวเป็นแอปของคุณได้ :::
ขั้นตอนที่ 2: เลือกโหมดการเชื่อมต่อ
แนะนำ: โหมด WebSocket
ใช้โหมด WebSocket เมื่อ Hermes ทำงานบน laptop, workstation หรือ private server ของคุณ ไม่จำเป็นต้องมี public URL Official Lark SDK จะเปิดและรักษาการเชื่อมต่อ WebSocket outbound แบบถาวรพร้อมการเชื่อมต่อใหม่โดยอัตโนมัติ
FEISHU_CONNECTION_MODE=websocketข้อกำหนด: ต้องติดตั้ง Python package websockets SDK จะจัดการ lifecycle การเชื่อมต่อ, heartbeats, และ auto-reconnection ภายใน
วิธีการทำงาน: adapter จะรัน WebSocket client ของ Lark SDK ใน background executor thread events ที่เข้ามา (ข้อความ, reactions, card actions) จะถูกส่งไปยัง main asyncio loop เมื่อการเชื่อมต่อหลุด SDK จะพยายามเชื่อมต่อใหม่โดยอัตโนมัติ
ทางเลือก: โหมด Webhook
ใช้โหมด webhook เมื่อคุณรัน Hermes อยู่เบื้องหลัง HTTP endpoint ที่เข้าถึงได้แล้วเท่านั้น
FEISHU_CONNECTION_MODE=webhookในโหมด webhook, Hermes จะเริ่ม HTTP server (ผ่าน aiohttp) และให้บริการ endpoint ของ Feishu ที่:
/feishu/webhookข้อกำหนด: ต้องติดตั้ง Python package aiohttp
คุณสามารถปรับแต่ง bind address และ path ของ webhook server ได้:
FEISHU_WEBHOOK_HOST=127.0.0.1 # default: 127.0.0.1
FEISHU_WEBHOOK_PORT=8765 # default: 8765
FEISHU_WEBHOOK_PATH=/feishu/webhook # default: /feishu/webhookเมื่อ Feishu ส่ง URL verification challenge (type: url_verification), webhook จะตอบกลับโดยอัตโนมัติเพื่อให้คุณสามารถตั้งค่าการสมัครสมาชิกใน Feishu developer console ได้
ขั้นตอนที่ 3: กำหนดค่า Hermes
ตัวเลือก A: การตั้งค่าแบบโต้ตอบ (Interactive Setup)
hermes gateway setupเลือก Feishu / Lark และกรอกข้อมูลตามที่ระบบแจ้ง
ตัวเลือก B: การกำหนดค่าด้วยตนเอง (Manual Configuration)
เพิ่มข้อมูลต่อไปนี้ใน ~/.hermes/.env:
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=secret_xxx
FEISHU_DOMAIN=feishu
FEISHU_CONNECTION_MODE=websocket
# Optional but strongly recommended
FEISHU_ALLOWED_USERS=ou_xxx,ou_yyy
FEISHU_HOME_CHANNEL=oc_xxxFEISHU_DOMAIN รองรับ:
feishuสำหรับ Feishu Chinalarkสำหรับ Lark international
ขั้นตอนที่ 4: เริ่มต้น Gateway
hermes gatewayจากนั้นให้ส่งข้อความถึง bot จาก Feishu/Lark เพื่อยืนยันว่าการเชื่อมต่อทำงานแล้ว
Home Chat
ใช้ /set-home ใน chat ของ Feishu/Lark เพื่อกำหนดให้เป็น home channel สำหรับผลลัพธ์ของ cron job และการแจ้งเตือนข้ามแพลตฟอร์ม
คุณยังสามารถตั้งค่าล่วงหน้าได้:
FEISHU_HOME_CHANNEL=oc_xxxความปลอดภัย (Security)
User Allowlist
สำหรับการใช้งานใน production ให้ตั้งค่า allowlist ของ Feishu Open IDs:
FEISHU_ALLOWED_USERS=ou_xxx,ou_yyyหากคุณปล่อยให้ allowlist ว่างเปล่า ใครก็ตามที่เข้าถึง bot ได้อาจสามารถใช้งานได้ ใน group chats, allowlist จะถูกตรวจสอบกับ open_id ของผู้ส่งก่อนที่ข้อความจะถูกประมวลผล
Webhook Encryption Key
เมื่อทำงานในโหมด webhook, ให้ตั้งค่า encryption key เพื่อเปิดใช้งานการตรวจสอบ signature ของ webhook payload ที่เข้ามา:
FEISHU_ENCRYPT_KEY=your-encrypt-keyคีย์นี้สามารถหาได้ในส่วน Event Subscriptions ของการตั้งค่าแอป Feishu ของคุณ เมื่อตั้งค่าแล้ว adapter จะตรวจสอบทุก webhook request โดยใช้ signature algorithm:
SHA256(timestamp + nonce + encrypt_key + body)ค่า hash ที่คำนวณได้จะถูกเปรียบเทียบกับ header x-lark-signature โดยใช้ timing-safe comparison Requests ที่มี signature ไม่ถูกต้องหรือขาดหายจะถูกปฏิเสธด้วย HTTP 401
:::tip
ในโหมด WebSocket, การตรวจสอบ signature จะจัดการโดย SDK เอง ดังนั้น FEISHU_ENCRYPT_KEY จึงเป็นทางเลือก ในโหมด webhook, สิ่งนี้แนะนำอย่างยิ่งสำหรับการใช้งานใน production
:::
Verification Token
ชั้นการตรวจสอบสิทธิ์เพิ่มเติมที่ตรวจสอบ field token ภายใน webhook payloads:
FEISHU_VERIFICATION_TOKEN=your-verification-tokenโทเค็นนี้ก็สามารถหาได้ในส่วน Event Subscriptions ของแอป Feishu ของคุณ เมื่อตั้งค่าแล้ว ทุก webhook payload ที่เข้ามาจะต้องมี token ที่ตรงกันใน header object ของมัน Mismatched tokens จะถูกปฏิเสธด้วย HTTP 401
ทั้ง FEISHU_ENCRYPT_KEY และ FEISHU_VERIFICATION_TOKEN สามารถใช้ร่วมกันเพื่อเพิ่มความปลอดภัย (defense in depth)
นโยบายข้อความกลุ่ม (Group Message Policy)
ตัวแปร environment FEISHU_GROUP_POLICY ควบคุมว่า Hermes จะตอบกลับใน group chats หรือไม่และอย่างไร:
FEISHU_GROUP_POLICY=allowlist # default| Value | Behavior |
|---|---|
open | Hermes จะตอบกลับ @mention จากผู้ใช้ทุกคนในทุกกลุ่ม |
allowlist | Hermes จะตอบกลับ @mention เฉพาะจากผู้ใช้ที่ระบุใน FEISHU_ALLOWED_USERS เท่านั้น |
disabled | Hermes จะเพิกเฉยต่อข้อความกลุ่มทั้งหมดโดยสิ้นเชิง |
ในทุกโหมด, bot ต้องถูก @mention อย่างชัดเจน (หรือ @all) ในกลุ่มก่อนที่ข้อความจะถูกประมวลผล Direct messages จะข้าม gate นี้ไป
Bot Identity for @Mention Gating
สำหรับการตรวจจับ @mention ที่แม่นยำในกลุ่ม, adapter จำเป็นต้องรู้ identity ของ bot ซึ่งสามารถระบุได้อย่างชัดเจน:
FEISHU_BOT_OPEN_ID=ou_xxx
FEISHU_BOT_USER_ID=xxx
FEISHU_BOT_NAME=MyBotหากไม่ได้ตั้งค่าสิ่งเหล่านี้, adapter จะพยายามค้นหาชื่อ bot โดยอัตโนมัติผ่าน Application Info API เมื่อเริ่มต้นทำงาน เพื่อให้สิ่งนี้ทำงานได้, ให้ grant permission scope admin:app.info:readonly หรือ application:application:self_manage
Interactive Card Actions
เมื่อผู้ใช้คลิกปุ่มหรือโต้ตอบกับ interactive cards ที่ส่งโดย bot, adapter จะส่งต่อสิ่งเหล่านี้เป็น synthetic /card command events:
- การคลิกปุ่มจะกลายเป็น:
/card button {"key": "value", ...} - payload
valueของ action จาก card definition จะถูกรวมเป็น JSON - Card actions จะถูก deduplicate ด้วยช่วงเวลา 15 นาทีเพื่อป้องกันการประมวลผลซ้ำ
Card action events จะถูกส่งด้วย MessageType.COMMAND, ดังนั้นจึงไหลผ่าน pipeline การประมวลผลคำสั่งปกติ
นี่คือวิธีที่ command approval ทำงานด้วย - เมื่อ agent ต้องการรันคำสั่งที่อันตราย, มันจะส่ง interactive card พร้อมปุ่ม Allow Once / Session / Always / Deny ผู้ใช้คลิกปุ่ม และ card action callback จะส่งผลการตัดสินใจอนุมัติกลับไปยัง agent
Required Feishu App Configuration
Interactive cards ต้องการการตั้งค่า สาม ขั้นตอนใน Feishu Developer Console การขาดขั้นตอนใดขั้นตอนหนึ่งจะทำให้เกิด error 200340 เมื่อผู้ใช้คลิกปุ่ม card
-
Subscribe to the card action event: ใน Event Subscriptions, เพิ่ม
card.action.triggerเข้าไปใน events ที่คุณสมัครสมาชิก -
Enable the Interactive Card capability: ใน App Features > Bot, ตรวจสอบให้แน่ใจว่า toggle Interactive Card ถูกเปิดใช้งาน สิ่งนี้บอก Feishu ว่าแอปของคุณสามารถรับ card action callbacks ได้
-
Configure the Card Request URL (webhook mode only): ใน App Features > Bot > Message Card Request URL, ตั้งค่า URL ให้เป็น endpoint เดียวกันกับ webhook event ของคุณ (เช่น
https://your-server:8765/feishu/webhook) ในโหมด WebSocket สิ่งนี้จะถูกจัดการโดย SDK โดยอัตโนมัติ
:::warning
หากขาดทั้งสามขั้นตอน, Feishu จะสามารถ ส่ง interactive cards ได้สำเร็จ (การส่งเท่านั้นที่ต้องการ permission im:message:send), แต่การคลิกปุ่มใดๆ จะส่งคืน error 200340 card จะดูเหมือนทำงาน - error จะปรากฏก็ต่อเมื่อผู้ใช้โต้ตอบกับมันเท่านั้น
:::
Document Comment Intelligent Reply
นอกเหนือจากการแชท, adapter ยังสามารถตอบ @-mentions ที่ถูกทิ้งไว้บน เอกสาร Feishu/Lark ได้ เมื่อผู้ใช้คอมเมนต์บนเอกสาร (การเลือกข้อความในเครื่องหรือคอมเมนต์ทั้งเอกสาร) และ @-mention bot, Hermes จะอ่านเอกสารบวกกับ thread คอมเมนต์โดยรอบ และโพสต์ LLM reply แบบ inline ใน thread
ขับเคลื่อนด้วย event drive.notice.comment_add_v1, handler จะ:
- ดึงเนื้อหาเอกสารและ timeline คอมเมนต์แบบขนาน (20 ข้อความสำหรับ whole-doc threads, 12 สำหรับ local-selection threads)
- รัน agent ด้วย toolsets
feishu_doc+feishu_driveที่จำกัดขอบเขตสำหรับ session คอมเมนต์นั้นๆ - แบ่ง replies เป็น chunk ที่ 4000 chars และโพสต์กลับเป็น threaded replies
- แคช per-document sessions เป็นเวลา 1 ชั่วโมง พร้อมขีดจำกัด 50 ข้อความ เพื่อให้คอมเมนต์ติดตามผลบนเอกสารเดียวกันยังคงมี context
3-Tier Access Control
การตอบกลับคอมเมนต์เอกสารเป็นแบบ explicit-grant only - ไม่มีโหมด allow-all โดยปริยาย Permissions จะถูกแก้ไขตามลำดับนี้ (match แรกที่ชนะ, ต่อ field):
- Exact doc - rule ที่จำกัดขอบเขตสำหรับ document token เฉพาะ
- Wildcard - rule ที่ตรงกับรูปแบบของเอกสาร
- Top-level - default rule สำหรับ workspace
มีสองนโยบายที่ใช้ได้ต่อ rule:
allowlist- รายการคงที่ของผู้ใช้ / tenantspairing- static list ∪ runtime-approved store มีประโยชน์สำหรับการ rollout ที่ moderator สามารถให้สิทธิ์เข้าถึงได้แบบสดๆ
Rules ถูกเก็บไว้ใน ~/.hermes/feishu_comment_rules.json (pairing grants ใน ~/.hermes/feishu_comment_pairing.json) พร้อม hot-reload ที่แคชด้วย mtime - การแก้ไขจะมีผลใน event คอมเมนต์ถัดไปโดยไม่ต้องรีสตาร์ท gateway
CLI:
# ตรวจสอบ rules และสถานะ pairing ปัจจุบัน
python -m gateway.platforms.feishu_comment_rules status
# จำลองการตรวจสอบการเข้าถึงสำหรับ doc + user เฉพาะ
python -m gateway.platforms.feishu_comment_rules check <fileType:fileToken> <user_open_id>
# จัดการ pairing grants ใน runtime
python -m gateway.platforms.feishu_comment_rules pairing list
python -m gateway.platforms.feishu_comment_rules pairing add <user_open_id>
python -m gateway.platforms.feishu_comment_rules pairing remove <user_open_id>Required Feishu App Configuration
นอกเหนือจากสิทธิ์ chat/card ที่ได้รับแล้ว, ให้เพิ่ม drive comment event:
- Subscribe to
drive.notice.comment_add_v1ใน Event Subscriptions - Grant scopes
docs:doc:readonlyและdrive:drive:readonlyเพื่อให้ handler สามารถอ่านเนื้อหาเอกสารได้
Media Support
Inbound (รับ)
adapter รับและแคช media types ต่อไปนี้จากผู้ใช้:
| Type | Extensions | How it's processed |
|---|---|---|
| Images | .jpg, .jpeg, .png, .gif, .webp, .bmp | ดาวน์โหลดผ่าน Feishu API และแคชในเครื่อง |
| Audio | .ogg, .mp3, .wav, .m4a, .aac, .flac, .opus, .webm | ดาวน์โหลดและแคช; ไฟล์ข้อความขนาดเล็กจะถูกดึงออกมาโดยอัตโนมัติ |
| Video | .mp4, .mov, .avi, .mkv, .webm, .m4v, .3gp | ดาวน์โหลดและแคชเป็นเอกสาร |
| Files | .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, และอื่นๆ | ดาวน์โหลดและแคชเป็นเอกสาร |
Media จาก rich-text (post) messages, รวมถึง inline images และ file attachments, ก็จะถูกดึงออกมาและแคชด้วย
สำหรับเอกสารข้อความขนาดเล็ก (.txt, .md), เนื้อหาไฟล์จะถูกฉีดเข้าไปในข้อความโดยอัตโนมัติเพื่อให้ agent สามารถอ่านได้โดยตรงโดยไม่จำเป็นต้องใช้ tools
Outbound (ส่ง)
| Method | What it sends |
|---|---|
send | ข้อความ text หรือ rich post messages (ตรวจจับอัตโนมัติจาก markdown content) |
send_image / send_image_file | อัปโหลดรูปภาพไปยัง Feishu, จากนั้นส่งเป็น native image bubble (พร้อม caption ทางเลือก) |
send_document | อัปโหลดไฟล์ไปยัง Feishu API, จากนั้นส่งเป็น file attachment |
send_voice | อัปโหลดไฟล์เสียงเป็น Feishu file attachment |
send_video | อัปโหลดวิดีโอและส่งเป็น native media message |
send_animation | GIFs จะถูกลดระดับเป็น file attachments (Feishu ไม่มี native GIF bubble) |
การส่งต่อการอัปโหลดไฟล์เป็นแบบอัตโนมัติโดยอิงตาม extension:
.ogg,.opus→ อัปโหลดเป็นเสียงopus.mp4,.mov,.avi,.m4v→ อัปโหลดเป็น mediamp4.pdf,.doc(x),.xls(x),.ppt(x)→ อัปโหลดพร้อมประเภทเอกสารของมัน- อื่นๆ ทั้งหมด → อัปโหลดเป็น generic stream file
Markdown Rendering and Post Fallback
เมื่อ outbound text มี markdown formatting (headings, bold, lists, code blocks, links, etc.), adapter จะส่งมันเป็น Feishu post message โดยอัตโนมัติพร้อมแท็ก md ฝังตัว แทนที่จะเป็น plain text สิ่งนี้ช่วยให้สามารถแสดงผลแบบ rich ใน Feishu client ได้
หาก Feishu API ปฏิเสธ post payload (เช่น เนื่องจาก unsupported markdown constructs), adapter จะ fallback โดยอัตโนมัติเพื่อส่งเป็น plain text โดยลบ markdown ออกไป การ fallback สองขั้นตอนนี้ช่วยให้มั่นใจได้ว่าข้อความจะถูกส่งมอบเสมอ
ข้อความ plain text (ไม่ตรวจพบ markdown) จะถูกส่งเป็นประเภทข้อความ text แบบง่าย
Processing Status Reactions
ในขณะที่ agent กำลังทำงาน, bot จะแสดง reaction Typing บนข้อความของคุณ มันจะถูกล้างเมื่อ reply มาถึง, หรือถูกแทนที่ด้วย CrossMark หากการประมวลผลล้มเหลว
ตั้งค่า FEISHU_REACTIONS=false เพื่อปิดฟังก์ชันนี้
Burst Protection and Batching
adapter มี debouncing สำหรับ message bursts ที่รวดเร็วเพื่อหลีกเลี่ยงการทำให้ agent ทำงานหนักเกินไป:
Text Batching
เมื่อผู้ใช้ส่งข้อความ text หลายข้อความติดต่อกัน, ข้อความเหล่านั้นจะถูกรวมเป็น event เดียวก่อนที่จะถูกส่ง:
| Setting | Env Var | Default |
|---|---|---|
| Quiet period | HERMES_FEISHU_TEXT_BATCH_DELAY_SECONDS | 0.6s |
| Max messages per batch | HERMES_FEISHU_TEXT_BATCH_MAX_MESSAGES | 8 |
| Max characters per batch | HERMES_FEISHU_TEXT_BATCH_MAX_CHARS | 4000 |
Media Batching
media attachments หลายรายการที่ส่งติดต่อกัน (เช่น การลากรูปภาพหลายรูป) จะถูกรวมเป็น event เดียว:
| Setting | Env Var | Default |
|---|---|---|
| Quiet period | HERMES_FEISHU_MEDIA_BATCH_DELAY_SECONDS | 0.8s |
Per-Chat Serialization
ข้อความภายใน chat เดียวกันจะถูกประมวลผลแบบ serial (ทีละข้อความ) เพื่อรักษาความต่อเนื่องของการสนทนา แต่ละ chat มี lock ของตัวเอง ดังนั้นข้อความใน chat ต่างกันจึงถูกประมวลผลพร้อมกัน (concurrently)
Rate Limiting (Webhook Mode)
ในโหมด webhook, adapter บังคับใช้ per-IP rate limiting เพื่อป้องกันการใช้งานในทางที่ผิด:
- Window: 60-second sliding window
- Limit: 120 requests per window per (app_id, path, IP) triple
- Tracking cap: สูงสุด 4096 unique keys ที่ถูกติดตาม (ป้องกันการเติบโตของหน่วยความจำแบบไม่มีขีดจำกัด)
Requests ที่เกิน limit จะได้รับ HTTP 429 (Too Many Requests)
Webhook Anomaly Tracking
adapter ติดตามการตอบกลับ error ติดต่อกันต่อ IP address หลังจากเกิดข้อผิดพลาดติดต่อกัน 25 ครั้งจาก IP เดียวกันภายในช่วง 6 ชั่วโมง, จะมีการบันทึก warning สิ่งนี้ช่วยตรวจจับ client ที่ตั้งค่าผิดพลาดหรือความพยายามในการ probing
การป้องกัน webhook เพิ่มเติม:
- Body size limit: สูงสุด 1 MB
- Body read timeout: 30 seconds
- Content-Type enforcement: ยอมรับเฉพาะ
application/jsonเท่านั้น
WebSocket Tuning
เมื่อใช้โหมด websocket, คุณสามารถปรับแต่งพฤติกรรมการ reconnect และ ping ได้:
platforms:
feishu:
extra:
ws_reconnect_interval: 120 # วินาทีระหว่างการพยายาม reconnect (default: 120)
ws_ping_interval: 30 # วินาทีระหว่าง WebSocket pings (optional; SDK default if unset)| Setting | Config key | Default | Description |
|---|---|---|---|
| Reconnect interval | ws_reconnect_interval | 120s | ระยะเวลาที่รอระหว่างการพยายาม reconnect |
| Ping interval | ws_ping_interval | (SDK default) | ความถี่ของ WebSocket keepalive pings |
Per-Group Access Control
นอกเหนือจาก FEISHU_GROUP_POLICY ทั่วโลก, คุณสามารถตั้งค่า rules ที่ละเอียดสำหรับแต่ละ group chat โดยใช้ group_rules ใน config.yaml:
platforms:
feishu:
extra:
default_group_policy: "open" # Default สำหรับกลุ่มที่ไม่ได้อยู่ใน group_rules
admins: # ผู้ใช้ที่สามารถจัดการ bot settings
- "ou_admin_open_id"
group_rules:
"oc_group_chat_id_1":
policy: "allowlist" # open | allowlist | blacklist | admin_only | disabled
allowlist:
- "ou_user_open_id_1"
- "ou_user_open_id_2"
"oc_group_chat_id_2":
policy: "admin_only"
"oc_group_chat_id_3":
policy: "blacklist"
blacklist:
- "ou_blocked_user"| Policy | Description |
|---|---|
open | ใครก็ตามในกลุ่มสามารถใช้ bot ได้ |
allowlist | เฉพาะผู้ใช้ใน allowlist ของกลุ่มเท่านั้นที่ใช้ bot ได้ |
blacklist | ทุกคนยกเว้นผู้ใช้ใน blacklist ของกลุ่มสามารถใช้ bot ได้ |
admin_only | เฉพาะผู้ใช้ในรายการ admins ทั่วโลกเท่านั้นที่ใช้ bot ได้ในกลุ่มนี้ |
disabled | Bot จะเพิกเฉยต่อข้อความทั้งหมดในกลุ่มนี้ |
กลุ่มที่ไม่ได้ระบุใน group_rules จะ fallback ไปที่ default_group_policy (ค่าเริ่มต้นคือค่าของ FEISHU_GROUP_POLICY)
Deduplication
Inbound messages ถูก deduplicate โดยใช้ message IDs พร้อม TTL 24 ชั่วโมง สถานะ dedup จะถูกเก็บไว้ข้ามการ restart ไปยัง ~/.hermes/feishu_seen_message_ids.json
| Setting | Env Var | Default |
|---|---|---|
| Cache size | HERMES_FEISHU_DEDUP_CACHE_SIZE | 2048 entries |
All Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
FEISHU_APP_ID | ✅ | — | Feishu/Lark App ID |
FEISHU_APP_SECRET | ✅ | — | Feishu/Lark App Secret |
FEISHU_DOMAIN | — | feishu | feishu (China) หรือ lark (international) |
FEISHU_CONNECTION_MODE | — | websocket | websocket หรือ webhook |
FEISHU_ALLOWED_USERS | — | (empty) | รายการ open_id ที่คั่นด้วย comma สำหรับ user allowlist |
FEISHU_HOME_CHANNEL | — | — | Chat ID สำหรับ output ของ cron/notification |
FEISHU_ENCRYPT_KEY | — | (empty) | Encrypt key สำหรับการตรวจสอบ signature ของ webhook |
FEISHU_VERIFICATION_TOKEN | — | (empty) | Verification token สำหรับการตรวจสอบ payload ของ webhook |
FEISHU_GROUP_POLICY | — | allowlist | นโยบายข้อความกลุ่ม: open, allowlist, disabled |
FEISHU_BOT_OPEN_ID | — | (empty) | open_id ของ bot (สำหรับการตรวจจับ @mention) |
FEISHU_BOT_USER_ID | — | (empty) | user_id ของ bot (สำหรับการตรวจจับ @mention) |
FEISHU_BOT_NAME | — | (empty) | ชื่อที่แสดงของ bot (สำหรับการตรวจจับ @mention) |
FEISHU_WEBHOOK_HOST | — | 127.0.0.1 | bind address ของ webhook server |
FEISHU_WEBHOOK_PORT | — | 8765 | port ของ webhook server |
FEISHU_WEBHOOK_PATH | — | /feishu/webhook | endpoint path ของ webhook |
HERMES_FEISHU_DEDUP_CACHE_SIZE | — | 2048 | จำนวน message IDs สูงสุดที่ถูก deduplicate เพื่อติดตาม |
HERMES_FEISHU_TEXT_BATCH_DELAY_SECONDS | — | 0.6 | ช่วงเวลา quiet period สำหรับการ debounce text burst |
HERMES_FEISHU_TEXT_BATCH_MAX_MESSAGES | — | 8 | จำนวนข้อความสูงสุดที่รวมเป็น text batch |
HERMES_FEISHU_TEXT_BATCH_MAX_CHARS | — | 4000 | จำนวน characters สูงสุดที่รวมเป็น text batch |
HERMES_FEISHU_MEDIA_BATCH_DELAY_SECONDS | — | 0.8 | ช่วงเวลา quiet period สำหรับการ debounce media burst |
การตั้งค่า WebSocket และ per-group ACL ทำผ่าน config.yaml ภายใต้ platforms.feishu.extra (ดู WebSocket Tuning และ Per-Group Access Control ด้านบน)
Troubleshooting
| Problem | Fix |
|---|---|
lark-oapi not installed | ติดตั้ง SDK: pip install lark-oapi |
websockets not installed; websocket mode unavailable | ติดตั้ง websockets: pip install websockets |
aiohttp not installed; webhook mode unavailable | ติดตั้ง aiohttp: pip install aiohttp |
FEISHU_APP_ID or FEISHU_APP_SECRET not set | ตั้งค่า env vars ทั้งคู่ หรือกำหนดค่าผ่าน hermes gateway setup |
Another local Hermes gateway is already using this Feishu app_id | มีเพียง instance Hermes เดียวเท่านั้นที่สามารถใช้ app_id เดียวกันได้ในเวลาเดียวกัน ให้หยุด gateway ตัวอื่นก่อน |
| Bot doesn't respond in groups | ตรวจสอบให้แน่ใจว่า bot ถูก @mention, ตรวจสอบ FEISHU_GROUP_POLICY, และยืนยันว่าผู้ส่งอยู่ใน FEISHU_ALLOWED_USERS หาก policy เป็น allowlist |
Webhook rejected: invalid verification token | ตรวจสอบให้แน่ใจว่า FEISHU_VERIFICATION_TOKEN ตรงกับ token ใน Event Subscriptions config ของแอป Feishu ของคุณ |
Webhook rejected: invalid signature | ตรวจสอบให้แน่ใจว่า FEISHU_ENCRYPT_KEY ตรงกับ encrypt key ใน config แอป Feishu ของคุณ |
| Post messages show as plain text | Feishu API ปฏิเสธ post payload; นี่คือพฤติกรรม fallback ปกติ ตรวจสอบ logs สำหรับรายละเอียด |
| Images/files not received by bot | ให้ grant permission scopes im:message และ im:resource แก่แอป Feishu ของคุณ |
| Bot identity not auto-detected | ให้ grant scope admin:app.info:readonly, หรือตั้งค่า FEISHU_BOT_OPEN_ID / FEISHU_BOT_NAME ด้วยตนเอง |
| Error 200340 when clicking approval buttons | เปิดใช้งานความสามารถ Interactive Card และกำหนดค่า Card Request URL ใน Feishu Developer Console ดูที่ Required Feishu App Configuration ด้านบน |
Webhook rate limit exceeded | เกิน 120 requests/minute จาก IP เดียวกัน นี่มักเกิดจากการตั้งค่าผิดพลาดหรือ loop |
Toolset
Feishu / Lark ใช้ hermes-feishu platform preset ซึ่งรวม core tools เดียวกันกับ Telegram และแพลตฟอร์ม messaging อื่นๆ ที่ใช้ gateway
(Self-Correction/Review: Ensure the markdown links and formatting are preserved exactly as requested.)
extent analysis
TL;DR
- ตรวจสอบให้แน่ใจว่า Hermes Agent ได้รับการตั้งค่าและเชื่อมต่อกับ Discord, อีเมล, หรือ Feishu/Lark อย่างถูกต้อง.
Guidance
- ตรวจสอบการตั้งค่า: ตรวจสอบให้แน่ใจว่าคุณได้ตั้งค่า Hermes Agent สำหรับแพลตฟอร์มที่คุณใช้อย่างถูกต้อง (เช่น Discord, อีเมล, Feishu/Lark) และมีการเชื่อมต่อที่ถูกต้อง.
- ตรวจสอบสิทธิ์: ตรวจสอบให้แน่ใจว่าบอทหรือเอเจนต์มีสิทธิ์ที่จำเป็นในการตอบกลับและโต้ตอบกับผู้ใช้.
- ตรวจสอบการกำหนดค่าพิเศษ: ตรวจสอบให้แน่ใจว่าคุณได้กำหนดค่าพิเศษที่จำเป็นสำหรับแพลตฟอร์มของคุณ (เช่น
FEISHU_GROUP_POLICYสำหรับ Feishu/Lark) อย่างถูกต้อง. - ตรวจสอบการเชื่อมต่ออินเทอร์เน็ต: ตรวจสอบให้แน่ใจว่าคุณมีการเชื่อมต่ออินเทอร์เน็ตที่เสถียรเพื่อให้ Hermes Agent สามารถส่งข้อความและโต้ตอบกับผู้ใช้ได้.
Example
ไม่มีตัวอย่างโค้ดที่เฉพาะเจาะจงสำหรับปัญหานี้ เนื่องจากปัญหาไม่ได้ให้ข้อมูลเฉพาะเจาะจงเกี่ยวกับโค้ดหรือการกำหนดค่าที่ใช้ อย่างไรก็ตาม คุณสามารถตรวจสอบเอกสารของ Hermes Agent สำหรับข้อมูลเพิ่มเต
Vote matrix · Quick signals
Still need to ship something?
×6Another batch ranked right after the header list — different links, same matching logic.
TRENDING
- Feature Request: Configurable per-minute rate limiting (RPM) for models to prevent 429 errors
- Android: Hermes App + Termux install share ~/.hermes and cause silent permission loops
- hermes update emits unicode-animations ANSI demo in non-interactive logs
- hermes update downgrades aiohttp from 3.13.4 to 3.13.3
- npm install warns about deprecated @babel/plugin-proposal-private-methods
- DingTalk inbound media URLs are skipped as unreadable native image paths
- fix(dashboard): ChatPage clears header action buttons on ALL pages, not just Sessions
- [Bug]: check_web_api_key() hardcodes built-in backends — third-party web search plugins silently disabled
- Hermes Web UI 修复经验:GatewayManager 补丁、进程 D 状态、数据库升级问题
- Telegram gateway can silently drop turn after /stop with response=0 chars while internal work continues
- Bug Report: v0.14.0 上下文污染 — 历史回复碎片回注到新请求
- Bug: hermes skills search table truncates Identifier column — install fails with copied value
- [skills-index-watchdog] Skills index is stale or degraded (degraded)
- Discord approval embed not rendering on web/mobile — embed data present in API but invisible
- Idea: Discord voice-channel participation / opt-in auto-join mode
- [Feature]: Claude Code--ultrawork
- build-arm64 job deterministically fails on cold cache (Azure SAS token expires mid-build)
- [Enhancement] computer_use: action=type should fall back to key events for terminal emulators (Ghostty/Terminal.app/iTerm2)
- Feature Request: Session Recovery on Temporary Provider Outage
- [Bug]: Hermes dashboard not working on NixOS (container)
- [Feature]: Add option to ignore @all/@everyone mentions in Feishu group chats
- QQ Bot WebSocket 频繁断开:长时间工具执行阻塞 asyncio 事件循环导致心跳超时
- patch tool: new_string escape sequences (\t) get written literally
- Feature Request: i18n / 多语言支持(国际化)
- Bug: web_crawl schema lets models auto-guess "instructions" instead of asking the user via clarify
- feat: `!command` prefix for direct shell execution (like Claude Code)
- Expose currently-running cron jobs via /api/jobs (or new endpoint)
- [Bug]: Kanban parent-child handoff: scratch workspace GC destroys artifacts before child can read them
- [Bug, Windows] hermes gateway restart loses session context — planned_stop_marker not written before SIGTERM
- [Bug]: Codex→DeepSeek fallback sends assistant turns without reasoning_content → HTTP 400 (require-side cross-provider failover)
- [Bug]: Update got stuck half way, reboot it, then ModuleNotFoundError: No module named 'hermes_cli'
- Kanban dispatcher corrupt-board handling and multi-profile gateway ownership ambiguity
- Gateway can resend a short fallback message when the real final Telegram response was already delivered
- [BUG] Bedrock: Fix 'Invalid API Key format' for presigned URL tokens
- Secret redaction corrupts code syntax in tool output (write_file, execute_code, terminal)
- Unable to connect Ollama Cloud with Pro Subscription to Hermes
- feat: fuzzy substring matching for /skill autocomplete
- PRD: Autonomous market-impact prediction briefing system
- Kanban dashboard should support task/card deep links
- [Feature] Native Feishu CardKit Streaming: consolidate best-in-class implementations
- [Feature]: Inject mental model into context when using Hindsight
- Interactive CLI hides tool output despite display.tool_progress=all, and hermes chat -v does not restore it
- fix(api_server): _handle_responses drops text.format JSON schema — structured output constraints silently ignored
- state.db FTS corruption goes undetected — no integrity check, no repair path
- bug: fallback routing can select text-only models for image requests and hide the primary failure
- feat(kanban): persist worker session_id per run and pass --resume on respawn after unblock
- feat(kanban): support GitHub/OMO lifecycle bridge for Xiyou-style automation
- Expose update-safe TUI/composer hooks for voice transcript and composer events
- Hide or configure voice transcript status rows in editable dictation mode
- [Feature]: Per-Tool / Per-Toolset Approval Policies
- Context compression creates orphan sessions missing from state.db
- messaging platform
- feat: Add read-only / silent monitoring mode for WhatsApp adapter
- double-.hermes path mismatch, the HOME env var leak, and the fallback-notification UX problem
- Bug: Plattform-Bundle name `hermes-yuanbao` in `agent.disabled_toolsets` silently kills ALL tools in gateway path (Telegram + cron), CLI unaffected
- CLI /yolo (in-chat) does not bypass dangerous command approvals — env var freeze + missing enable_session_yolo call
- OpenAI Codex provider crashes with "'NoneType' object is not iterable" (HTTP None)
- DEEPSEEK_API_KEY blocked by env blocklist in gateway process — cron jobs fail with deepseek provider
- fix(feishu): Card action callback routing issues - invalid message_id and unrecognized /card command
- Discord plugin: profiles without explicit `discord:` block silently get `require_mention=true` + `auto_thread=true` (regression in cc8e5ec2a)
- [Bug]: DISCORD_ALLOWED_ROLES ignored by gateway _is_user_authorized — role-authorized users get 'Unauthorized user' rejection
- [Bug]: /new, /clear, and /reset commands freeze the terminal session
- openai-codex subscription backend returns HTTP 200 with response.output=None, causing Slack/cron failures
- RFC: Centralized Model/Provider Registry
- bug: openai-codex provider — TypeError: 'NoneType' object is not iterable on every request (gpt-5.5)
- [Feature]: Source-aware instruction gate — architectural mitigation for indirect prompt injection
- Named custom provider stale_timeout_seconds ignored because runtime provider is normalized to `custom`
- guard test (ignore)
- [Feature]: per-platform LLM request_overrides (extra_body / reasoning_effort / service_tier)
- One-shot smoke: add Flue-backed orchestration fixture
- Gateway should not treat stale Codex app-server progress as final response after post-tool silence
- `docker_run_as_host_user: true` breaks bundled skills: Hermes home is mounted into `/root/.hermes` but the container runs as a non-root user (`HOME=/home/pn`)
- [Bug]: gateway api_server streaming bypasses server-side tool-call loop when chat_template_kwargs.enable_thinking=false (model emits tool name as plain text)
- [Feature]: Pre-install python-telegram-bot in Umbrel Hermes Docker image
- YouTube Shorts filter not working in youtube-content skill
- v0.15.0 PyPI release breaks ALL platforms — plugin.yaml manifests missing from package
- RFC: On-demand tool/skill/MCP discovery — decouple schema registration from process lifecycle
- Pixshelf: local-first stock photo workflow command center
- [Bug]: baoyu infographic skill should not silently bypass image_generate
- Pixshelf v1.5: manual submission tracking for stock agencies
- `hermes config set` silently accepts unknown keys, writing them where the runtime never reads
- Honcho memory prefetch hang on fresh CLI subprocess in v0.15.0 (regression from #27190)
- [Bug] v0.15.0 Docker image: stage2-hook.sh, main-wrapper.sh missing; container_boot module removed
- Feature: Reduce cache-read token overhead for DeepSeek providers — configurable cache_ttl, skills snapshot trimming, memory compaction
- Windows: three bugs from daily use (plugin discovery, gateway exit code, Unicode decode
- holographic memory: HRR silently degrades to FTS5 when numpy is missing
- Make max_tokens configurable for aux vision calls
- Conversation compression desynchronizes session ID between agent context and gateway routing, causing silent message loss
- [Bug]: v0.15.0 Docker image:The TUI cannot be used in the dashboard.
- cron: skip_memory=True blocks fact_store/memory tools from all cron jobs
- TUI: Node.js OOM crash when agent uses browser tools repeatedly
- feat: model_profiles — per-model toolset and memory config
- Automatic background skill patching disrupts active sessions (severe impact on local models)
- ensure_hermes_home() creates root-owned dirs in profile subdirectories when kanban workers are dispatched
- Feature: opt-in webhook bypass for DISCORD_ALLOW_BOTS — allow operator-initiated probes without weakening bot-loop guard
- v0.15.0: Codex requests fail HTTP 400 when participant display_name contains non-ASCII (emoji breaks input[].name pattern)
- Architecture: State Persistence Precedence (Memory vs Skills vs Hooks)
- [Bug]: cronjob tool: create action always fails with "schedule is required for create" even when parameters are provided
- codex-oauth: 'NoneType' object is not iterable in _run_codex_stream (gpt-5.5) — every turn fails non-retryably
- Docs/Config: Plugin local scope enablement ambiguity
- [Bug]: CLI freezes after using /new command (WSL)
- Profile Codex auth can ignore global credential pool when local state is stale
- [workflow-engine] CRITICAL: variable substitution crashes on regex metachars in user input
- [workflow-engine] HIGH: loop and bash nodes leak subprocesses on timeout
- [workflow-engine] HIGH: README documents config env vars the engine never reads
- [workflow-engine] MEDIUM: workflow_run rate limit bypassable via concurrent calls (TOCTOU)
- [workflow-engine] chore: manifest gaps, side-effectful register(), dead code, unauth kanban dispatch
- [mcp_lazy] HIGH: synthetic mcp_server_<name> stub collides with a real MCP server named 'server'
- [mcp_lazy] HIGH: promote_server eager flag documented but never persisted
- [mcp_lazy] MEDIUM: _prev_mode dict leaks and goes stale; not cleared on session evict
- [mcp_lazy] MEDIUM: get_pool has unlocked check-then-set race on pool creation
- [mcp_lazy] MEDIUM: pre_tool_call gives no guidance for unpromoted server-stub calls
- [mcp_lazy] chore: undeclared pre_tool_call hook, nonexistent 'mcp_load_tools' name in docs, missing tests
- [a2a_fleet] CRITICAL: server never auto-starts — register() runs outside an event loop
- [a2a_fleet] CRITICAL: auth_required defaults to false on a cross-machine surface
- [a2a_fleet] HIGH: remove invented disable() hook — loader never calls it, port leaks on reload
- [a2a_fleet] HIGH: plugin.yaml missing kind / provides_tools / requires_env (token env undeclared)
- [a2a_fleet] MEDIUM: tighten wide-open CORS, anonymous /health peer leak, and peer-URL SSRF
- [a2a_fleet] MEDIUM: relocate tests to tests/plugins/ and cover sync-register + auth-default paths
- xai-oauth auxiliary client incorrectly uses Responses API (CodexAuxiliaryClient), causing 403 on compression/vision/web_extract
- [Bug]: Direct Copilot gpt-5.5 large resumes are killed by 12s Codex TTFB watchdog
- [Bug]: `hermes uninstall` does not work on Windows
- TUI: Thinking block leaks raw JSON and Σ character
- Hostinger VPS: migration Hermes Agent → Hermes WebUI impossible (tini + UID mismatch + sessions)
- /goal judge over-continues exploratory goals unless the assistant explicitly says the goal is complete
- /goal auto-continuation can be amplified by preflight compression/session split and resurrect stale task state
- Dashboard infinite reload loop in loopback mode — GET /api/auth/me returns 401 on every page load
- [Bug]: Provider/LLM switch leaves stale encrypted_content causing 400 errors on Telegram sessions
- [Bug]: Infinite reload loop / React state loop on Sessions tab (Firefox + Chrome) — repeated 401 on /api/auth/me (v0.15.0)
- show_reasoning should work independently of streaming in CLI mode
- Feature Request: Strip reasoning/<think> blocks from TTS preprocessing
- mcp add / mcp test raise NameError when mcp package not installed
- v0.14.0 dashboard breaks behind reverse proxies — two regressions
- Skills hub creates empty category directories when no skills installed
- [Bug]: Custom endpoint: ChatCompletions returns content, but Hermes treats response as empty (v0.14.0)
- fix: atomic_replace() fails with EXDEV when HERMES_HOME is a cross-filesystem symlink
- fix(gateway): Feishu session cancellation orphans session guard, permanently blocking messages
- Custom endpoint pricing can overestimate Crof qwen3.5-9b cost by 1,000,000x
- MCP OAuth callback: module-level port global causes port collisions and structural weaknesses vs upstream
- Bug: send_message tool bypasses validate_media_delivery_path security check
- Proposal: Add Mnemosyne to official memory provider documentation
- feat(swarm): support custom verifier/synthesizer body + skills
- Template conversion failed
- Error occurred in the operation of the agent node in the workflow.
- PubSub client overrides Sentinel client when REDIS_USE_SENTINEL is enabled
- Frontend description of the Retrieval node output does not match the actual output
- JSON type input var raise Intenal server error
- cannot extract elements from a scalar
- 负载均衡 为模型配置多组凭据,并自动调用,此功能无法选择
- add models is error
- panic: could not create filter
- Persist partially generated messages when /chat-messages/:task_id/stop is called
- MCP server connection fails with 403 — request never leaves Dify (SSRF proxy suspected)
- Support durable async execution backends for long-running workflow steps
- [Xiaomi MiMo] Credentials validation fails with 400 "Not supported model mimo-v2-flash" when using Token Plan endpoint (v0.0.7)
- After clicking preview on a parent-child segmented knowledge base, it shows 0 chunks
- Retrieval score differs between UI upload (.docx) and API upload (.txt) despite identical chunk content and embedding model
- gemini cli crash again
- Xbox gift card code damage
- Damage caused by the gemini cli crash
- ioctl(2) failed, EBADF (Bad File Descriptor)
- Feat: Support Bun as an alternative runtime/package manager for updates and extensions
- fatal error again!!!!
- ioctl error
- Critical Crash: ioctl(2) failed, EBADF in ShellExecutionService.resizePty
- ioctl(2) failed, EBADF
- v0.44.0 Regression: Critical crash with ioctl(2) failed, EBADF during PTY resize
- Crash on startup: ioctl(2) failed, EBADF in UnixTerminal.resize
- Crash: `ioctl(2) failed, EBADF` in `node-pty` during PTY resize on macOS
- Gemini CLI crashes with `ioctl(2) failed, EBADF` in `node-pty` during `resizePty`
- Remote Role
- ERROR ioctl(2) failed, EBADF /home/mich
- RangeError: Maximum call stack size exceeded
- EBADF Error during folder creationg broke session and terminal glitches
- MAIP / Gargoub Project - Mediterania - North Coast
- Gemini cli crash again in this morning
- ERROR ioctl(2) failed, EBADF
- Verified node install fails — Checksum verification failed (Cloud)
- The extended debugging key did not arrive during registration.
- CollaborationPane unmounts collaboration store on single-user instances, causing permanent "No network connection" state
- Workflow cannot be saved when the name contains "->" (Potentially malicious string)
- automation does not work and does not show an error
- Raj Ai Automation
- Default Data Loader: DOMMatrix is not defined error
- Feature: Per-node execution timestamp overlay on canvas during workflow run
- AI Agent + Vertex `gemini-3.5-flash`: 400 "missing thought_signature" on sequential multi-turn tool calls (post-#24982)
- PDF Loader in Pinecone Vector Store fails due to pdf-parse version conflict (v2 not supported)
- emailReadImap: add UID deduplication, batch size cap, and numeric uid enforcement
- Manual node execution fails with "Could not find a node" when autosave is disabled (N8N_WORKFLOWS_AUTOSAVE_DISABLED)
- Schedule Trigger stopped firing — workflow Published & active, manual executions succeed, no automated fires for 2+ hours
- [MCP SDK] create_workflow_from_code intermittently returns HTTP 500, often as a false negative (workflow persists anyway, causing duplicates on retry)
- Credential-load wedge: workflows using googleApi/jwtAuth credentials silently fail to execute after key rotation
- Google Sheets Trigger every minute is not working manual Execute is working sent email
- [BUG] Plugin marketplace MCP connector remains stuck "still connecting" when mcp-remote requires OAuth
- [redacted at user request]
- Opus 4.7 behavioral regression: loaded instruction-following discipline degraded in recent Claude Code/Cowork updates
- [BUG] Tailscale via Homebrew CLI + Mac App Store GUI, both Macs on macOS, Cowork blocked by VPN detector despite Tailscale being a mesh VPN with no traffic interception
- stopShellPty on tab switch kills active sessions (exit 143) — regression in May 27 build
- [BUG] Long URLs are broken into multiple lines and become unclickable in terminal output
- [BUG] claude rm/stop/reap SIGKILLs background session tree without SIGTERM grace, orphaning git index.lock and similar
- [BUG] Default git workflow in the system prompt was pushed without context or consent
- [MODEL] Inconsistent output quality / Ignoring instructions (overfitting and inappropriate repetition of Korean vocabulary)
- You've hit your weekly limit · resets May 31 at 5pm (Asia/Shanghai)
- Paid yearly subscription silently downgraded to Free with no user action
- [Regression v2.1.153] Plugin bash hooks fail with "echo: write error: Permission denied" on Windows (claude-mem, shell: "bash")
- [BUG] Connector toggles in conversation are not clickable — must click text label instead
- [remote-control] Input from mobile app/browser not reaching host session — output works fine
- Model fails to read/reference CLAUDE.md contents despite being loaded in context
- [BUG] Claude Desktop reinstall destroys Code chat history (transcripts + Recents) while regular Chat history, project files, and memory all survive
- Bypass mode clamps to Accept Edits even with the toggle ON (Claude Code Desktop 1.9255.2 / CC 2.1.149)
- [BUG] TUI input freezes randomly mid-typing — entire prompt becomes unresponsive for minutes
- [BUG] Cowork downloads Linux ELF binary instead of macOS binary on macOS Sonoma 14.8.7 — exit code 132 (SIGILL) on every session
- [Feature Request] Persistent project memory — sessions forget everything on close, forcing users to keep many sessions open
- [Bug] Thread context stale after sleep/resume, returns outdated date and calendar data
- [FEATURE] Add context window usage indicator and warning before auto-compaction
- [BUG] Dictation error: Invalid character in header content ["x-config-keyterms"] on Windows
- [Bug] Anthropic API Error: Server rate limiting despite normal usage
- Does delegating work to `claude -p` subprocesses reduce context accumulation in the parent session?
- [BUG] Claude Code hangs on M1 Mac when terminal says "opening browser to sign in" and browser opens
- [BUG] Claude_Preview MCP preview_start spawns dev server with main-repo cwd instead of session's worktree cwd
- [Bug] Anthropic API Error: Server rate limiting during request execution
- [Bug] Anthropic API Error: Server rate limiting on concurrent requests
- [Bug] Ultraplan ready notification fires before cloud agent completes execution
- [BUG] API 500 ERROR ALL THROUGHOUT THE DAY
- [BUG] Cowork: Live Artifacts folder path changed in 1.9255.2, no automatic migration from Documents\Claude\Artifacts
- [Bug] Auto-compact never triggers despite statusline reporting "100% context used" (v2.1.153, Max sub, 200K mode)
- [BUG] [Desktop / macOS] 'Open in → New Window' detached session: font renders smaller than main, no per-window controls, Cmd+/Cmd- keystrokes routed to main window instead
- Feature request: option to switch between classic and new minimal UI
- [Feature Request] Show timestamps for each message
- [BUG] Terminal corruption when permission prompt appears while navigating Agent Teams agent selection menu
- [FEATURE] Allow users to customize the background color of the Claude desktop app beyond the current light/dark theme presets.
- [BUG] Statusline not displaying on Windows [fixed]
- Background agent UI Stop button is a no-op for stuck agents — process keeps consuming tokens
- Background agents silently die on session pause/resume — no completion notification, no work recovery
- Add option to hide email address from welcome banner
- [BUG] SSH Remote: `projects` field in remote ~/.claude.json becomes null after desktop restart — jsonl files intact, UI shows 'No messages yet' for every session
- [Bug] Claude Code not applying fixes despite claiming to complete tasks
- billing is unfair and poorly documented
- [BUG] Claude Code on the web: declared plugins inactive on first session, require restart to fully load
- [BUG] Restore from archive deleted sessions instead of restoring them
- [BUG] M365 connector fails with AADSTS50011 in Cowork — localhost vs 127.0.0.1 redirect URI mismatch
- claude agents: workflow slash-commands missing from dispatch-input completion (regression-adjacent to #61424)
- Claude Desktop's Info.plist missing TCC usage strings, blocks all EventKit-based MCP servers
- False-positive safety blocks on self-administered governance amendments — request for owner-authority mode for verified professional users
- [BUG] Stop pushing "AUTO"-mode
- [DOCS] Plugin marketplace guide omits `skipLfs` option for git-based sources
- [DOCS] MCP docs omit combined startup notification for MCP server and connector authentication
- [DOCS] Agent view docs omit macOS Privacy & Security identity for background agents
- [DOCS] Npm update docs do not explain release-channel behavior for `claude update`
- [DOCS] Agent SDK docs omit `subagent_type: "claude"` worktree and output persistence behavior
- [DOCS] Background session docs omit `$CLAUDE_JOB_DIR` temp-file behavior
- [FR] mask env-var values in 'claude mcp get <server>' output
- [FR] subagent worktrees should not inherit stale local 'user.email' from prior dispatches
- [BUG] Windows: Grep tool leaks rg.exe + conhost.exe processes (~2000 zombies / 14 GB RAM in long sessions)
- [BUG] Stats dashboard "Peak hour" appears off by one hour
- [BUG] Diff highlight (teal SGR background) bleeds past changed text in 2.1.150–2.1.153
- [FEATURE] confirm before deleting session
- Plugin PostToolUse hooks still silently skip in Claude Desktop / Cowork (re-filing closed #51904)
- /code-review skill: silent fallback to main...HEAD reviews other people's commits, and JSON-only output is hard to read
- Monitor tool doesn't source the shell snapshot like Bash does; PATH-dependent tools (jq, sleep, etc.) fail in Monitor commands on macOS/Nix
- [Bug] Long input lines truncated with ellipsis while typing instead of wrapping in terminal UI
- [FEATURE] VS Code extension: Render submitted user messages as Markdown in chat
- OSC 52 copy from Claude TUI doesn't reach clipboard inside tmux (regression in 2.1.146–2.1.153)
- [BUG] RemoteTrigger create/update returns HTTP 400 with circular error: "event_type is required" / "unknown field event_type"
- [BUG] Option to hide or minimize the built-in "status footer" (multi-line debug/cost panel) [re-raise of #31475]
- [Bug] Feedback submissions being closed without review or action
- [FEATURE] Word-jump cursor navigation in Chat input (option+arrow / bindable actions)
- [FEATURE] ! shell mode: filesystem tab completion
- [BUG] API Error: Usage credits required for 1M context
- claude agents: OSC 52 clipboard emission broken in tmux (regression in 2.1.146–2.1.153)
- CLI crashes on macOS 15 M3 - exit code 1
- [FEATURE] Support Cmd+V image paste from clipboard
- [FEATURE] Enhance claude.ai M365 connector to support MS Planner
- [BUG] Slash command autocomplete hijacks pasted absolute file paths starting with /
- PreToolUse hook `if` filter false-positives on complex Bash commands
- [BUG] Diff panel hangs/whites out
- Feature Request: Support drag-and-drop for binary documents (.wps, .doc, .docx, .xlsx, .pdf) in VS Code extension
- [BUG] activation of 1M context in VSCode
- [FEATURE] Support i18n / language localization for built-in slash command outputs
- Ctrl+V para colar imagens deixou de funcionar no CLI (Windows, PowerShell)
- [FEATURE] Please add Norwegian (Bokmål/Nynorsk) language support to the Claude Code interface
- [BUG] OTel log events (claude_code.user_prompt, api_request_body, tool_decision, hook_execution_complete) emitted with empty trace_id/span_id while sibling spans correlate correctly
- [BUG] Cowork crashes on every message, no VM logs generated, missing AppData\Roaming\Claude
- [FEATURE] first-class session handoff + per-session token budgets for unattended runs
- [FEATURE] Smart paste: convert clipboard code to file reference chips (like Cursor)
- [Feature Request] Restore chat pin functionality to title chat submenu
- [BUG] SIGILL issues with version 2.1.153
- [BUG] Cowork plugin upload fails with generic "Plugin validation failed" when a `description` field in any SKILL.md frontmatter contains angle brackets (`<…>`)
- [BUG] Desktop App 2.1.144+: startup scanner deletes cliSessionId from claude-code-sessions local files on every launch — session not found on disk
- [Feature Request] Add keyboard shortcut to copy last message with proper formatting
- [MODEL] Opus 4.7 not 1M
- Allow naming/renaming background agents in `claude agents` view
- Stale worktrees in .claude/worktrees/ are never cleaned up, consuming massive disk space
- Agent worktrees are never cleaned up, silently consuming disk space
- Subagent worktrees not auto-cleaned when reviewer writes scratch files
- [Bug] Skill initialization hangs for extended duration in Plan Mode
- Claude Desktop writes malformed registry Run entry (nested escaped quotes) - crashes Windows Task Manager and other Run-key parsers
- IME candidate window shows at bottom-right corner instead of caret position (Windows CMD)
- [BUG] Pressing 'Escape' doesn't close the /BTW conversation when the main conversation is asking for approval
- [BUG] Opus 4.7 (1M) intermittently emits empty-string values for tool_use.input fields, killing the session
- FleetView agent UI shows "running" with incrementing elapsed time after agent has returned
- /doctor flags context-scoped cmd+c binding as macOS conflict (false positive)
- [BUG] Text Rendering in Elvish
- Desktop app: Bypass Permissions mode flips to Accept Edits on first prompt (M5 / macOS 26.5)
- [Workaround] Date-Weekday Verification Hook — Prevents Claude from writing wrong weekdays
- [BUG] Claude Code create c:/memfs directory without asking me.
- [BUG] Claude Code's Bash execution waits forever with no processes running
- [BUG] usage stays stuck waiting for 5 hr limit after upgrading to premium seat in team plan
- [Workflow tool] resume cache is unreachable for nontrivial workflows because LLM dispatchers can't transcribe args byte-exactly
- Code review (Preview): "Add a repository" shows no results for private GitHub org repos
- [BUG] /context commands blows up context
- [Feature Request] Add precache expiry hook to enable proactive compaction before token eviction
- [BUG] Context indicator shows 0% at session start despite ~20K+ tokens already loaded
- [Feature Request] Add semantic search for --resume session history
- [Feature Request] Add session search, tagging, and filtering capabilities
- [BUG] Cowork Dispatch reports "desktop not available" on Windows 11 while standard Cowork works normally
- [Bug] Claude Code provides incorrect suggestions with high confidence despite errors
- defaultMode: acceptEdits silently overrides per-path permissions.ask rules for Write/Edit
- [FEATUR configurable tip interval (e.g. tipIntervalSeconds: 30 in settings)E]
- Plugin marketplace fails to load: schema rejects 'displayName' key (v2.1.153)
- claude agents: in-session copy uses broken OSC 52 path while overview correctly uses tmux buffer
- [BUG] Plugin agent descriptions (and custom agents) load unconditionally into context — no parity with disable-model-invocation for skills
- Crashed ultrareview consumed a free credit despite producing zero findings
- [Bug] Character rendering issue - invisible or missing text display
- [BUG] Cowork: processo Claude Code encerra com código 3 — .claude.json não contém token de autenticação (Windows 11 25H2)
- [BUG] 2.1.153 silently discards tools/list response from rmcp 0.12.0 HTTP MCP server (works in 2.1.152, wire-identical handshake)
- VS Code extension: option to auto-resume last session when reopening a workspace folder
- [Bug] Conversation continuation failure
- [BUG] Cowork crashes every time I start a new chat or attempt to continue an existing one in any project. The error displayed is: "Claude Code è andato in crash
- [Bug] Unannounced quota changes
- Native update/install fails with 'socket connection was closed unexpectedly' behind proxy — undici TLS incompatibility
- [BUG] Session name reverting after manual change
- [BUG] 非正常思考,上下文过长时,一直显示思考,点击interrupt按钮失效
- Honor `tools:` frontmatter when an agent is invoked via `@mention` — strip `Task` only when the agent did not declare it
- macOS TCC popup still recurring on v2.1.153 — "2.1.153" would like to access data from other apps
- Claude Code leaks pty handles — exhausts pseudo-terminals on macOS after long session
- [Bug] Agent fails to execute or respond to user input
- [BUG] Persistent "Expecting value: line 1 column 1 (char 0)" JSON parse error after tool execution
- [Feature Request] Implement proactive unit test coverage recommendations for recurring bugs
- VS Code panel lacks status line + terminal lacks image paste in Codespaces, forcing a tradeoff
- `/powerup` only shows ~10 lessons — allow viewing the full catalog
- [Bug] Context contamination after auto-compact with unrelated email draft of Tejo/Sado Basin
- [Bug] VSCode terminal output displays corrupted text with garbled symbols
- [Feature Request] Add LaTeX/KaTeX math rendering to TUI
- [Bug] Sub-agent PR review results not validated by orchestrating agent
- Subagents on Pro 1M tier: trivial probes pass, real workloads fail at first tool call (probe-vs-workload divergence)
- Path-scoped rules and subdirectory CLAUDE.md not loaded when creating new files matching the pattern
- AskUserQuestion: cancelling during extended thinking poisons the whole session with 400 'thinking blocks cannot be modified' (2.1.153); concurrent prompts overwrite each other
- Ideas Missing from Claude Cowork Menu (Windows)
- [BUG_BOUNTY_SAFE_POC_2026] Prompt Injection RCE Test - Command Execution Proof
- [BUG] Cowork scheduled task: execution history row not showing after successful run
- Resuming an extended-thinking session fails permanently with 400 "thinking blocks cannot be modified" (transcript stores thinking text as empty but keeps signature)
- [Bug] Plugin-registered CwdChanged and FileChanged hooks don't fire (settings.json works) — v2.1.153
- Auto-archive on PR merge / branch delete — clarify autoArchiveSessions semantics or add dedicated opt-out
- `claude mcp add` echoes Authorization header value verbatim to stdout, leaks bearer tokens to terminal and session transcripts
- [BUG] Bug report — /insights skill, Claude Code The /insights skill outputs a malformed file path.
- Plugin slash commands render with '*'-inline format instead of two-column, despite matching official plugin shape
- [Bug] Unexpected long text generation without user input or goal
- [Bug] Thinking blocks causing task progression blocked without user modification
- [BUG] (Critical!) contamination by an unknown session simirlar to the report => [Bug] Context contamination after auto-compact with unrelated email draft of Tejo/Sado Basin #63137
- [Critical] Opus 4.7 Korean output degeneration — Korean grammar itself collapses in long contexts
- [BUG] Title: Autocompact buffer persists across /clear — wastes tokens for irrelevant old context
- [Bug] Auto-Compact loses user input before processing in conversation history
- Feature: per-invocation effort parameter + runtime session-config introspection for skills
- Auto-mode classifier mislabels Azure DevOps vote -5 as "Reject" when denying PR vote actions
- [BUG] Claude Desktop and Claude Code CLI never re-register MCP tools after OAuth 2.1 handshake on a remote HTTP server
- [BUG] Workspace file tags leak across sessions
- [BUG] Ink renderer crashes on Windows 11 build 26200 (Canary) duplicate banners, terminal mode leaks, mid-operation aborts
- [BUG] Claude Code Desktop issue
- PTY master fd leak in Claude desktop app exhausts macOS kern.tty.ptmx_max after ~2-3 days
- [BUG] Claude Code — Session Management after Unexpected Interruption
- [Windows] Cowork OpenTelemetry exporter does not initialize - zero events emitted to any destination, including loopback
- [Bug] Opus 4.7: 400 `thinking blocks ... cannot be modified` on long extended-thinking sessions, triggered by history-altering events (scheduled prompts / parallel tool-call cancellation)
- [BUG] API Error: Server is temporarily limiting requests (not your usage limit) · Rate limited
- Multi-plugin custom marketplace: only first plugin registered in installed_plugins.json, skills don't load
- [BUG] Git push through the SDK's git proxy fan-outs into ~500 GitHub REST API calls, exhausting the 5,000/hour budget after a handful of pushes
- [BUG] Claude took liberties it really shouldn't with my global config
- [BUG] Agent window focus lost after navigating with arrow keys, causing scroll deadlock
- [BUG] `--model` flag silently ignored in interactive sessions (works in `--print` only)
- [BUG] Dispatch permanently shows "desktop appears offline" on Windows 11 - never worked on first use
- feat: support per-command enableWeakerNetworkIsolation as safer alternative to dangerouslyDisableSandbox
- /code-review outputs a raw JSON array instead of readable findings
- [BUG] Cowork — Additional allowed domains ignored on Team plan; same domain works on Pro plan
- Haiku
- [Bug] False positive blocking beneficial outcomes in tool execution
- 3P Bedrock SSO: credentials silently expire without triggering re-auth on day 2+
- CLAUDE_AUTOCOMPACT_PCT_OVERRIDE in settings.json env block silently ignored by autocompact logic
- Auto-compaction deletes main session JSONL before verifying summary completion, causing data loss
- [Bug] Claude Code not executing stated actions or producing expected results
- [FEATURE] Deferred Messages — Queue Input for End of Turn
- [BUG] Up/Down arrows in input box navigate history instead of moving cursor — regression in 2.1.149+
- Cancelling a parallel tool-call batch corrupts thinking blocks -> 400 "thinking blocks cannot be modified" permanently wedges the session
- Claude Code caused data loss, then contradicted itself about recovery (two incidents, one session)
- [Bug] Unclear error messages from Claude Code CLI
- [Bug] Agent tool rejecting due to context size limit exceeded
- claude agents: daemon and bg-spare processes spin at ~100% CPU when idle
- [BUG] Compaction fails with "context window limit" error even when context usage is low (e.g., 20%) — regression in v2.1.153
- Remote Control entitlement lost after May 27-28 incident — `Error: Remote Control is not yet enabled for your account` on active Max subscription
- PreToolUse hook exit code 2 does not block Write tool
- [Bug] Thinking blocks in latest assistant message are immutable
- GUI: dispatch file:// and custom-scheme clicks to OS shell handler
- Show current model in statusLine by default
- [Bug] Agent console becomes unresponsive to keyboard input after multiple agents initialized
- [FEATURE] PreToolUse hooks should have a way of updating the environment
- [Bug] Unable to start or use Claude Code CLI
- [BUG] Repository not visible in Claude Code web repo picker
- Session permanently wedged on 400 "thinking blocks cannot be modified" after parallel tool_results
- [Bug] @ autocomplete loses sibling repos after a file edit in multi-repo workspace
- Unclear error message when creating sub-agent without authentication
- [Bug] Anthropic API errors causing frequent failures and high token usage
- [BUG] @ mention file picker only shows packages, not individual files (desktop app - Code tab)
- [Bug] TUI panel footer remains sticky and consumes excessive terminal space
- PR-status polling exhausts GitHub GraphQL rate limit on repos with many open PRs
- [BUG] Windows: welcome panel not shown in some project folders (2.1.153)
- [Bug] Anthropic API Error: thinking blocks corrupted during context compaction with extended thinking enabled
- API 400 "thinking blocks cannot be modified" permanently bricks session during agent activation (interleaved thinking + tool use)
- Right-click Copy copies the whole message instead of the selection; pasted text retains dark background
- Mid-session model switch corrupts conversation when extended thinking is enabled (API 400: 'thinking blocks cannot be modified')
- [BUG] Markdown file links in chat output do not open files when clicked (VS Code extension)
- Stuck retry loop: `400 thinking blocks cannot be modified` on large interleaved-thinking turns using AskUserQuestion
- [FEATURE] Prompt user for approval before auto-compaction proceeds
- Custom MCP connectors not attachable to scheduled routines — no UUID discovery path
- [BUG] Claude in Chrome — Navigation blocked for teams.cloud.microsoft and outlook.cloud.microsoft after Microsoft domain migration**
- [BUG] Claude Desktop — Personal plugins panel renders list but is entirely non-interactive (macOS, v1.9255.2)
- [Bug] error when using Workflows
- [BUG] Persistent "update available" notification despite being on latest version
- [BUG] Sweep Agent from /code-review never completes
- [Bug] Tool calls not executing or returning results
- [FEATURE] Cloud-synced memory and settings across machines
- [Bug] Terminal UI freezes when Ctrl+O view exits during interactive prompt in plan mode
- Continuous api errors when using claude code with Opus 4.7 with thinking on low
- [Feature Request] Add support for installing and using previous Claude Code versions
- [Bug] Extended Thinking: Summarized thinking blocks fail signature validation when resent to API
- [Bug] Anthropic API Error: 'thinking' blocks cannot be modified
- [Bug] Anthropic API Error: Thinking blocks cannot be modified with extended thinking mode
- Feature request: Lazy/on-demand MCP server connections
- [Bug] Tool Arguments Parsed as String Instead of Object
- [Bug] Anthropic API Error: Insufficient context provided
- [Bug] Claude Opus occasionally uses moskovian(russian) orthography instead of Ukrainian in system-prompted responses
- Opus 4.8: backgrounded task completions (subagents AND Bash) crash with 400 "thinking blocks cannot be modified"
- [Bug] Opus 4.7 fabricates stable preferences ("my default") to rationalize arbitrary choices when challenged
- [Bug] Unable to update Claude Code CLI
- [BUG] Desktop app: /remote-control mints link + connects bridge (main.log) but in-chat link/QR panel never renders
- Feature: sessionColor and sessionName in .claude/settings.json
- [BUG] Anthropic API error: thinking blocks
- [FEATURE] Support Remote MCPs in Cowork as in Claude Code
- [Bug] Anthropic API Error: 400 Bad Request with Redacted Thinking - 0 4.7 & 4.8
- [Bug] Anthropic API Error: Cannot modify thinking blocks from different model versions
- Interleaved thinking + multi-tool turn corrupts thinking block (text blanked, signature kept) → permanent 400 'blocks must remain as they were'
- [BUG] Mode/permission changes mid-tool-loop (effortLevel: xhigh) poisons entire session
- Session failure log: Opus 4.6 ignores its own rules for an entire session
- [BUG] "400 Guardrail was enabled" error when using Claude Opus 4.8 with AWS Bedrock
- [Feature Request] Add subagent approach selection option to avoid accidental feedback
- Persistent 400 'thinking blocks in the latest assistant message cannot be modified' — interleaved thinking persisted with empty text + signature bricks sessions
- [BUG] DesktopvsApp
- [BUG] Opus 4.7 cache hit rate collapse after May 27 incident — Messages 1.1k→88.9k in 9 minutes, $630/session
- [Bug] Anthropic API Error: Invalid thinking block format
- [BUG] FUCK CLAUDE
- Opus 4.8 extended thinking: Stop hook block re-entry corrupts thinking blocks → 400
- [Bug] 4.8 Fails when accessing previous model history
- [Bug] Unintended File Modifications During Execution
- [DOCS] Model configuration docs omit lean system prompt default scope and model exceptions
- Add "Always allow globally" option to permission prompts
- Server-side model upgrade (Opus 4.7→4.8) wedges in-flight sessions with `thinking blocks cannot be modified` 400
- [DOCS] AskUserQuestion docs missing multiple-choice prompt decision threshold
- [DOCS] Agent view docs omit shell-command background session launch syntax
- [DOCS] Agent view dispatch input docs incorrectly imply `/logout` dispatches as a prompt
- [DOCS] Claude in Chrome docs omit connected-browser selection behavior
- [DOCS] Plugin docs omit `defaultEnabled: false` for opt-in plugins
- Feature Request: Customizable chat text colors for user and assistant messages
- [DOCS] `/plugin` Discover tab docs omit directory-based suggested plugin pins
- VSCode Chrome integration silently fails: 3 distinct bugs
- [DOCS] MCP stdio docs omit session environment variables
- [Bug] Anthropic API error on second request within session with Claude Opus 4.8
- Cowork emits a blank session "index" handoff on focus when a CLI session is paused awaiting input
- [DOCS] MCP docs omit `claude mcp list/get` pending-approval output for unapproved project servers
- [BUG] /compact fails with 400 error when last assistant turn contains thinking blocks
- [DOCS] `/claude-api` docs omit Opus 4.8 migration guidance
- [DOCS] Fast mode docs still recommend deprecated Opus 4.6 override variable
- [DOCS] Bash tool docs omit `$TMPDIR` consistency across sandboxed and unsandboxed commands
- [Bug] Anthropic API Error: 400 Bad Request on Extended Thinking
- [DOCS] Background session docs omit worktree-isolation behavior for spawned subagents
- Built-in mechanistic self-verification of verifiable claims (symmetric to the auto permission gate)
- [DOCS] Worktree docs do not clarify `worktree.baseRef: "head"` inside linked worktrees
- [BUG] Excessive RAM usage with multiple parallel chats (~10 sessions → 30 GB memory pressure, macOS OOM)
- [DOCS] Managed MCP policy docs omit invalid `allowedMcpServers`/`deniedMcpServers` entry behavior
- [DOCS] Effort docs omit `CLAUDE_CODE_ALWAYS_ENABLE_EFFORT` unsupported-model behavior
- Regression (2.1.147–2.1.150?): resuming an extended-thinking session after a CC update/model-switch → unrecoverable 400, session bricked
- [DOCS] Windows updater docs omit `claude.exe` in-use recovery guidance
- [DOCS] VS Code auto mode docs still tie mode-picker visibility to bypass-permissions setting
- [DOCS] MCP docs omit `/mcp` tool list and detail rendering behavior
- [DOCS] Fine-grained tool streaming docs still describe provider opt-in behavior
- bypassPermissions: session startup reads flat pref, GUI toggle writes per-account pref — they never sync
- [BUG] Claude Desktop Code tab causes disk write limit violation — 8.5GB in 11 min, macOS kills app (M5, v1.9659.1)
- Ultrareview v2.1.96: docs describe /tasks command + claude ultrareview --json subcommand that don't exist; findings hard to read after completion
- I'd be happy to help create a GitHub issue title, but I don't see the error message in your message. Could you please share the specific error you're encountering? That way I can generate an accurate and descriptive issue title for you.
- [BUG] Claude in Chrome `file_upload` rejects all scheduled-task sessions with misleading error (real cause: INVALID_SESSION)
- Extended thinking: signed thinking block 'cannot be modified' (400) permanently wedges session
- RTL text support for Hebrew (and Arabic) in Claude Code
- [Bug] Random errors occurring across multiple operations