Tracked Answer

You answered an agent's question yesterday morning, closed the tab, and moved on with your day. Days later, the finished work ignores what you decided — not because anyone defied you, but because the agent that asked restarted before your reply arrived, and the system treated sending your message as closing the loop.

Tracked Answer stores every reply as a durable record of its own, tied to the question and the job that must carry it out — never to the temporary agent session that happened to ask. The answer stays open until the job supplies evidence that the work changed, a later answer replaces it, or an agent declines it with a written reason. Reach for it whenever you answer asynchronously and cannot afford to repeat yourself across agent restarts or handoffs.

Group Human in the loop
Also known as Durable Reply, Effect-Tracked Response
Core rule Keep every answer open until the job proves it was applied, replaced, or declined
Defines records Answer

Why delivering a reply isn't enough

When you direct agents asynchronously — across research, operations, content, or software — hours often pass between the moment an agent asks a question and the moment you reply. During that gap, agent sessions crash, hit context limits, time out, or hand the job to a fresh worker.

If the system treats your reply as a message addressed to the agent that asked — and marks the question finished as soon as you press Send — two silent failures creep in. First, your reply may be routed to an agent that no longer exists while a replacement worker finishes the job using an outdated guess. Second, even when a live worker receives the message and says "got it," context pressure can cause it to finish the job without actually changing the work. Nothing throws an error; every log says the question was answered and the job closed cleanly.

Tracked Answer separates giving an answer from carrying it out through three rules enforced by the hub in code:

  1. Bind the answer to the job, never to the asking agent. Each Answer record points to the Question it answers and the Job responsible for acting on it, so any replacement assignee automatically receives every open answer when it takes over.
  2. Treat acknowledgment as receipt, not completion. An answer starts open and stays open after an assignee reads it. It closes only as applied (with evidence), replaced (by a newer answer to the same question), or declined (with a written reason).
  3. Refuse to close a job while any answer is open. The hub blocks job completion in code until every open answer naming that job has reached a closed state.

Why must an answer stay open after delivery? Because delivery only proves bytes reached a running process; it proves nothing about the finished output. Keeping the answer open until the job reports concrete evidence turns "did my reply actually take effect?" from guesswork into a hub-enforced fact.

Fire-and-forget reply Worker A asks, then stops Job is reassigned overnight to Worker B Requester replies next morning Question marked closed immediately Reply routed to dead Worker A Worker B never receives the decision Job closes on the old guess Silent failure; requester discovers it later Tracked Answer Worker A asks, then stops Job is reassigned overnight to Worker B Hub opens Answer on the Job Tied to Question + Job, not Worker A Delivered to current assignee Hub blocks job close while still open Worker B proves effect Answer closes as applied; job may close
Addressing a reply to the session that asked loses the decision whenever work changes hands. Binding an open Answer record to the durable Job delivers it to whichever worker owns the job now and blocks closure until evidence confirms the effect.

Architecture and participants

A Question holds no answer columns of its own. The moment the requester or lead agent responds, the hub writes an Answer record pointing at the question (at the exact version the answerer read) and the affected Job. From there, the hub routes the open answer to whoever currently holds the job and enforces its four-state lifecycle (open → applied, replaced, or declined).

Requester Answers & reads outcomes Hub Delivers & gates closure Lead agent Answers or declines Hub durable records & answer lifecycle Question Prompt & version Answer Text, state, evidence Job Tracks current assignee open applied (+proof) replaced (+next) declined (+why) Deliver open answers Current assignee (Worker) Acknowledges, applies with evidence, or declines with reason
The requester and lead agent create answers; the hub stores each answer against the question and job, delivers every open answer to the current assignee, and closes the record only on evidence, replacement, or a reasoned decline.
Requester
Answers questions only a human can settle, reviews outcomes on the status board at check-in, and issues a revised answer if an earlier one is declined or needs to change.
Lead agent
Answers routine questions within its authority (tracked identically to human replies), re-points answers if work moves between jobs, and may decline an answer on a job's behalf with a reason. When an answer names no job, the lead acts in the assignee's place.
Hub
Stores Answer records, enforces at most one open answer per question, delivers open answers to the job's present assignee, and refuses to mark a job done while any of its answers remain open.
Current assignee
Whichever worker holds the job right now — even if a different worker asked the original question. Acknowledges open answers, carries them out with evidence, or declines them with an explicit explanation.
Answer record
First-class durable record capturing what was answered, which question version was read, which job must act, who acknowledged it, and the closing evidence, decline reason, or superseding answer link.

Execution flow

Toggle between the normal handoff path — where the worker that asked disappears overnight yet the requester's reply still reaches the replacement worker and closes on evidence — and the failure path — where the hub blocks premature job completion, surfaces a reasoned decline, and handles idempotent retries safely.

Requester Hub Worker A Worker B 1. Ask question on job 2. Place question in inbox 3. Worker A stops overnight Lead reassigns job to Worker B 4. Reply: Use event ID (opens Answer) 5. Deliver open answer to current assignee 6. Acknowledge answer (remains open) 7. Carry out answer on job Update logic & gather proof 8. Report applied + evidence (closes Answer) 9. Show Applied at next check-in

Worker A asks a question and restarts overnight before the reply arrives. Because the hub binds the Answer to the job rather than Worker A, the replacement assignee (Worker B) receives it, acknowledges it, applies it with evidence, and closes the loop without the requester ever learning Worker A died.

Answers without a job: If a question holds up no specific job (job_id is null), the request's Lead agent acts in the assignee's place until the answer is closed or pointed at a job.

Concrete examples

Tracked Answer works identically whether the job produces a policy document, an operational change, or production code. Whenever a reply must outlive the asking session and change an artifact, the same four-state record applies.

Example 1 — Vendor compliance brief

No code or unit tests
Situation
A procurement manager asks her agent team to write a vendor risk brief. Analyst A asks, "Should we evaluate the vendor's SOC 2 Type I report now or require Type II?" Overnight, Analyst A's session times out and the lead agent reassigns the brief job to Analyst B.
Tracked reply
Next morning the manager answers, "Require SOC 2 Type II only." The hub creates an open Answer pointing at the question and the brief job — never at Analyst A — and immediately delivers it to Analyst B.
Verification
Analyst B acknowledges the answer (which leaves it open), revises the compliance section, and submits the updated section link and Type II attestation reference as evidence. Only then does the hub mark the answer applied and permit the brief job to close.

Example 2 — Duplicate webhook deduplication

Simple software workflow
Situation
Customers are receiving duplicate webhook deliveries. Worker A asks which field should identify a duplicate event, then its container restarts overnight and the lead agent reassigns the job to Worker B.
Blocked close
The requester replies, "Use the event ID." The hub delivers the open answer to Worker B. When Worker B attempts to mark the job done before acting on it, the hub refuses with open_answers_remain.
Decline & resolve
Worker B inspects historical payloads, discovers events from before March have no event_id, and declines the answer with that reason. The hub surfaces the decline to the requester, who submits a second answer: "Use event_id, and fall back to delivery_id for events before March." Worker B applies the revised rule, reports commit and verification evidence, and closes the job cleanly.

What this pattern is NOT — Atomic approvals or live synchronous chat

Negative example
Situation
Clicking an "Approve and merge" button that executes the merge in the same action, or working live in a single chat window where you see the agent apply your answer in its very next turn.
Why skip it
When the reply and its effect happen in one atomic step — or synchronously right in front of you — there is no asynchronous handoff gap left to track. Adding an acknowledge-and-evidence lifecycle would create ceremony without reducing risk.

When to use and when to skip

Use Tracked Answer when

  • One participant answers the question and a separate agent carries out the decision asynchronously.
  • The agent that asked may restart, hit context limits, or be replaced before the reply arrives.
  • Work that silently ignores the reply is costly to detect or undo after the job closes.
  • The job can produce concrete evidence that the work changed (a revised document section, changed setting, diff, or verification output).

Skip it when

  • The answer and its effect execute in one atomic action (such as pressing Approve to immediately merge or release).
  • One human and one agent are working synchronously in a single live session where the human watches the next turn directly.
  • The requester is volunteering an unprompted fact or standing rule rather than answering a question (record those via Context Handoff or Delegation Policy).
  • The reply is purely informational chatter that does not need to alter any job's output.

Data model and hub invariants

Tracked Answer defines one durable table — answers — and references three records defined elsewhere in the catalog: questions (Self-Contained Question), jobs (Durable Job), and parties (Orchestrator-Workers). Keeping question_version on every answer locks the reply to the exact wording the answerer read even if the question is later edited.

Question PK id Job PK id Party PK id Answer PK id FK question_id question_version FK job_id? FK answered_by_id text answered_at state FK acknowledged_by_id? acknowledged_at? closed_at? FK closed_by_id? evidence? decline_reason? FK replaced_by_id? 1 n 1? n 1 n n 1? n 1? 1 replaced_by_id (same question) Fields ending in ? may be null · Dashed connectors denote optional foreign keys
Each Answer responds to one Question, optionally targets one Job, tracks the Party that answered, acknowledged, and closed it, and may link to a newer Answer via replaced_by_id. Cardinalities follow the catalog convention (1, 1?, n).

Table: answers

Column Postgres type Nullability Notes
id uuid NOT NULL, PK Primary key named by every acknowledgment, apply report, or decline.
question_id uuid NOT NULL, FK References questions(id); an answer cannot exist without its question.
question_version integer NOT NULL Snapshot of questions.version read when answering (CHECK (question_version > 0)).
job_id uuid NULLABLE, FK References jobs(id); job responsible for applying the answer (null when the question blocks no job).
answered_by_id uuid NOT NULL, FK References parties(id); requester or lead agent who gave the answer.
text text NOT NULL The reply in plain words (for example, "Use the event ID.").
answered_at timestamptz NOT NULL Timestamp when the answer was recorded.
state text NOT NULL CHECK (state IN ('open', 'applied', 'replaced', 'declined')); starts as open.
acknowledged_by_id uuid NULLABLE, FK References parties(id); party that last confirmed reading the answer.
acknowledged_at timestamptz NULLABLE Timestamp of that acknowledgment; null until acknowledged.
closed_at timestamptz NULLABLE Timestamp when state left open.
closed_by_id uuid NULLABLE, FK References parties(id); party whose report or newer answer closed this record.
evidence jsonb NULLABLE Non-empty JSON array of proof items; populated if and only if state = 'applied'.
decline_reason text NULLABLE Explanation of why the answer could not be applied; populated if and only if state = 'declined'.
replaced_by_id uuid NULLABLE, FK References answers(id); populated if and only if state = 'replaced'.

Eight hub invariants

  1. 01
    Bound to an existing question version and optional job Database constraint

    Foreign keys on question_id, job_id, and answered_by_id ensure every answer belongs to a real question, starts tied to the job that question holds up, and freezes question_version so later wording edits cannot rewrite what was answered.

  2. 02
    At most one open answer per question Database constraint

    A partial unique index CREATE UNIQUE INDEX answers_one_open_per_question ON answers (question_id) WHERE state = 'open' guarantees concurrent replies cannot leave two active answers. Storing a newer reply closes the prior open row as replaced with replaced_by_id in the same transaction.

  3. 03
    Closing columns match state exactly Database constraint

    A row-level CHECK constraint guarantees an open answer has null closing fields, while every closed answer has non-null closed_at and closed_by_id plus exactly one of evidence (applied), decline_reason (declined), or replaced_by_id (replaced).

  4. 04
    Closed answers never reopen Hub guard

    Once an answer leaves open, transitions back to open are rejected with not_allowed. If the requester changes direction after an answer was applied, they record a new answer rather than mutating history.

  5. 05
    Only the current assignee may acknowledge or apply; assignee or lead may decline Hub guard

    acknowledge and report_applied verify answer.job_id == job.id and party_id == job.assignee_id (otherwise returning not_allowed). decline additionally permits the request's lead_id, and rejects empty reasons with decline_reason_required.

  6. 06
    Reassignment invalidates the previous worker's acknowledgment Hub guard

    to_deliver selects every open answer on the job where acknowledged_by_id != job.assignee_id, so a newly assigned worker automatically receives every open answer even if an earlier worker acknowledged it before crashing.

  7. 07
    Applying requires evidence, and retries are idempotent Hub guard

    report_applied rejects empty proof lists with evidence_required. Calling report_applied again on an answer that is already applied returns the unchanged record without error so network retries are safe.

  8. 08
    A job cannot close while any of its answers remain open Hub guard

    close_job rejects closure with open_answers_remain if any answer with job_id == job.id is still open. Answers with a null job_id block no job and stay the lead agent's responsibility until closed or assigned to a job.

Reference implementation

The exact hub transition logic in Lean, TypeScript, Python, and Elixir. Every guard — atomic replacement, current-assignee checks, evidence validation, idempotent retries, and the job close-out gate — runs as pure state transitions inside the hub transaction.

-- Hub guards for Tracked Answer (enforced in code, never in prompts)

-- «open» escapes the keyword `open`; elsewhere it is written `.open`
inductive AnswerState where
  | «open» | applied | replaced | declined
  deriving Repr, BEq

abbrev EvidenceItem := List (String × String)  -- a string-to-string record

structure Job where
  id : Option String
  assigneeId : String
  deriving Repr

structure Answer where
  id : String
  questionId : String
  questionVersion : Nat
  jobId : Option String
  answeredById : String
  text : String
  answeredAt : String
  state : AnswerState := .open
  acknowledgedById : Option String := none
  acknowledgedAt : Option String := none
  closedAt : Option String := none
  closedById : Option String := none
  evidence : Option (List EvidenceItem) := none
  declineReason : Option String := none
  replacedById : Option String := none
  deriving Repr

inductive HubError where
  | notAllowed | evidenceRequired | declineReasonRequired | openAnswersRemain | unknownAnswer
  deriving Repr, BEq

structure TrackedAnswerHub where
  answers : List Answer := []
  deriving Repr

namespace TrackedAnswerHub

-- `at` is a Lean keyword, so the timestamp arguments are called `time`
abbrev Result := Except HubError (Answer × TrackedAnswerHub)

private def isAssignee (ans : Answer) (job : Job) (partyId : String) : Bool :=
  ans.jobId == job.id && job.assigneeId == partyId

private def mustGet (hub : TrackedAnswerHub) (id : String) : Except HubError Answer :=
  match hub.answers.find? (·.id == id) with
  | some ans => pure ans
  | none => throw .unknownAnswer

-- Writes the changed answer back over the stored one with the same id.
private def put (hub : TrackedAnswerHub) (ans : Answer) : Answer × TrackedAnswerHub :=
  (ans, { hub with answers := hub.answers.map fun a => if a.id == ans.id then ans else a })

-- Stores a new open answer and atomically replaces any prior open answer on the same question.
def record (hub : TrackedAnswerHub) (next : Answer) : Answer × TrackedAnswerHub :=
  let answers := hub.answers.map fun old =>
    if old.questionId == next.questionId && old.state == .open then
      { old with state := .replaced, replacedById := some next.id,
                 closedAt := some next.answeredAt, closedById := some next.answeredById }
    else old
  (next, { hub with answers := answers ++ [next] })

-- Open answers that the job's present assignee has not yet acknowledged.
def toDeliver (hub : TrackedAnswerHub) (job : Job) : List Answer :=
  hub.answers.filter fun a =>
    a.jobId == job.id && a.state == .open && a.acknowledgedById != some job.assigneeId

def acknowledge (hub : TrackedAnswerHub) (answerId : String) (job : Job)
    (partyId time : String) : Result := do
  let ans ← hub.mustGet answerId
  unless ans.state == .open && isAssignee ans job partyId do throw .notAllowed
  return hub.put { ans with acknowledgedById := some partyId, acknowledgedAt := some time }

def reportApplied (hub : TrackedAnswerHub) (answerId : String) (job : Job) (partyId : String)
    (evidence : List EvidenceItem) (time : String) : Result := do
  let ans ← hub.mustGet answerId
  if ans.state == .applied then return (ans, hub)  -- Idempotent retry
  unless ans.state == .open && isAssignee ans job partyId do throw .notAllowed
  if evidence.isEmpty then throw .evidenceRequired
  return hub.put { ans with state := .applied, evidence := some evidence,
                            closedAt := some time, closedById := some partyId }

def decline (hub : TrackedAnswerHub) (answerId : String) (job : Job)
    (leadId partyId reason time : String) : Result := do
  let ans ← hub.mustGet answerId
  if reason.trimAscii.isEmpty then throw .declineReasonRequired
  let allowed := ans.jobId == job.id && (partyId == job.assigneeId || partyId == leadId)
  unless ans.state == .open && allowed do throw .notAllowed
  return hub.put { ans with state := .declined, declineReason := some reason,
                            closedAt := some time, closedById := some partyId }

def closeJob (hub : TrackedAnswerHub) (jobId : String) : Except HubError Unit := do
  let hasOpen := hub.answers.any fun a => a.jobId == some jobId && a.state == .open
  if hasOpen then throw .openAnswersRemain

-- Checked by Lean: every answer offered for delivery is still open.
theorem toDeliver_only_open (hub : TrackedAnswerHub) (job : Job) :
    ∀ a ∈ hub.toDeliver job, a.state == .open := by
  intro a h
  simp only [toDeliver, List.mem_filter, Bool.and_eq_true] at h
  exact h.2.1.2

end TrackedAnswerHub

Handoff, blocked close, and decline trace

Walking Example 2 (duplicate webhook deduplication) through these guards shows Worker A being rejected after handoff, premature job closure failing with open_answers_remain, declining with a reason, and an idempotent apply retry before the job closes:

Execution trace: Example 2 (duplicate webhook deduplication)
1. hub.record(ans_event_id, question: q_dedupe_key, job: job_webhooks, by: requester)
   hub.toDeliver(job_webhooks)  # job_webhooks.assignee_id is now worker_b
   -> [ans_event_id] (routed to worker_b; worker_a is gone)

2. hub.acknowledge(ans_event_id, job_webhooks, party: worker_a)
   -> error: not_allowed (worker_a is no longer the job's assignee)

3. hub.acknowledge(ans_event_id, job_webhooks, party: worker_b)
   hub.closeJob(job_webhooks)
   -> error: open_answers_remain (acknowledgment alone never closes an answer)

4. hub.decline(ans_event_id, job_webhooks, lead: lead_1, party: worker_b,
     reason: "Events before March have no event_id")
   -> declined (reason surfaced to requester; job_webhooks remains open)

5. hub.record(ans_fallback_id, question: q_dedupe_key, job: job_webhooks, by: requester)
   hub.reportApplied(ans_fallback_id, job_webhooks, party: worker_b, evidence: [])
   -> error: evidence_required

6. hub.reportApplied(ans_fallback_id, job_webhooks, party: worker_b,
     evidence: [{ commit: "4f2a9c1" }, { verification: "replay_zero_duplicates" }])
   hub.reportApplied(ans_fallback_id, job_webhooks, party: worker_b, evidence: [...])
   -> ok (idempotent retry) (ans_fallback_id is applied)

7. hub.closeJob(job_webhooks)
   -> ok (zero open answers remain on job_webhooks)

Tradeoffs and practical guidance

Tracked Answer eliminates silent dropped replies at a modest bookkeeping cost. Keep three honest tradeoffs in mind before adopting it everywhere:

  • Explicit reporting discipline: a worker that changes the work but forgets to call report_applied leaves an open answer that blocks its job until it reports evidence.
  • Evidence is only as strong as what checks it: a careless worker can attach an unrelated artifact, and subjective answers ("keep the tone warm") have softer evidence than concrete schema or policy changes.
  • Stale answers hold up jobs until declined: if changing scope makes an earlier open answer obsolete, someone — the assignee or lead agent — must explicitly decline it by name before the job can close.

Practical implementation notes

  • Never close on message delivery: the single easiest bug is marking an answer done when a worker process acknowledges receipt. Delivery proves arrival; only evidence proves the work changed. For high-risk changes, require an independent checker to confirm the evidence before closing.
  • Include open answers in every handoff briefing: push new answers to the present assignee immediately and query to_deliver whenever assembling a replacement worker's startup briefing.
  • Keep acknowledgment and apply idempotent: agents retry tool calls after timeouts; repeating an acknowledgment or an already-applied report should return ok without duplicating side effects.
  • Handle changes after application separately: replacing an open answer happens atomically in one transaction. When a requester revises a decision after the earlier answer was already applied, hand the downstream ripple check to Change Propagation.
  • Summarize outcomes without noisy ack pings: tell the requester when an answer is declined or applied at check-in, and show if an open answer is simply waiting on a paused job — never page the human just because a worker read the message.

Known uses and related patterns

  • Temporal Workflow Updates: lets a caller send an update to a long-running workflow and wait until the handler executes and returns a result, rather than firing a one-way signal and assuming it worked.
  • Kubernetes observedGeneration: controllers publish the generation of desired configuration they have processed so callers can distinguish "the spec was accepted" from "the controller reconciled it."
  • GitHub protected-branch change requests: a blocking review remains open across commits until the reviewer approves the updated work or an authorized maintainer explicitly dismisses it with a recorded reason.
  • LangGraph interrupts: pauses a durable graph node until a human reply arrives and resumes execution with that reply, leaving the application responsible for recording downstream evidence.
  • Volgenic: tracks human replies to agent questions with durable delivery and separate disposition versus effect states so replies survive brief agent disconnects and remain visible until acted on.
  • Contrast with Hohpe & Woolf's Guaranteed Delivery and Idempotent Receiver: classic messaging patterns guarantee a message arrives safely and tolerates duplicates, but stop at receipt. Tracked Answer builds on both and keeps the record open until the receiving job proves an effect on the work.

Related patterns

  • Self-Contained Question — defines the Question record; its lifecycle hands off to Tracked Answer the moment a reply is submitted.
  • Durable Job — defines the Job record that gives an answer a stable target across worker crashes and reassignments.
  • Context Handoff — packages every unacknowledged open answer into a replacement worker's startup briefing.
  • Change Propagation — most easily confused with Tracked Answer: Tracked Answer follows one reply forward until the job applies it, whereas Change Propagation traces an upstream requirement change backward to find already-built work that went stale.
  • Derived Status Board & Question Inbox — surface open answers on the status board and route declined answers with their reasons back to the requester.
  • Evidence-Backed Completion — defines what counts as verifiable proof when closing claims and applied answers.
  • Orchestrator-Workers — defines the Party record naming who answered, acknowledged, and closed each answer.