Dashboardopencode-lorenormalizeCodexResponsesEvent state

normalizeCodexResponsesEvent state

Category: gotcha
Confidence: 1.00
ID: 01a0a0cc-f9b2-7390-9206-85fabea090bb
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0IxrNA1DXwHaouNJs
Created: 2026-09-14 16:43:02
Updated: 2026-09-14 16:43:02

Content

Trap: sharing one ResponsesAccState between normalizeCodexResponsesEvent() and a caller’s accumulator looks efficient because both process the same stream, but the Codex normalizer mutates state while binding omitted indices and seeding done-only items. Fix: give the normalizer an independent state, because sharing state double-applies lifecycle mutations and can corrupt identity reconciliation.

Move to: