Repository navigation
FIX-1872: a coordinator's post is a task row on the conversation's board - #3232
Conversation
… board A coordinator's post now goes out as one post row per delegate, filed with dispatchTask (post: true), worked behind the claim gate by the delegate's task entry, and settled once. The delivery ledger and the handOff tool are gone; rounds close on the endings the conversation acted on. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
…dger Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
The EM, the ask lab, the pentest probe and the goal-local labs declare their post entry under `task`. The chief of staff and project coordinator hand posts on with `dispatchTask` and `post: true`. Goal checks that read the delivery ledger read the conversation's post rows instead (goals/lib/post-rows.mts), and the routed-post goal's no-landing and no-context controls run behind the entry's claim gate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
goals/coordinators/one-fence-answers-each-post-once: legs b (rows, no ledger, replayed endings, a double hand-off, a settle after cancel) and d (a failed and a late delegate), on the real engine over SQLite with scripted delegates. PASS here; GOAL_CONTROL=no-ending-dedupe fails b:one-line (3 of 3); main before this change fails b:rows and b:no-ledger. The coordinator's source docs and listDelegates' description now say a post is a row handed on by dispatchTask with post: true. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
FIX-1816 D3's two answer-once checks become one; FIX-1791 BR-20 to BR-22 and BR-27 are superseded in part. The epic plan's FIX-1872 row and path figure say no post is a tell and the work came in two PRs. Changesets for workforce (handOff refused, the post entry under task, the in-flight loss) and orchestration (sealed, the post form). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
coordinators.md gains "How a post is tracked"; the judgment row, the delegate refusal, the round deadline, "What it won't do" and "Making your own flow a delegate" say dispatchTask with post: true and the task entry. chief-of-staff.md and the Workforce README follow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
…lat limits Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
jhoffner
left a comment
There was a problem hiding this comment.
Second look + architecture pass (read-only; for the implementing agent to triage)
I read the core of the diff (delegated-post.ts, coordinator-rounds.ts, task-settled.ts, task-tools-capability.ts). I did not run the suites or re-read the goal/doc churn. The direction (posts as claim-gated rows, ledger deleted) is the right, leaner shape and I'm not re-opening it. The findings below are about the implementation, not the spec.
Worth acting on in this PR
-
Ledger vocabulary survives the ledger (BP-034).
delivery-ledger.tsis gone, butDeliveryDelegate,deliveryDelegateSchema,DELIVERY_STATE,markDelivery,notedDeliveryandRoundPost(named "delivery" inlandAnswer/routeOnAfterAnswerparams) remain across ~7 files, anddeliveryDelegateSchemanow lives indelegates/delegate-list.ts. This PR already touches every one of those lines. Rename to post/delegate terms now (e.g.PostDelegate,POST_STATE,markPost), otherwise the next reader hunts for a ledger that no longer exists. -
A swallowed cancel report leaves a post row dependent on lease recovery that may not apply.
reportCancelled(delegated-post.ts~L470-480) catches a failed seam send with "The row's lease lapses, and its recovery ends it." But the same file's header says a post has no second attempt. Please confirm (with a test, not a comment) that recovery actually terminates a post row whose lease lapses, instead of re-queuing it for a second run. If it re-queues, a cancelled post whose cancel message was lost would run again in the delegate's session after the round closed. Same question forwakeAtDeadline, though its failure mode is benign (next wake closes the round). -
Misleading error on a malformed sealed payload.
postRowOfreturnsundefinedonsafeParsefailure, andmarkDeliverythen throws "isn't a delegated post". A row withkind: "post"and a bad shape reads as "not a post". Distinguish the two (kind absent vs. kind present but invalid).task-settled.tsadditionally passesrow.sealedaspostwith onlyz.record(z.unknown())validation; the consumer must re-parse, and I couldn't see where it does. Parse once viapostRowOfat the boundary and hand the typedPostRow. -
Accepted "delivered but errors at hand-over" record difference (Engineering calls). This means the routing record claims delivery for a delegate whose row then errors. That is a record that lies in the exact case rows were meant to make honest. If the record is derived from the row at read time rather than written at pick time, this goes away for free. Worth a look before accepting it as permanent.
Refactor opportunities (take only if cheap here)
-
buildTaskToolsvariant count is now 2x2 and growing.taskToolsForTurnbuildsplain,postingPlain,waiting,postingWaitingby hand, with nested ternaries. The next per-turn flag doubles it again. Replace with one memoised builder keyed on{wait, posting}and a single selector. This is the one place where this PR makes a pre-existing pattern worse, so it earns the refactor. -
dispatchTaskvalidation is hand-rolled..passthrough()plusPOST_FIELDS/extrafiltering plus per-fieldtypeofchecks reimplement what a zod discriminated union onpostwould give (post: truebranch with.strict(), task branch withpostabsent). The comment says passthrough is there so unoffered fields are refused by name (BR-18); a union with a custom error map can do the same and removes the manual type checks. -
Two settled entries, one discriminant, checked twice.
sendOwedNoticespicksonTaskSettledvsonPostSettledfromrow.sealed.kind, andtaskSettledEntryalso branches onrow.sealed?.kind === "post"and takesonPost.session-board.tsL161-162 wiresonPostinto both. If the intent is that a post row ending on the generic entry is still handled (replayed old notice), say so in one comment. If not, droponPostfromtaskSettledEntryand letpostSettledEntryown the post path, so each entry has one job. As written,postSettledEntry = {...taskSettledEntry(...), concurrency: "queue"}is a flag-flipped copy. -
Two silent
try { dispatchThroughSeam } catch {}blocks with near-identical shape (wakeAtDeadline,reportCancelled). Extract atellCoordinator(ctx, action, payload)helper;tellCoordinatoralready exists with a different meaning (the notice sender), so name it to avoid the collision (sendToCoordinator).
Process notes
- Control weakening is disclosed and reasoned, good. The
no-landingcontrol now fails its row instead of leaving it open. The argument (an open row blocks later posts to that session) is sound, but it means the control no longer models "delegate never answers". Make sure a separate leg covers the never-ends case, since that is the deadline path. - Size. 74 files / +2557 −1279, with
coordinator-flow.tscarrying ~740 changed lines. Nothing to split now, but if this lands,coordinator-flow.tsis the next candidate for a split alongpostEnded/postCancelled/ routing. - Model-backed reruns (V9) are still "running now" in the description. Don't merge on the scripted results alone.
Generated by Claude Code
…ngesets Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: deffc568-d870-43df-8f44-a484dbfdb87d) |
…ne attempt; review fixes - The thread hides a task's items only when a task plan for its board is in the same list, so a post row's reply shows in the delegate's session. - A post row the board takes back after its lease lapses ends errored instead of running the post again. - Ledger names give way to post/delegate names; a post row is told apart from a post whose payload doesn't read, and parsed once where its ending is handed on. - The per-turn task tool lists are built once per kind of turn; the two best-effort coordinator sends share one helper. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 7940b408-f798-4120-8375-05d5bb8131e3) |
|
Triage of the second-look review, as of 1af3948. Fixed
Also in this push: the Kitchen-sink E2E failure was real. A delegate's reply on a post row carries the row's Not taken here
Never-ends leg: the deadline path is still covered where the delegate never answers. See V9: the model-backed reruns are in the description now: all PASS, and each control is red only where expected. Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 2cb8f8ce-59dc-44c5-9add-7aa6827c0dbc) |
|
Architect: not approving yet. The PR body asks for an owner call that nobody has made yet: accept that a posts-only conversation can't cancel a post from its board ( What would unblock it: @jhoffner answers the posts-only cancel question on this PR (accept it, with a follow-up filed or not, or fix it here), and line 68 says worker instead of seat. |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
|
Line 68 of Generated by Claude Code |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 667b46b3-278d-49ca-90d3-be6e42674932) |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6501759d41
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nowledging it - A round closes when no row in it is still running and every reply among them is in the round's answers, read off the board; the per-round list of acted-on rows is gone (BR-13). The rows are read after the round's routing counts, so a close skips a round a routing filed rows in since the read. - onPostSettled acknowledges a post row's notice only after the coordinator's handling ran, so a failed landing stays owed for the board's next touch; an answer its round already keeps isn't kept or said twice. - The post entry runs "allow", as the internal entry did, so a later post to a delegate's session runs beside a hung turn. - A post row cancelled from the board owes no notice, so the board sends its ending itself, and its round closes then rather than at its deadline. - The one-fence goal's no-ending-dedupe control also strips the new acknowledged check; it still fails only b:one-line. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 6cca82cf-a740-454f-999c-9e1a1738e5a2) |
|
Architect: not approving yet. The owner call from my earlier comment is still open (accept that a posts-only conversation can't cancel a post from its board, since |
…-3uxjhz # Conflicts: # apps/docs/docs/workforce/coordinators.md # packages/workforce/test/worker-flows-strict.test-d.ts
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: b8dcf179-2649-45fa-8638-ba9f3f3d7086) |
|
Both blockers from the Architect's note are cleared. Jake decided the owner call in the project thread: accept that a posts-only conversation can't cancel a post from its board. The PR body now records this, and the docs already state the limit. I merged main in 2c29c6d; its two conflicts were both in the research-flow example, which keeps main's version with the post entry under Generated by Claude Code |
Appends FIX-1995's 98 fence lines for #3232 and accepts a null side: a line added or removed with no partner, matched as a whole line. Two outcome lines in hands-each-post-to-its-delegates move their evidence from the removed ledger to post rows, listed as outcome-evidence and printed apart. Controls prove an unlisted pure addition or removal still fails and a one-sided entry admits nothing in a regression check. D4 recorded; CR-14 amended. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8
Requested by Jake · project thread
The problem
Before: two separate mechanisms decided whether a delegate's answer to a coordinator's post counted. Posts kept their own delivery ledger and token in the coordinator's session. Tasks used the board's claim ticket. The two disagreed at the edges: a replayed answer, a cancel mid-turn, a late answer. Coordinators also handed posts on with a separate
handOfftool besidedispatchTask.After: each post is one task row per delegate on the conversation's board. The board's claim is the only thing that decides an answer counts. A person sees the same thing as before: the same delegate session, the same line under the delegate's name, the same rounds and routing records. What changed is that an answer lands once however often its ending is replayed, and a cancelled post's late answer lands nothing.
What this does
sealedpayload that no task tool can touch.taskentry (delegatedPostEntry, moved frominternal) behind the board's claim gate. It runs in the delegate's existing session for that conversation.onPostSettled. That entry is queued, so an answer lands while the coordinator is still replying. The ledger, its two entries and the token are gone.dispatchTaskandpost: true, namingassignee(and a workstream'starget). A worker file that nameshandOffis refused at load. The chief of staff's and project coordinator'sWORKER.mdfiles say so.postCancelled), which ends the row under the claim it sent.What's asked of you
Nothing beyond review and merge. Decided (Jake, 2026-10-13): accept that a conversation whose delegates take only posts can't cancel a post from its board (
cancelTask_tasksanswersno_delegation_boardthere). The docs state the limit (coordinators page, "How a post is tracked"); someone who wants to stop a slow delegate there waits for the round's deadline.Everything else implements the approved spec.
Parts worth reviewing closely
packages/workforce/src/coordinator/coordinator-rounds.ts→closeRound, andcoordinator-flow.ts→roundRowsOf/postEnded. A round closes when no row in it is still running and every reply among them is already in the round's answers, read off the board (BR-13). Closing on row status alone dropped a second answer in a judgment round whose ending hadn't landed yet. The read is taken after the round's routing counts, so a close skips a round a routing filed rows in since the read.task-settled.ts→onPostSettledacknowledges a post row's notice only after the coordinator's handling ran, so a failed landing stays owed for the board's next touch. An answer its round already keeps isn't kept or said twice.delegated-post.ts→delegatedPostOnFinishedandreportCancelled. An aborted request's context throws on write, so the row is ended by the coordinator under the claim the delegate sends. A forged claim is refused (the BR-21/22 test).goals/workforce-mailboxes/a-routed-post-gets-one-answer/run.mtsandapps/kitchen-sink/lib/landing-control.ts. Theno-landingquiet agent now answers in its own session and then fails its row. Keeping the row open forever instead blocked every later post to that delegate's session, which reddenedheldtoo. With the failed row, the control reddens exactly its old legs (one, lands, followup, context, fallback, everyone).packages/ui/registry/components/request-group.tsxandtask-plan-state.ts(both copies synced): a post row's reply carries the row'staskId, and the thread used to hide every task-attributed item. Now it hides an item only when a task plan for its board is in the same list, so the reply shows in the delegate's session.markPostrefuses a claim onattempt > 1. The board takes back a row whose lease lapsed whatever itsmaxAttempts, so without this a post whose run stopped silently would run again.packages/shift-manager/teams/devteam/workforce/flows/workers/em.mts: its header now says its onetask:entry is a delegated post that runs the EM's own turn.Fence lines in the regression checks (anti-game: names, the two sanctioned shape entries, and "ledger reads → row reads"; no assertion or outcome line changed):
goals/lib/post-rows.mts(each post row mapped to the shape the ledger entry had):hands-each-post-to-its-delegates/devteam.mtsrecordOfandleg-e.mtsread().ledger;projects/a-shared-project-has-one-owner-per-workstream/legs.mtsledgerOf;workforce-privacy/two-users-share-a-project-and-nothing-else/store.mtsconversationRecord. Comments andgoal.mdwording follow.internal→taskfor the post entry: leg e's helper flow, the routed-post goal's two control flows, the pentest probe, the files-and-splits lab poster.handOff({worker,target?})→dispatchTask({post:true, assignee, target?}): leg e's scripted judgment turn.files-tasks-down-the-owners-chainis unchanged.Spec:
specs/issues/FIX-1872/· Linear FIX-1872 · epic FIX-1870 · part 2 of 2 (P1 merged) · ready for review, merges on your call.How to review this
Engineering calls
onPostSettled(concurrency: "queue"), task endings toonTaskSettled(deferred behind the reply). Both use the same dedupe.sendOwedNoticespicks the entry fromrow.sealed.kind.OpenRound.beguncounts the routings that started filing in a round (default 0, so saved rounds still read, BP-030), so a close can tell its read of the rows went stale.concurrency: "allow", as the internal entry was, so a later post to the same delegate session doesn't wait behind a hung turn.deliveries) is ignored on read and dropped at the conversation's next deadline write (dropRetiredLedger), BR-13.post:<postId>:<round>:<worker>[:<target>]), because a workstream target holds/.isTaskTurnis false on a post's turn, so the guard I first added was redundant and is gone.delivered, and its row then errors at hand-over.Everything else
Verification
pnpm typecheckand lint (workforce, orchestration, shift-manager) exit 0. Docs build exits 0 with no broken links.packages/workforce/test/coordinator-post-rows.test.ts(V1, V3/BR-5, BR-13, BR-18, BR-21, the one attempt after a lease lapse, a landing that fails then lands once, and a later post beside a hung turn; each of the last four, BR-21 and BR-13 shown red without its fix);coordinator-rounds.test.tsadds a reply that ended before it landed, a stale read, an answer heard again, and a board cancel closing its round at once (red without its fix);packages/ui/test/task-plan-state.test.ts(a task's items stay in the thread with no task plan for its board; red without the fix),packages/orchestration/test/skills/dispatch-task-post-form.test.ts,packages/orchestration/test/collection/sealed-payload.test.ts. The coordinator rounds, routing, follow-up and delegate tests were moved onto rows.goals/coordinators/one-fence-answers-each-post-once/(VG): PASS.GOAL_CONTROL=no-ending-dedupeFAILS onlyb:one-line, in 3 of 3 runs (6 to 9 lines per delegate); the control now also strips the post entry's acknowledged check, and still fails only there.GOAL_COMMIT=7ff0d4c0d(main before this PR) FAILSb:rowsandb:no-ledger. Verdicts are logged in itsgoal.md.a-routed-post-gets-one-answerPASS; itsno-landingcontrol fails exactly its listed legs; itsno-contextcontrol fails at context only.hands-each-post-to-its-delegatesleg e PASS.files-and-splits-down-the-chainlegs a to d PASS.165c74d70:hands-each-post-to-its-delegateslegs a to h PASS;files-tasks-down-the-owners-chainPASS;files-and-splits-down-the-chainleg e PASS;a-shared-project-has-one-owner-per-workstreamPASS;two-users-share-a-project-and-nothing-elsePASS; the pentest lab (both checks) PASS. The kitchen-sinkno-landingcontrol, run keyless as it requires, fails at exactlya:lineandb:line(its expected legs); c1, c2 and seg stay green.Release notes:
.changeset/posts-are-rows.md(workforce, minor:handOffrefused, the post entry undertask,delegatedAnswerSchemaremoved, the one-time in-flight loss) and.changeset/sealed-task-payload.md(orchestration, minor:sealed, the post form).Specs: amendment notes on FIX-1816 D3 and its evolution log (two answer-once checks become one), and on FIX-1791 BR-20 to BR-22 and BR-27 (superseded in part). The epic plan's FIX-1872 row and path figure now say no post is a tell and the work came in two PRs.
Docs:
coordinators.mdgains "How a post is tracked".chief-of-staff.mdand the Workforce README follow. Written by the docs-writer and reviewed by the docs-editor, with its fixes applied. Open #3092 touchescoordinators.mdonly to add two links (answerTask,waitForResponse); this PR leaves those lines alone.🤖 Generated with Claude Code
https://claude.ai/code/session_01X74reh7rJTWyXWHvTVz7y8