Question Inbox

When several AI agents work in parallel on your behalf, pushing every single question to your phone or desktop the second an agent asks it breaks your concentration all day — until you flip Do Not Disturb on and miss the one genuinely urgent crisis that could not wait.

Question Inbox collects every question addressed to you in one ordered list and notifies you about that list only at check-in times you choose. A question can break through between check-ins only when it matches one of a short list of interrupt rules that you wrote yourself.

Group Human in the loop
Also known as Agent Inbox, Notification Digest, Scheduled Summary
Core rule Hold the notification, never the question; only requester rules interrupt
Defines records CheckInSchedule, InterruptRule

Why immediate pings destroy both focus and urgency

Imagine blocking off Tuesday morning to write a pricing proposal while your agents handle background work across operations, research, and engineering. At 10:12 a.m. a worker hits a minor retry-interval question and lights up your screen. At 11:40 a.m. a second worker interrupts you about an invoice export filter. To protect your morning, you silence notifications completely.

At 1:20 p.m., the lead agent discovers that forty customers were charged twice and asks whether to pause the billing job. That critical question lands in the exact same silenced stream as the routine ones. You do not see it until 5:40 p.m., after the billing job ran for four more hours. Because the system treated every question as equally urgent, your only defense was an all-or-nothing mute switch.

Question Inbox replaces all-or-nothing notifications with three structural boundaries owned by the requester and enforced by the hub:

  1. You set your check-in schedule upfront. Routine questions enter your inbox immediately (so you can always visit early), but the hub holds the notification until your next scheduled check-in — sending one calm summary instead of ten pings.
  2. You write the short list of interrupt rules. A question breaks through between check-ins only if it matches an active named_event rule you authored, or a deadline rule when the question's answer_by lands before your next check-in.
  3. The hub decides delivery — never an agent's "urgent" flag. Agents have no urgency button. Every interrupt displays the exact rule name that authorized it, so overly broad rules stand out immediately.

Why hold the notification rather than hiding the question? Because the inbox and the Derived Status Board must never disagree. Putting the question in the inbox immediately while holding only the ping lets the requester open the inbox early whenever they have a spare moment, and tells waiting workers exactly when to expect an answer.

Push every question Routine pings all morning 10:12 retry timer · 11:40 export filter Requester silences all alerts Only control is an all-or-nothing mute 1:20 p.m. double-charge alert Lands in the same muted stream Missed for 4 hours Billing job keeps running unchecked Question Inbox Requester sets clock & rules Check-ins 9:00 & 4:30 + 2 red rules Routine asks Wait for 4:30 p.m. Rule matches Interrupt at 1:20 Hub enforces delivery gate Every interrupt prints its rule name Focus protected, crisis caught 1 urgent reply + 1 calm 4:30 sitting
Delivering every question immediately forces the requester to mute notifications, burying true emergencies alongside routine asks. Question Inbox batches routine questions for check-in windows and breaks through only under explicit requester-authored interrupt rules.

Architecture and participants

The Requester configures one CheckInSchedule and zero or more InterruptRule records in the hub. Agents never message the requester's phone or desktop directly: every open Question routes through the hub's Delivery Gate, which computes the live inbox and emits either a single check-in digest or a rule-justified interrupt.

Requester Sets schedule & rules Lead agent Passes questions on Workers & Checkers Ask Lead; continue work Hub durable records CheckInSchedule tz, times, window, last_notice InterruptRule name, kind, ends_at? Question answer_by?, interrupt_rule_id? Computed Inbox (read-only) Open questions for requester, oldest first Delivery Gate (sole notifier) 1 digest at check-in · interrupt on active rule Solid arrow = writes record · Dashed arrow = computed from records on arrival & window close
Solid arrows represent durable writes (schedule, interrupt rules, and open questions). Dashed arrows represent pure hub computation: the read-only Inbox lists open questions oldest-first, and the Delivery Gate is the sole party allowed to notify the requester.
Requester
Sets check-in times and window duration, writes the short list of interrupt rules, opens the inbox at check-ins (or earlier by choice), and answers questions.
Hub
Stores CheckInSchedule and InterruptRule, computes the oldest-first inbox, evaluates delivery on question arrival and at the end of every check-in window, and sends every notice idempotently.
Lead agent
Escalates questions it cannot settle to the requester, optionally citing an active named_event rule or supplying an answer_by deadline. Cannot bypass the hub's delivery rules.
Workers & Checkers
Raise questions to the lead agent, receive the expected next check-in timestamp when a question is held, and pivot to unblocked tasks while waiting.
Inbox & Notices (derived)
The inbox stores nothing of its own — it queries open questions addressed to the requester oldest-first. Notices are computed fresh at check-in start so already-withdrawn or answered questions are never announced.

Execution flow

Toggle between the normal Tuesday flow — where routine questions wait calmly for 4:30 p.m. while one double-charge alert interrupts immediately — and the missed check-in failure path — where closing an unattended check-in window shifts the next check-in past a deadline and automatically promotes that single question to an interrupt.

Requester Hub Lead agent Workers 1. 10:12 Pass routine retry Q for Requester 2. No rule match -> hold until 4:30 p.m. 3. 1:20 Pass double-charge Q + named_event rule 4. Active rule verified Stamp interrupt_rule_id on Question 5. Interrupt now with rule name 6. 1:22 Answer: Pause billing job 7. Deliver urgent answer immediately 8. 1:50 & 2:15 Two more routine Qs arrive (held) 9. 4:30 Check-in digest: 3 questions waiting 10. Open inbox & answer all 3 in one sitting 11. Deliver answers; inbox now empty

Routine questions enter the inbox without pinging the requester, and waiting workers learn the 4:30 p.m. check-in time so they can move on to other tasks. Only the question matching Dana's active billing-error rule interrupts immediately, carrying the rule name.

Restart safety: Recording last_notice_at on CheckInSchedule ensures a hub restart mid-window never fires a duplicate check-in digest, and stamping interrupt_rule_id on Question ensures the same question never interrupts twice.

Concrete examples

Question Inbox protects deep focus in any asynchronous workflow where most decisions can wait a few hours while a narrow, known class of exceptions cannot.

Example 1 — Campaign launch & pricing proposal day

No code or unit tests
Schedule & rules
Dana sets workday check-ins at 9:00 a.m. and 4:30 p.m. (30-minute windows) and writes two interrupt rules: "A customer was charged in error" (named_event) and "An answer is needed before my next check-in" (deadline).
Missed check-in
On Wednesday at 2:00 p.m., the lead agent escalates a promotional email question needing an answer by 7:00 a.m. Thursday ("Offer 15% or 20% off?"). Because Wednesday 4:30 p.m. is before 7:00 a.m., it waits calmly alongside a routine brand-copy question. Dana gets pulled into a client call and misses the 4:30–5:00 p.m. window.
Inbox result
At 5:00 p.m., the window closes and the next check-in jumps to Thursday 9:00 a.m. The hub re-evaluates open questions, sees 7:00 a.m. < 9:00 a.m., and interrupts Dana with only the promo discount question under her deadline rule. Dana answers at 5:40 p.m.; the routine copy question waits undisturbed until Thursday morning.

Example 2 — Webhook retries, invoice export, and billing double-charge

Operations & software
Routine asks
At 10:12 a.m., Worker 1 asks whether failed webhooks should retry after 30 seconds or 5 minutes. No interrupt rule matches, so the hub holds the notice for 4:30 p.m. and tells Worker 1 the next check-in time. Later in the afternoon (1:50 p.m. and 2:15 p.m.), two more routine questions arrive and wait calmly: Worker 2 asks whether invoice exports may omit zero-invoice accounts, and the lead agent asks which of two sign-in page designs should ship.
Real incident
Between those routine asks, at 1:20 p.m., the lead agent learns forty customers were charged twice and escalates "Should we pause the billing job?" citing Dana's named_event rule.
Inbox result
The hub verifies the rule is active, stamps interrupt_rule_id, and pings Dana immediately with the rule name. She replies "Pause it" at 1:22 p.m. At 4:30 p.m., one single digest arrives and Dana clears all three waiting routine questions in one sitting.

What this pattern is NOT — Single live session or all-blocking chain

Negative example
Scenario
Pairing interactively with one agent in a live chat, or running a strictly sequential pipeline where every single question halts 100% of active work until answered.
Why skip it
In a live 1-on-1 conversation, a question is simply the next turn — holding the notice freezes the only work running. And if workers have nothing else they can advance while a question waits, a check-in schedule only adds idle latency without saving human focus.

When to use and when to skip

Use Question Inbox when

  • One requester directs multiple agents that surface questions at unpredictable hours while the requester focuses on other work.
  • Most questions can wait until the next check-in while workers continue unblocked tasks.
  • A narrow, nameable set of events or hard deadlines truly cannot wait and must break through.
  • You want every interruption to justify itself by naming the requester rule it matched.

Skip it when

  • You are working synchronously with a single agent in a live chat thread.
  • Every question freezes all parallel work, leaving agents idle until you respond.
  • You have not yet made individual questions readable on their own — adopt Self-Contained Question alongside it so check-ins stay fast.

Data model and hub invariants

Question Inbox defines two durable tables — check_in_schedules and interrupt_rules — and reads two nullable columns on questions (answer_by and interrupt_rule_id, defined by Self-Contained Question). The inbox itself is a pure query over open questions, never a separate table.

Party PK id kind name CheckInSchedule PK id UQ/FK requester_id time_zone check_in_times window_seconds last_notice_at? updated_at InterruptRule PK id FK schedule_id name kind ends_at? created_at Question (fields read) PK id FK answerer_id state · opened_at answer_by? FK interrupt_rule_id? 1 1? 1 n 1? n 1 n answerer_id (open questions computed into inbox)
Each requester owns zero or one CheckInSchedule, which owns zero or more InterruptRule records. A Question records at most one interrupt_rule_id if it broke through between check-ins.

Table: check_in_schedules

Column Postgres type Nullability Notes
id uuid NOT NULL, PK Unique schedule identifier.
requester_id uuid NOT NULL, UNIQUE, FK References parties(id) (kind = 'person'); at most one schedule per requester.
time_zone text NOT NULL IANA time zone name (e.g., America/Los_Angeles) used to expand local check-in times.
check_in_times jsonb NOT NULL Non-empty array of {"days": [1..7], "at": "HH:MM"} slots in local 24-hour time.
window_seconds integer NOT NULL Positive duration of each check-in window in seconds (e.g., 1800 for 30 minutes).
last_notice_at timestamptz NULLABLE Start timestamp of the latest check-in slot already notified; prevents duplicate notices after hub restarts.
updated_at timestamptz NOT NULL Timestamp when the requester last edited the schedule.

Table: interrupt_rules

Column Postgres type Nullability Notes
id uuid NOT NULL, PK Unique rule identifier.
schedule_id uuid NOT NULL, FK References check_in_schedules(id); applies only to questions for that schedule's requester.
name text NOT NULL The rule in the requester's own words (e.g., "A customer was charged in error."); shown on every interrupt.
kind text NOT NULL CHECK (kind IN ('named_event', 'deadline', 'monitor_notice')).
ends_at timestamptz NULLABLE Optional expiry for temporary rules (e.g., during a launch week); NULL means standing rule.
created_at timestamptz NOT NULL Timestamp when the requester created the rule.

Seven hub invariants

  1. 01
    At most one check-in schedule per requester Database constraint

    UNIQUE (requester_id) with a foreign key to parties(id) guarantees unambiguous check-in timing for every person.

  2. 02
    Every schedule has at least one slot and a positive window Database constraint

    Database CHECK constraints (mirrored in hub code as empty_check_in_times and invalid_window_seconds) guarantee next_check_in always terminates with a valid window.

  3. 03
    Interrupt rules belong permanently to one schedule Database constraint

    interrupt_rules.schedule_id is NOT NULL referencing check_in_schedules(id), preventing orphaned or cross-requester rules.

  4. 04
    Only two notification paths exist, and digests are idempotent Hub guard

    The hub notifies the requester only via a single check-in digest (computed fresh at check-in start and guarded by last_notice_at, rejecting replays with check_in_already_notified) or an immediate interrupt under one active rule.

  5. 05
    Each question interrupts at most once under an active own rule Hub guard

    evaluate_delivery returns already_interrupted if question.interrupt_rule_id is already set, and rejects expired or foreign-schedule rules with inactive_or_foreign_rule.

  6. 06
    Deadline rules compare answer_by against the next check-in Hub guard

    A deadline rule matches strictly when question.answer_by < next_check_in. Questions with no answer_by never match a deadline rule, and the hub re-evaluates all open questions whenever a check-in window ends.

  7. 07
    Monitor-notice rules never match questions Hub guard

    Rules with kind = 'monitor_notice' are reserved for Condition Monitor alerts. Claiming one for a question is rejected with rule_kind_mismatch.

Reference implementation

The same pure delivery gate and idempotent check-in scheduler in TypeScript, Python, and Elixir. The hub calls evaluate_delivery when a question reaches the requester and again for every open question when a check-in window closes.

-- Pure delivery gate & idempotent check-in scheduler for Question Inbox

inductive RuleKind where
  | namedEvent | deadline | monitorNotice
  deriving Repr, BEq

structure CheckInSlot where
  days : List Nat  -- 1 = Monday .. 7 = Sunday
  «at» : String    -- "HH:MM" in schedule.timeZone (UTC used here for clarity)
  deriving Repr

structure CheckInSchedule where
  id : String
  requesterId : String
  timeZone : String
  checkInTimes : List CheckInSlot
  windowSeconds : Nat
  lastNoticeAt : Option Nat := none  -- unix seconds
  deriving Repr

structure InterruptRule where
  id : String
  scheduleId : String
  name : String
  kind : RuleKind
  endsAt : Option Nat := none
  deriving Repr

-- «open» escapes the keyword `open`; elsewhere it is written `.open`
inductive QuestionState where
  | «open» | answered | withdrawn | expired
  deriving Repr, BEq

structure Question where
  id : String
  answererId : String
  state : QuestionState
  openedAt : Nat
  answerBy : Option Nat := none
  interruptRuleId : Option String := none
  deriving Repr

inductive DeliveryDecision where
  | alreadyInterrupted
  | interrupt (rule : InterruptRule)
  | holdUntil (time : Nat)
  deriving Repr

inductive HubError where
  | emptyCheckInTimes | invalidWindowSeconds | inactiveOrForeignRule | ruleKindMismatch
  | checkInAlreadyNotified
  deriving Repr, BEq

def inboxEntries (questions : List Question) (requesterId : String) : List Question :=
  questions
    |>.filter (fun q => q.state == .open && q.answererId == requesterId)
    |>.mergeSort (fun a b => a.openedAt ≤ b.openedAt)

-- Day 0 of unix time (1970-01-01) was a Thursday, ISO day 4.
def isoWeekday (unixDay : Nat) : Nat := (unixDay + 3) % 7 + 1

-- "HH:MM" to seconds after midnight.
def secondsOfDay (hhmm : String) : Nat :=
  match (hhmm.splitOn ":").map String.toNat! with
  | [hh, mm] => hh * 3600 + mm * 60
  | _ => 0

def nextCheckIn (schedule : CheckInSchedule) (now : Nat) : Except HubError Nat := do
  if schedule.checkInTimes.isEmpty then throw .emptyCheckInTimes
  if schedule.windowSeconds == 0 then throw .invalidWindowSeconds  -- Nat: 0 is "<= 0"

  let today := now / 86400
  -- Every slot start over today and the next 7 days whose window has not yet closed
  let starts := (List.range 8).flatMap fun offset =>
    let day := today + offset
    schedule.checkInTimes.filterMap fun slot =>
      let start := day * 86400 + secondsOfDay slot.at
      if slot.days.contains (isoWeekday day) && start + schedule.windowSeconds > now
      then some start else none
  match starts.min? with
  | some earliest => return earliest
  | none => throw .emptyCheckInTimes  -- no slot falls on any weekday

def evaluateDelivery (question : Question) (claimedRuleId : Option String)
    (schedule : CheckInSchedule) (rules : List InterruptRule) (now : Nat) :
    Except HubError DeliveryDecision := do
  if question.interruptRuleId.isSome then return .alreadyInterrupted

  let isActive (r : InterruptRule) : Bool :=
    r.scheduleId == schedule.id && r.endsAt.all (· > now)  -- no end, or ends after now

  if let some claimedId := claimedRuleId then
    let some claimed := rules.find? (·.id == claimedId) | throw .inactiveOrForeignRule
    unless isActive claimed do throw .inactiveOrForeignRule
    if claimed.kind == .monitorNotice then throw .ruleKindMismatch
    if claimed.kind == .namedEvent then return .interrupt claimed

  let next ← nextCheckIn schedule now
  let deadlineRule := rules.find? fun r => isActive r && r.kind == .deadline
  match deadlineRule, question.answerBy with
  | some rule, some answerBy => if answerBy < next then return .interrupt rule
  | _, _ => pure ()
  return .holdUntil next

def sendCheckInNotice (schedule : CheckInSchedule) (slotStart : Nat) :
    Except HubError CheckInSchedule := do
  if schedule.lastNoticeAt.any (· ≥ slotStart) then throw .checkInAlreadyNotified
  return { schedule with lastNoticeAt := some slotStart }

-- Checked by Lean: a question that already interrupted is never rung twice.
theorem never_rings_twice (q : Question) (ruleId : String) (claimed : Option String)
    (schedule : CheckInSchedule) (rules : List InterruptRule) (now : Nat) :
    evaluateDelivery { q with interruptRuleId := some ruleId } claimed schedule rules now
      = .ok .alreadyInterrupted := by
  simp [evaluateDelivery]
  rfl

Missed check-in and deadline trace

Walking Example 1 (Wednesday missed check-in) through these functions shows how the deadline question waits at 2:00 p.m., how restart replays are rejected with check_in_already_notified, and how closing the 4:30–5:00 p.m. window automatically promotes only the deadline-bound question to an interrupt:

Execution trace: Example 1 (Wednesday missed check-in and deadline re-evaluation)
1. Wed 14:00 — Promo question arrives with answer_by = Thu 07:00
   evaluateDelivery(q_promo_discount, claimedRuleId: null, schedule_dana, rules, now: Wed 14:00)
   -> { action: "hold_until", at: Wed 16:30 } (Wed 16:30 is before Thu 07:00)

2. Wed 16:30 — Check-in starts; hub computes live inbox & sends one digest
   sendCheckInNotice(schedule_dana, slotStart: Wed 16:30, openCount: 2)
   -> sent (schedule_dana.lastNoticeAt = Wed 16:30)
   sendCheckInNotice(schedule_dana, slotStart: Wed 16:30, openCount: 2)  // restart replay
   -> error: check_in_already_notified (idempotent across hub restarts)

3. Wed 17:00 — Window closes unattended; next check-in shifts to Thu 09:00
   evaluateDelivery(q_promo_discount, claimedRuleId: null, schedule_dana, rules, now: Wed 17:00)
   -> { action: "interrupt", rule: rule_deadline } (Thu 07:00 < Thu 09:00!)
   q_promo_discount.interruptRuleId = rule_deadline.id

4. Re-evaluating same question after interrupt:
   evaluateDelivery(q_promo_discount, claimedRuleId: null, schedule_dana, rules, now: Wed 17:05)
   -> { action: "already_interrupted" } (never rings twice)

5. Agent mistakenly claims a monitor_notice rule for a routine question:
   evaluateDelivery(q_copy_review, claimedRuleId: rule_monitor.id, schedule_dana, rules, now: Wed 17:10)
   -> error: rule_kind_mismatch (monitor_notice rules never match questions)

Tradeoffs and practical guidance

Batching attention protects human focus, but it changes how fast routine questions turn around. Weigh three honest tradeoffs:

  • Routine questions wait longer: a non-urgent question asked at 5:15 p.m. on Friday may wait until Monday at 9:00 a.m. The pattern only pays off when waiting workers can pivot to other unblocked jobs or park cheaply via Resumable Wait.
  • Interrupt rules can fail in both directions: a rule written too broadly brings alert fatigue right back (caught quickly because every interrupt names its rule); a missing rule lets an emergency wait until the next check-in.
  • Named-event rules rely on lead-agent judgment: the hub checks deadline rules deterministically, but relies on the lead agent to recognize a real-world named_event — making the visible rule attribution on every interrupt essential feedback.

Practical implementation notes

  • Hold the notice, never the question: expose the question in the inbox from the moment it is escalated so the inbox and the Derived Status Board always match.
  • Compute digests at check-in start, not on arrival: pre-queuing notice messages when questions arrive leads to ghost alerts for questions that were already answered early or withdrawn.
  • Coalesce bursts into one active interrupt: if three questions trigger interrupt rules while the first interrupt is still unanswered, append them to the active alert instead of ringing the requester's phone three times in sixty seconds.
  • Never turn check-ins into guilt-inducing deadlines: missing a check-in should calmly roll routine questions to the next slot; only questions carrying an explicit answer_by should escalate at window close.

Known uses and related patterns

  • Apple Scheduled Summary & notification digests: holds non-urgent mobile notifications for user-chosen delivery times while allowing designated time-sensitive exceptions to break through immediately.
  • GitHub scheduled review reminders: delivers a single batched summary of pull requests awaiting your review on user-selected days and hours, paired with opt-in real-time alerts for specific events.
  • LangChain Agent Inbox: collects paused agent runs awaiting human input into one unified queue rather than scattering asks across raw logs (without built-in check-in schedules or requester-authored interrupt rules).
  • PagerDuty urgency & Hohpe & Woolf's Aggregator: PagerDuty splits high-urgency pages from low-urgency support-hours alerts; in enterprise messaging, an Aggregator collects messages and releases them on a completeness condition — here, the requester's check-in clock.
  • Volgenic: gathers open human decisions into one Needs Attention inbox backed by durable hub records, separating attention routing from chat transcripts.

Related patterns

  • Self-Contained Question — defines the Question record and what each ask must contain; Question Inbox decides when the requester is notified about it.
  • Escalation Chain — decides whether a question reaches the requester at all before the inbox schedules delivery.
  • Derived Status Board — shows one status line per request using the exact same open Question records as the inbox.
  • Tracked Answer — picks up the moment the requester replies in the inbox and tracks the answer until work applies it.
  • Delegation Policy — shrinks the inbox over time by turning repeated check-in answers into standing rules.
  • Resumable Wait & Condition Monitor — park waiting jobs cleanly between check-ins and emit monitor alerts governed by monitor_notice rules.