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.
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:
- 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.
-
You write the short list of interrupt rules. A question breaks through
between check-ins only if it matches an active
named_eventrule you authored, or adeadlinerule when the question'sanswer_bylands before your next check-in. - 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.
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.
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.
named_event rule or supplying an
answer_by deadline. Cannot bypass the hub's delivery
rules.
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.
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.
Wednesday afternoon: Dana's check-in window is 4:30–5:00 p.m., and a question needs an answer by 7:00 a.m. Thursday.
At 2:00 p.m. the question waits because 4:30 p.m. falls before the 7:00 a.m. deadline. When Dana misses the 4:30–5:00 p.m. window, the next check-in shifts to Thursday 9:00 a.m. — now after the deadline. Re-evaluating deadline rules at window close catches the slip and interrupts Dana at 5:00 p.m., while leaving non-deadline questions quietly waiting for Thursday morning.
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 1asks 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 2asks 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_eventrule. - 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.
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
-
01At most one check-in schedule per requester Database constraint
UNIQUE (requester_id)with a foreign key toparties(id)guarantees unambiguous check-in timing for every person. -
02Every schedule has at least one slot and a positive window Database constraint
Database
CHECKconstraints (mirrored in hub code asempty_check_in_timesandinvalid_window_seconds) guaranteenext_check_inalways terminates with a valid window. -
03Interrupt rules belong permanently to one schedule Database constraint
interrupt_rules.schedule_idisNOT NULLreferencingcheck_in_schedules(id), preventing orphaned or cross-requester rules. -
04Only 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 withcheck_in_already_notified) or an immediate interrupt under one active rule. -
05Each question interrupts at most once under an active own rule Hub guard
evaluate_deliveryreturnsalready_interruptedifquestion.interrupt_rule_idis already set, and rejects expired or foreign-schedule rules withinactive_or_foreign_rule. -
06Deadline rules compare answer_by against the next check-in Hub guard
A
deadlinerule matches strictly whenquestion.answer_by < next_check_in. Questions with noanswer_bynever match a deadline rule, and the hub re-evaluates all open questions whenever a check-in window ends. -
07Monitor-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 withrule_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
// Pure delivery gate & idempotent check-in scheduler for Question Inbox
type RuleKind = "named_event" | "deadline" | "monitor_notice";
interface CheckInSlot {
days: number[]; // 1 = Monday .. 7 = Sunday
at: string; // "HH:MM" in schedule.timeZone (UTC used here for clarity)
}
interface CheckInSchedule {
id: string;
requesterId: string;
timeZone: string;
checkInTimes: CheckInSlot[];
windowSeconds: number;
lastNoticeAt: number | null; // unix seconds
}
interface InterruptRule {
id: string;
scheduleId: string;
name: string;
kind: RuleKind;
endsAt: number | null;
}
interface Question {
id: string;
answererId: string;
state: "open" | "answered" | "withdrawn" | "expired";
openedAt: number;
answerBy: number | null;
interruptRuleId: string | null;
}
type DeliveryDecision =
| { action: "already_interrupted" }
| { action: "interrupt"; rule: InterruptRule }
| { action: "hold_until"; at: number };
function inboxEntries(questions: Question[], requesterId: string): Question[] {
return questions
.filter((q) => q.state === "open" && q.answererId === requesterId)
.sort((a, b) => a.openedAt - b.openedAt);
}
function nextCheckIn(schedule: CheckInSchedule, nowSec: number): number {
if (schedule.checkInTimes.length === 0) throw new Error("empty_check_in_times");
if (schedule.windowSeconds <= 0) throw new Error("invalid_window_seconds");
const base = new Date(nowSec * 1000);
let earliest = Number.POSITIVE_INFINITY;
for (let offset = 0; offset <= 7; offset++) {
const d = new Date(Date.UTC(base.getUTCFullYear(), base.getUTCMonth(), base.getUTCDate() + offset));
const isoDay = d.getUTCDay() === 0 ? 7 : d.getUTCDay();
for (const slot of schedule.checkInTimes) {
if (!slot.days.includes(isoDay)) continue;
const [hh, mm] = slot.at.split(":").map(Number);
const startSec = Math.floor(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), hh, mm) / 1000);
if (startSec + schedule.windowSeconds > nowSec && startSec < earliest) {
earliest = startSec;
}
}
}
return earliest;
}
function evaluateDelivery(
question: Question,
claimedRuleId: string | null,
schedule: CheckInSchedule,
rules: InterruptRule[],
nowSec: number
): DeliveryDecision {
if (question.interruptRuleId !== null) return { action: "already_interrupted" };
const isActive = (r: InterruptRule) =>
r.scheduleId === schedule.id && (r.endsAt === null || r.endsAt > nowSec);
if (claimedRuleId !== null) {
const claimed = rules.find((r) => r.id === claimedRuleId);
if (!claimed || !isActive(claimed)) throw new Error("inactive_or_foreign_rule");
if (claimed.kind === "monitor_notice") throw new Error("rule_kind_mismatch");
if (claimed.kind === "named_event") return { action: "interrupt", rule: claimed };
}
const next = nextCheckIn(schedule, nowSec);
const deadlineRule = rules.find((r) => isActive(r) && r.kind === "deadline");
if (deadlineRule && question.answerBy !== null && question.answerBy < next) {
return { action: "interrupt", rule: deadlineRule };
}
return { action: "hold_until", at: next };
}
function sendCheckInNotice(schedule: CheckInSchedule, slotStartSec: number): void {
if (schedule.lastNoticeAt !== null && schedule.lastNoticeAt >= slotStartSec) {
throw new Error("check_in_already_notified");
}
schedule.lastNoticeAt = slotStartSec;
}
# Pure delivery gate & idempotent check-in scheduler for Question Inbox
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from typing import Literal, Optional
@dataclass
class CheckInSchedule:
id: str
requester_id: str
time_zone: str
check_in_times: list[dict] # [{"days": [1..5], "at": "09:00"}, ...]
window_seconds: int
last_notice_at: Optional[datetime] = None
@dataclass
class InterruptRule:
id: str
schedule_id: str
name: str
kind: Literal["named_event", "deadline", "monitor_notice"]
ends_at: Optional[datetime] = None
@dataclass
class Question:
id: str
answerer_id: str
state: Literal["open", "answered", "withdrawn", "expired"]
opened_at: datetime
answer_by: Optional[datetime] = None
interrupt_rule_id: Optional[str] = None
class HubError(Exception):
pass
def inbox_entries(questions: list[Question], requester_id: str) -> list[Question]:
return sorted(
(q for q in questions if q.state == "open" and q.answerer_id == requester_id),
key=lambda q: q.opened_at,
)
def next_check_in(schedule: CheckInSchedule, now: datetime) -> datetime:
if not schedule.check_in_times:
raise HubError("empty_check_in_times")
if schedule.window_seconds <= 0:
raise HubError("invalid_window_seconds")
candidates: list[datetime] = []
base = now.astimezone(timezone.utc).date()
for offset in range(8):
day = base + timedelta(days=offset)
for slot in schedule.check_in_times:
if day.isoweekday() not in slot["days"]:
continue
hh, mm = (int(p) for p in slot["at"].split(":"))
start = datetime(day.year, day.month, day.day, hh, mm, tzinfo=timezone.utc)
if start + timedelta(seconds=schedule.window_seconds) > now:
candidates.append(start)
return min(candidates)
def evaluate_delivery(
question: Question,
claimed_rule_id: Optional[str],
schedule: CheckInSchedule,
rules: list[InterruptRule],
now: datetime,
) -> tuple[str, object]:
if question.interrupt_rule_id is not None:
return ("already_interrupted", None)
def active(r: InterruptRule) -> bool:
return r.schedule_id == schedule.id and (r.ends_at is None or r.ends_at > now)
if claimed_rule_id is not None:
claimed = next((r for r in rules if r.id == claimed_rule_id), None)
if claimed is None or not active(claimed):
raise HubError("inactive_or_foreign_rule")
if claimed.kind == "monitor_notice":
raise HubError("rule_kind_mismatch")
if claimed.kind == "named_event":
return ("interrupt", claimed)
nxt = next_check_in(schedule, now)
deadline_rule = next((r for r in rules if active(r) and r.kind == "deadline"), None)
if deadline_rule and question.answer_by is not None and question.answer_by < nxt:
return ("interrupt", deadline_rule)
return ("hold_until", nxt)
def send_check_in_notice(schedule: CheckInSchedule, slot_start: datetime) -> None:
if schedule.last_notice_at is not None and schedule.last_notice_at >= slot_start:
raise HubError("check_in_already_notified")
schedule.last_notice_at = slot_start
# Pure delivery gate & idempotent check-in scheduler for Question Inbox
defmodule QuestionInbox do
def entries(questions, requester_id) do
questions
|> Enum.filter(&(&1.state == :open and &1.answerer_id == requester_id))
|> Enum.sort_by(& &1.opened_at, DateTime)
end
def evaluate_delivery(question, claimed_rule_id, schedule, rules, now) do
with :ok <- check_not_already_interrupted(question),
{:ok, next} <- next_check_in(schedule, now) do
active = Enum.filter(rules, &active?(&1, schedule, now))
case check_claimed_rule(claimed_rule_id, rules, schedule, now) do
{:interrupt, rule} -> {:ok, {:interrupt, rule}}
{:error, reason} -> {:error, reason}
:none -> check_deadline(question, active, next)
end
end
end
def send_check_in_notice(schedule, slot_start) do
if schedule.last_notice_at != nil and
DateTime.compare(schedule.last_notice_at, slot_start) != :lt do
{:error, :check_in_already_notified}
else
{:ok, %{schedule | last_notice_at: slot_start}}
end
end
def next_check_in(%{check_in_times: []}, _now), do: {:error, :empty_check_in_times}
def next_check_in(%{window_seconds: w}, _now) when w <= 0, do: {:error, :invalid_window_seconds}
def next_check_in(schedule, now) do
today = now |> DateTime.shift_zone!(schedule.time_zone) |> DateTime.to_date()
starts =
for offset <- 0..7,
date = Date.add(today, offset),
%{"days" => days, "at" => at} <- schedule.check_in_times,
Date.day_of_week(date) in days,
start = DateTime.new!(date, Time.from_iso8601!(at <> ":00"), schedule.time_zone),
DateTime.compare(DateTime.add(start, schedule.window_seconds), now) == :gt,
do: start
{:ok, Enum.min(starts, DateTime)}
end
defp check_not_already_interrupted(%{interrupt_rule_id: nil}), do: :ok
defp check_not_already_interrupted(_q), do: {:ok, :already_interrupted}
defp check_claimed_rule(nil, _rules, _schedule, _now), do: :none
defp check_claimed_rule(id, rules, schedule, now) do
case Enum.find(rules, &(&1.id == id)) do
nil -> {:error, :inactive_or_foreign_rule}
rule ->
cond do
not active?(rule, schedule, now) -> {:error, :inactive_or_foreign_rule}
rule.kind == :monitor_notice -> {:error, :rule_kind_mismatch}
rule.kind == :named_event -> {:interrupt, rule}
true -> :none
end
end
end
defp check_deadline(%{answer_by: nil}, _active, next), do: {:ok, {:hold_until, next}}
defp check_deadline(question, active, next) do
case Enum.find(active, &(&1.kind == :deadline and DateTime.compare(question.answer_by, next) == :lt)) do
nil -> {:ok, {:hold_until, next}}
rule -> {:ok, {:interrupt, rule}}
end
end
defp active?(rule, schedule, now) do
rule.schedule_id == schedule.id and
(rule.ends_at == nil or DateTime.compare(rule.ends_at, now) == :gt)
end
end
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:
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_byshould 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
Questionrecord 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
Questionrecords 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_noticerules.