kiro-discord-bot

Listen Modes #

Listen mode determines when a Discord message becomes agent work. It is the main safety layer that prevents accidental bot-to-bot loops while keeping single-bot channels ergonomic.

Parent Channel Modes #

ModeTriggerThread behaviorTypical use
Full-listenAny normal human messageNew tasks open threads by defaultA channel with one assistant bot
Mention-onlyReal Discord mention of the botParent-channel replies without new threads unless re-enabledShared channels or quiet periods
Automatic multi-bot mention-onlyReal Discord mention of a specific botDepends on the target's current thread settingChannels where multiple peer bots can respond

/pause switches a parent channel to mention-only and disables new task threads. /back restores full-listen behavior and turns new task threads back on.

Job Reaction Status #

When a Discord message becomes a job, the bot keeps exactly one progress reaction on that source message. This applies to inline replies, newly created task threads, and thread follow-ups. Progress may rotate through 🔄, 💭, ✨, 🔁, 🛠️, ⚙️, 🔧, or 📋; terminal state replaces all tracked progress with ✅, ⚠️, or ❌. Remote A2A task IDs are never treated as local Discord reaction targets.

A delivery failure may intentionally add one diagnostic hint beside ❌, such as 🔒 for missing permission or 🌐 for a transport/server failure. That two-reaction combination is terminal, not an indication that work is still running. Reaction transitions are serialized per job; failures are retried during terminal reconciliation and logged if Discord still refuses the update.

Thread Behavior #

Each task thread, including one created manually in Discord, keeps the listen mode captured when it was created. Later parent-channel changes do not silently rewrite old thread behavior.

Thread agents are independent from the parent channel agent. Work in one thread does not block the parent channel or another thread.

Mentions #

Use real Discord mentions from the Discord UI. Plain text such as @BuildBot may not trigger the bot. When multiple peer bot mentions appear at the start of a human message, they are treated as routing metadata and removed from the task text delivered to each mentioned bot.

The bot also provides structured mention references to the agent so final answers can mention known users or peer bots without guessing raw Discord IDs. Peer bot references are target-scoped: a bot is available for an explicitly human-requested visible notification only when it can effectively view and respond in the current channel or thread. Permission revocation removes stale peer references before delivery. A peer mention does not delegate work or trigger that bot.

Discord Channel Webhooks #

Discord webhook messages are bot-authored and ignored by default. A channel manager can run /webhook mode:on to allow tagged webhook prompts for that parent channel. Even when enabled, the webhook content must start with a real mention of this bot, such as <@BOT_ID>; run /webhook mode:status in the channel to see the exact tag. Webhook messages never execute bang/slash administration commands; accepted webhook content is treated only as agent prompt text.

Multi-bot Coordination #

Peer bots are auto-discovered from guild bot members when the bot starts. This guild-wide result is only a catalog: each channel or thread prompt includes a peer only when Discord permissions allow that bot to view and respond in the current target. BOT_PEERS is only needed to override names/roles, add a bot discovery cannot see, or exclude a bot.

Bot-authored Discord messages are never accepted as agent jobs, even when a known peer mentions this bot in a completed thread. Peer mentions are visible notifications only. Use A2A tasks for cross-runtime delegation, review, comparison, or collaboration; A2A owns admission policy, durable task state, deduplication, quotas, and audit. Tagged webhook prompts remain a separate path and must be explicitly enabled with /webhook mode:on.

Debugging Listen Mode #

Run /doctor in the target channel or thread. It reports whether the context is open, mention-only, opened by /back, or in automatic multi-bot mention-only mode. It also checks whether the bot can view and respond in the target.