Skip to content

feat(discord): delegate concurrent questions and preserve async routes - #1

Draft
Callanplays wants to merge 4 commits into
mainfrom
agent/discord-native-busy-delegation
Draft

Callanplays wants to merge 4 commits into
mainfrom
agent/discord-native-busy-delegation

Conversation

@Callanplays

@Callanplays Callanplays commented Jul 31, 2026

Copy link
Copy Markdown

What changed

  • Adds a Discord platform busy-input mode that launches a new plain-text follow-up as a native background Hermes child instead of steering, interrupting, or replacing the active turn.
  • Preserves the original running answer and routes each child result back into the same Discord conversation.
  • Gives each busy child a bounded recent-conversation excerpt so contextual follow-ups remain understandable.
  • Falls back to the existing FIFO queue if delegation cannot start or the follow-up includes media.
  • Allows delegation.max_concurrent_children: unlimited and renders that setting clearly in agent prompts and the TUI.
  • Supports a separate descendant model so depth-one children inherit the parent model while deeper descendants can use a cheaper model.
  • Extends tracked background-process completion metadata with the originating chat type and exact durable Hermes session ID.
  • Persists that routing through processes.json, including gateway restart recovery, so external waiters such as paseo wait <agent-id> --json wake the session that actually launched them instead of whichever conversation is current later.

Why

Discord users commonly send a second, unrelated question while Hermes is still working. The previous busy-session modes either changed the active request, interrupted it, or delayed the new question. Native delegation lets both requests progress independently without creating a user-visible Discord fork/thread.

External agents such as Paseo also outlive the initiating Hermes turn. Their completion watcher therefore needs both the Discord lane and the exact durable Hermes session to return safely under concurrent conversations and after gateway restarts.

Validation

  • 230 passed across focused gateway busy-routing, completion delivery, background watcher, session-context, restart-drain, authorization, delegation, process-registry, and agent-guardrail tests.
  • TUI TypeScript typecheck passed.
  • Python compilation and git diff --check passed.
  • Gateway service restarted successfully with the Discord override active.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Callanplays Callanplays changed the title feat(discord): delegate concurrent questions to native children feat(discord): delegate concurrent questions and preserve async routes Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant