Skip to content

feat(gateway): default (fallback) session + HITL escalation suggestions; multi-mention folds into one discuss run #977

Open

Description

@ajianaz

What problem does this solve?

Owner decision (2026-11-19, this thread): the gateway's routing model has three tiers, and #969 only covers the explicit-mention tier. Two gaps:

  1. Messages without a mention need a defined destination: a default (fallback) session answers them.
  2. The default session must be able to SUGGEST escalation, never spawn silently. When its answer would benefit from a specialist ("this is a pricing question — open @pricing?"), the suggestion is offered to the owner for approval. The owner called this property essential (HITL).
  3. A message mentioning several personas (@A @b @C) should fold into ONE discuss run — participants take turns, read earlier contributions, converge — instead of N independent sessions answering blindly in parallel (the original feat(gateway): mention-to-profile routing — @persona routes to its profile session, dynamic roster #969 AC, amended by owner decision).

The economics behind the design (docs/orchestration.md): multi-agent topologies beat single agents on research evals but cost ~15× tokens; token-matched studies (EMNLP 2026) show gains vanish. So idle listening panels and silent auto-spawn are explicitly out.

Proposed solution

Gateway-side contract; no tole-core change expected (discuss engine, profiles, approvals all ship today):

  1. Fallback session: no mention → the configured default profile session answers; replies land in the origin chat (feat(gateway): mention-to-profile routing — @persona routes to its profile session, dynamic roster #969 reply path). One durable session, same memory semantics (feat(serve): choose a profile per session on create and resume (#740) #885).
  2. Escalation suggestions (HITL only): the default session may propose an escalation as TEXT — a structured suggestion (persona handle(s), why, the tested composition preset where one exists, estimated budget). A client renders it as a one-tap action. No session opens, no persona tokens are spent, until the owner accepts. Dismissing is free and logged.
  3. Multi-mention fold: @A @b @C in one message (or an accepted multi-persona suggestion) starts ONE discuss run with those participants under one contract (question + criteria + participants + budget). The discuss engine provides turns, reading order, sanitizer and ledger; the [PLAN] discussion engines: parallel fan-out/fan-in + standalone sanitizer + web-search budget per participant #902 parallel engine stays opt-in for brainstorm and is NOT required by this issue.
  4. Transparency notice: every routing decision (mention, fold, accepted suggestion, fallback) prints one line: route taken, session new/resumed, memory entries, budget remaining.
  5. Anti-nag: at most one open suggestion per conversation; suggestions rate-limited and logged so the default session cannot push repeatedly.
  6. Tested presets as first-class suggestions: the verified compositions (strategy 8–10/500k/r3, technical 5/400k/r2, UI 6, GTM 8, pricing 7, security 5) are offered as menu items, not invented per time.

Alternatives considered

Acceptance criteria

  • A message with no mention reaches the default session; its reply lands in the origin chat; the fallback is named in the transparency notice.
  • An escalation suggestion is text-only until accepted: no persona session, no persona tokens, no tool grants before the owner's one-tap acceptance; dismissal is logged.
  • The suggestion payload carries handle(s), rationale, a preset name where one applies, and a budget estimate; the estimate is shown before acceptance.
  • A multi-persona message (or accepted multi-persona suggestion) produces exactly ONE discuss run; participants, contract and budget match the suggestion/mention set; the ledger records the folded run.
  • The transparency notice prints on every routing decision; no routing happens without a visible line.
  • At most one open suggestion per conversation; a dismissed suggestion is not re-proposed for the same topic in the same conversation.
  • Presets are config data (not model-invented); adding a preset needs no gateway code change (dynamic roster consistent with feat(gateway): mention-to-profile routing — @persona routes to its profile session, dynamic roster #969).
  • Gateway README documents the fallback + suggestion protocol; doctor output lists the default profile and available presets.

Parent: #910. Related: #969 (mention routing — amended), #902 (discussion engines), #885 (profiles + memory_room), #962/#911 (reply + approval surfacing).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions