[Bug]: Native model selection loses continuity cause and resends history as registry_miss
Summary
In OmO native beta.62, model selections invalidate the Claude native binding before the next request. Returning to Claude then resends the entire conversation, but the user-visible warning reports only registry_miss rather than the recorded model_selected cause.
This makes the resend look like a failed session resume or a recurrence of assistant_rewritten. Please distinguish intentional model incompatibility from a missing registry entry, and investigate whether merely cycling model selections must discard the prior resumable binding.
Environment
- omo-ai: 5.0.0-0.beta.62
- Bundled Senpi and senpi-codemode: 2026.9.13
- macOS arm64, Node 24.15.0
- Native Claude provider: claude-sdk-oauth
Observed sequence (2026-09-15, UTC)
After restarting OmO and resuming an existing conversation:
07:58:13-07:58:15: model selections crossed Claude and openai-codex models. The session ledger explicitly appended binding invalidations with data {schemaVersion:1, invalidated:true, reason:"model_selected"}.
07:58:22: selected claude-sonnet-5.
07:59:02.926: the next Claude response recorded this diagnostic:
{"type":"claude_sdk_oauth_session_continuity","details":{"kind":"flatten","reason":"registry_miss","deltaMessages":226,"payloadBytes":881361,"collapsedDirectives":0}}
The UI displayed: "Session continuity lost - resent the full conversation (registry_miss) - sent 860.7KB". 4. Subsequent requests returned to delta / prefix_matched. This was not a full resend on every subsequent turn.
Expected
- Preserve the actual invalidation reason through the next admission so a model-selection-driven full resend is attributed correctly.
- If selection changes are only UI navigation before any request, retain recoverable native state where safe; if the eventual model is incompatible and a full resend is required, explain that explicitly.
- Never reuse an incompatible transcript merely to suppress the warning.
Actual / impact
The earlier model_selected invalidation becomes registry_miss in the warning. A large conversation is resent and the user cannot distinguish intentional model switching from broken persistence or a failed fix.
Relevant installed code
Senpi dist/core/extensions/builtin/claude-sdk-oauth/:
- session-binding.js: newest binding marker / stored-branch validation.
- session-continuity.js: absent resident entry and absent binding select bootstrap; some fallback paths report registry_miss.
- session-observability.js: pending close causes and flatten attribution.
Important scope / local modification
A separate eval.prepareArguments mutation was reproduced and locally patched immediately before this observation. That patch only makes execution arguments a shallow copy and clamps the displayed summary separately (eval-tool.ts and render.ts); it does not change native bindings, continuity policy, or hashing. Its offline suite passed 36/36, including genuine rewrite negatives.
This report concerns the subsequent registry_miss event, not that assistant_rewritten defect. The exact 881361-byte event and model_selected ledger entries were matched in the resumed transcript. Restart alone is not established as the cause; whether these selection transitions were manually cycled or partly startup-driven was not independently established. No private conversation, credentials, account identifiers, or session IDs are included.
Source: code-yeongyu/oh-my-openagent