#29982·coder

chatd: chat structured output deferred follow-ups

Author: ThomasK33Created Sep 26, 2026Updated Sep 26, 2026

Follow-ups deferred while building the chat structured output stack (native stack #29881). Each item was judged not reachable before the activation slices, or low impact after them, and was left out of its slice to keep the slices small. None of them executes a tool without hook admission; that bypass is fixed in the stack itself by the duplicate tool call ID slice (C1b), which is placed before activation.

Receipts and history

  • lastGenerationAssistant pagination skips model-only assistant rows behind a receipt, so a tool call in such a row gets no cancellation (#29966). No writer creates model-only assistant rows today.
  • The Go receipt check matches the type key case-insensitively while the SQL check uses type exactly (#29966).
  • has_unread and the telemetry assistant_message_count count receipts (#29967).
  • A soft-deleted receipt drops out of history, so a later interrupt can write a second receipt; one unreadable row disables receipts for that chat (#29969).
  • An edit discards an earlier receipt that still carries a suffix (#29973).
  • After a restart, a stop hook invalidation on the last budgeted step closes the request as not_produced, while the in-memory nudge path would run the owed step past max_steps; exempt state.Invalidated from the step gate for that one step (#29986).

Finalizer screening and dispatch

  • A provider-executed call with the reserved finalizer name skips argument screening and persists its raw arguments (#29975). Such a call can never produce a candidate.
  • With hooks disabled, a provider that repeats a tool call ID can make an ordinary call look answered by the finalizer's synthetic error result, so it is never dispatched (#29975), and the step's rejection control is appended to every row sharing that ID, overcounting rejections (#29979).
  • finalizerBatchControls commits a candidate for a lone, schema-valid finalizer call without checking whether its executed result is an error (#29979). The local runner only errors on arguments that already fail the schema.
  • post_tool_use hooks see the finalizer acknowledgment before a mixed or unstorable batch rewrites it to an error (#29979).
  • The interrupt path still reads history lazily for the finalizer gate and treats a failed read as a terminal error; the generation path preloads the gate (#29975).

Schemas, codecs and docs

  • {"maxLength":1e0} normalization (#29945), a second control part on one row decoding as corrupt and the realUserRow comment (#29953), and the executor treating 1e200 as a 201-digit literal.
  • Docs: "string formats reject numbers" and date-time leniency are unverified; the corrupt-metadata warning log has no test.
  • A receipt's text fallback and value come back with PostgreSQL jsonb formatting, for example {"word": "PONG"} for a compact model answer (seen in the lifecycle-gaps UAT). The JSON is canonically equal, but docs and comments that promise the exact bytes or digits should say where normalization applies.

API behavior

  • PATCH /api/v2/chats/{chat} applies fields one at a time, so a later 400 (invalid labels, negative pin order, empty title) can follow an earlier saved field. With the send slice the plan mode update runs first, so it can be the saved field; validate every field before any write (#29998).
  • A duplicated outer response_format member or a differently cased body key follows encoding/json (last member wins, keys match case-insensitively); decide whether the request body needs its own strict key check (#29996).

Process

  • Pixel / Review stays pending on the stack PRs until a human reviews the snapshots.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh