You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
context-epoch.ts: Schema.decodeUnknownEffect with Effect.orDie crashes session on schema mismatch #30871
Schema.decodeUnknownEffect returns Effect<A, ParseError>. Effect.orDie converts any ParseError into a defect. If the stored snapshot in SQLite has an incompatible schema (after version upgrade, data migration, or data corruption), every existing session fails to load with an unhandled defect — all sessions are bricked.
Fix: Use Effect.mapError to convert ParseError into a recoverable error:
Effect.mapError((e)=>newError(`Failed to decode context snapshot: ${e.message}`))
This issue might be a duplicate of or related to existing issues. Please check:
bug(session): legacy message/part rows missing required schema fields cause 400 BadRequest on session load #29908: Similar issue where schema mismatches between stored data and current Effect schemas cause sessions to fail to load after upgrades. That report covers missing required fields on message/part rows; this issue covers a related failure mode in context-epoch.ts where Effect.orDie converts a ParseError into a defect during snapshot decoding.
If you believe these are distinct issues, please let a maintainer know.
Activity
github-actions commentedon Jun 5, 2026
This issue might be a duplicate of or related to existing issues. Please check:
context-epoch.tswhereEffect.orDieconverts aParseErrorinto a defect during snapshot decoding.If you believe these are distinct issues, please let a maintainer know.