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.
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:
-
Bind the answer to the job, never to the asking agent. Each
Answerrecord points to theQuestionit answers and theJobresponsible for acting on it, so any replacement assignee automatically receives every open answer when it takes over. -
Treat acknowledgment as receipt, not completion. An answer starts
openand stays open after an assignee reads it. It closes only asapplied(with evidence),replaced(by a newer answer to the same question), ordeclined(with a written reason). - 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.
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).
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.
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.
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.
Begins after step 6 of the normal flow: the answer is open and Worker B has acknowledged it, but has not yet applied it.
The hub rejects premature job closure with
open_answers_remain. When Worker B discovers the
answer cannot be applied as written, declining it with a reason brings the issue back
to the requester; a revised answer closes cleanly, and a duplicate apply retry is a
safe no-op.
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
Answerpointing 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 asevidence. Only then does the hub mark the answerappliedand 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: "Useevent_id, and fall back todelivery_idfor 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.
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
-
01Bound to an existing question version and optional job Database constraint
Foreign keys on
question_id,job_id, andanswered_by_idensure every answer belongs to a real question, starts tied to the job that question holds up, and freezesquestion_versionso later wording edits cannot rewrite what was answered. -
02At 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 asreplacedwithreplaced_by_idin the same transaction. -
03Closing columns match state exactly Database constraint
A row-level
CHECKconstraint guarantees anopenanswer has null closing fields, while every closed answer has non-nullclosed_atandclosed_by_idplus exactly one ofevidence(applied),decline_reason(declined), orreplaced_by_id(replaced). -
04Closed answers never reopen Hub guard
Once an answer leaves
open, transitions back to open are rejected withnot_allowed. If the requester changes direction after an answer was applied, they record a new answer rather than mutating history. -
05Only the current assignee may acknowledge or apply; assignee or lead may decline Hub guard
acknowledgeandreport_appliedverifyanswer.job_id == job.idandparty_id == job.assignee_id(otherwise returningnot_allowed).declineadditionally permits the request'slead_id, and rejects empty reasons withdecline_reason_required. -
06Reassignment invalidates the previous worker's acknowledgment Hub guard
to_deliverselects every open answer on the job whereacknowledged_by_id != job.assignee_id, so a newly assigned worker automatically receives every open answer even if an earlier worker acknowledged it before crashing. -
07Applying requires evidence, and retries are idempotent Hub guard
report_appliedrejects empty proof lists withevidence_required. Callingreport_appliedagain on an answer that is alreadyappliedreturns the unchanged record without error so network retries are safe. -
08A job cannot close while any of its answers remain open Hub guard
close_jobrejects closure withopen_answers_remainif any answer withjob_id == job.idis stillopen. Answers with a nulljob_idblock 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
// Hub guards for Tracked Answer (enforced in code, never in prompts)
type AnswerState = "open" | "applied" | "replaced" | "declined";
type EvidenceItem = Record<string, string>;
interface Job {
id: string | null;
assigneeId: string;
}
interface Answer {
id: string;
questionId: string;
questionVersion: number;
jobId: string | null;
answeredById: string;
text: string;
answeredAt: string;
state: AnswerState;
acknowledgedById: string | null;
acknowledgedAt: string | null;
closedAt: string | null;
closedById: string | null;
evidence: EvidenceItem[] | null;
declineReason: string | null;
replacedById: string | null;
}
class TrackedAnswerHub {
private answers: Answer[] = [];
// Stores a new open answer and atomically replaces any prior open answer on the same question.
record(next: Answer): Answer {
for (const old of this.answers) {
if (old.questionId === next.questionId && old.state === "open") {
old.state = "replaced";
old.replacedById = next.id;
old.closedAt = next.answeredAt;
old.closedById = next.answeredById;
}
}
this.answers.push(next);
return next;
}
// Open answers that the job's present assignee has not yet acknowledged.
toDeliver(job: Job): Answer[] {
return this.answers.filter(
(a) => a.jobId === job.id && a.state === "open" && a.acknowledgedById !== job.assigneeId
);
}
acknowledge(answerId: string, job: Job, partyId: string, at: string): Answer {
const ans = this.mustGet(answerId);
if (ans.state !== "open" || !this.isAssignee(ans, job, partyId)) {
throw new Error("not_allowed");
}
ans.acknowledgedById = partyId;
ans.acknowledgedAt = at;
return ans;
}
reportApplied(
answerId: string,
job: Job,
partyId: string,
evidence: EvidenceItem[],
at: string
): Answer {
const ans = this.mustGet(answerId);
if (ans.state === "applied") return ans; // Idempotent retry
if (ans.state !== "open" || !this.isAssignee(ans, job, partyId)) {
throw new Error("not_allowed");
}
if (evidence.length === 0) throw new Error("evidence_required");
ans.state = "applied";
ans.evidence = evidence;
ans.closedAt = at;
ans.closedById = partyId;
return ans;
}
decline(
answerId: string,
job: Job,
leadId: string,
partyId: string,
reason: string,
at: string
): Answer {
const ans = this.mustGet(answerId);
if (!reason.trim()) throw new Error("decline_reason_required");
const allowed = ans.jobId === job.id && (partyId === job.assigneeId || partyId === leadId);
if (ans.state !== "open" || !allowed) throw new Error("not_allowed");
ans.state = "declined";
ans.declineReason = reason;
ans.closedAt = at;
ans.closedById = partyId;
return ans;
}
closeJob(jobId: string): void {
const hasOpen = this.answers.some((a) => a.jobId === jobId && a.state === "open");
if (hasOpen) throw new Error("open_answers_remain");
}
private isAssignee(ans: Answer, job: Job, partyId: string): boolean {
return ans.jobId === job.id && job.assigneeId === partyId;
}
private mustGet(id: string): Answer {
const ans = this.answers.find((a) => a.id === id);
if (!ans) throw new Error("unknown_answer");
return ans;
}
}
# Hub guards for Tracked Answer (enforced in code, never in prompts)
from dataclasses import dataclass
from typing import Literal, Optional
@dataclass
class Job:
id: Optional[str]
assignee_id: str
@dataclass
class Answer:
id: str
question_id: str
question_version: int
job_id: Optional[str]
answered_by_id: str
text: str
answered_at: str
state: Literal["open", "applied", "replaced", "declined"] = "open"
acknowledged_by_id: Optional[str] = None
acknowledged_at: Optional[str] = None
closed_at: Optional[str] = None
closed_by_id: Optional[str] = None
evidence: Optional[list[dict[str, str]]] = None
decline_reason: Optional[str] = None
replaced_by_id: Optional[str] = None
class HubError(Exception):
pass
class TrackedAnswerHub:
def __init__(self) -> None:
self.answers: list[Answer] = []
def record(self, new_answer: Answer) -> Answer:
for old in self.answers:
if old.question_id == new_answer.question_id and old.state == "open":
old.state = "replaced"
old.replaced_by_id = new_answer.id
old.closed_at = new_answer.answered_at
old.closed_by_id = new_answer.answered_by_id
self.answers.append(new_answer)
return new_answer
def to_deliver(self, job: Job) -> list[Answer]:
return [
a for a in self.answers
if a.job_id == job.id and a.state == "open" and a.acknowledged_by_id != job.assignee_id
]
def acknowledge(self, answer_id: str, job: Job, party_id: str, at: str) -> Answer:
ans = self._get(answer_id)
if ans.state != "open" or not self._is_assignee(ans, job, party_id):
raise HubError("not_allowed")
ans.acknowledged_by_id = party_id
ans.acknowledged_at = at
return ans
def report_applied(
self, answer_id: str, job: Job, party_id: str, evidence: list[dict[str, str]], at: str
) -> Answer:
ans = self._get(answer_id)
if ans.state == "applied":
return ans # Idempotent retry
if ans.state != "open" or not self._is_assignee(ans, job, party_id):
raise HubError("not_allowed")
if not evidence:
raise HubError("evidence_required")
ans.state = "applied"
ans.evidence = evidence
ans.closed_at = at
ans.closed_by_id = party_id
return ans
def decline(
self, answer_id: str, job: Job, lead_id: str, party_id: str, reason: str, at: str
) -> Answer:
ans = self._get(answer_id)
if not reason.strip():
raise HubError("decline_reason_required")
allowed = ans.job_id == job.id and party_id in (job.assignee_id, lead_id)
if ans.state != "open" or not allowed:
raise HubError("not_allowed")
ans.state = "declined"
ans.decline_reason = reason
ans.closed_at = at
ans.closed_by_id = party_id
return ans
def close_job(self, job_id: str) -> None:
if any(a.job_id == job_id and a.state == "open" for a in self.answers):
raise HubError("open_answers_remain")
def _is_assignee(self, ans: Answer, job: Job, party_id: str) -> bool:
return ans.job_id == job.id and job.assignee_id == party_id
def _get(self, answer_id: str) -> Answer:
for a in self.answers:
if a.id == answer_id:
return a
raise HubError("unknown_answer")
# Hub guards for Tracked Answer (pure functional core)
defmodule Answer do
@enforce_keys [:id, :question_id, :question_version, :answered_by_id, :text, :answered_at]
defstruct [
:id, :question_id, :question_version, :job_id, :answered_by_id, :text, :answered_at,
:acknowledged_by_id, :acknowledged_at, :closed_at, :closed_by_id,
:evidence, :decline_reason, :replaced_by_id,
state: :open
]
end
defmodule Answers do
# Stores a new open answer and marks any earlier open answer to the same question replaced.
def record(answers, %Answer{} = new) do
replaced =
Enum.map(answers, fn
%Answer{state: :open, question_id: qid} = old when qid == new.question_id ->
%{old | state: :replaced, replaced_by_id: new.id,
closed_at: new.answered_at, closed_by_id: new.answered_by_id}
other ->
other
end)
[new | replaced]
end
# Returns open answers that the job's present assignee has not yet acknowledged.
def to_deliver(answers, job) do
Enum.filter(answers, fn a ->
a.job_id == job.id and a.state == :open and a.acknowledged_by_id != job.assignee_id
end)
end
def acknowledge(%Answer{state: :open} = answer, job, party_id, at) do
if assignee?(answer, job, party_id),
do: {:ok, %{answer | acknowledged_by_id: party_id, acknowledged_at: at}},
else: {:error, :not_allowed}
end
def acknowledge(_answer, _job, _party_id, _at), do: {:error, :not_allowed}
# Idempotent: repeating an already-applied report returns the unchanged record.
def report_applied(%Answer{state: :applied} = answer, _job, _party_id, _evidence, _at),
do: {:ok, answer}
def report_applied(%Answer{state: :open} = answer, job, party_id, evidence, at) do
cond do
not assignee?(answer, job, party_id) -> {:error, :not_allowed}
not is_list(evidence) or evidence == [] -> {:error, :evidence_required}
true -> {:ok, %{answer | state: :applied, evidence: evidence, closed_at: at, closed_by_id: party_id}}
end
end
def report_applied(_answer, _job, _party_id, _evidence, _at), do: {:error, :not_allowed}
def decline(%Answer{state: :open} = answer, job, lead_id, party_id, reason, at) do
cond do
not is_binary(reason) or String.trim(reason) == "" -> {:error, :decline_reason_required}
answer.job_id == job.id and party_id in [job.assignee_id, lead_id] ->
{:ok, %{answer | state: :declined, decline_reason: reason, closed_at: at, closed_by_id: party_id}}
true ->
{:error, :not_allowed}
end
end
def decline(_answer, _job, _lead_id, _party_id, _reason, _at), do: {:error, :not_allowed}
def close_job(answers, job_id) do
if Enum.any?(answers, &(&1.job_id == job_id and &1.state == :open)),
do: {:error, :open_answers_remain},
else: :ok
end
defp assignee?(answer, job, party_id),
do: answer.job_id == job.id and job.assignee_id == party_id
end
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:
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_appliedleaves 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_deliverwhenever 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
okwithout 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
Questionrecord; its lifecycle hands off to Tracked Answer the moment a reply is submitted. - Durable Job — defines the
Jobrecord 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
Partyrecord naming who answered, acknowledged, and closed each answer.