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
stale synthetic continuation rows can overwrite the session model #33044
When an interrupted or failed turn leaves behind an internal/synthetic continuation user row, later session resume paths can treat that synthetic row's model as the durable session model. In practice this can make a normal user follow-up continue with a fallback/retry model even though the user did not choose that model and the fallback should have been scoped to the failed retry path.
Related edge cases:
provider streams that finish without content can leave ambiguous state instead of a retryable failure
retry-advisory errors such as Retry Error: An error occurred while processing your request. You can retry your request... may not be classified as retryable if the SDK marks them non-retryable or omits status metadata
Web session model sync can restore a stale/synthetic-only model into local state
a stale stored output model can be reused when the UI sends no explicit model on the next turn
Expected
Internal/synthetic continuation rows should not become the durable user-selected model for a normal follow-up turn. If a turn fails before content is produced, recovery should preserve the previous real user-selected model and retry only on verified retryable failures.
Actual
A synthetic/internal continuation row can become the most recent model source, causing later normal user input to reuse a fallback/retry model without a fresh reason.
Notes
I have a small patch that:
hides synthetic-only internal continuation users from Web timeline model sync
adds authoritative session-model sync for the active session page
treats empty provider streams and retry-advisory messages as retryable failures
closes blank/interrupted assistant rows without emitting a new error event that can re-trigger fallback
recovers stale explicit continuation models back to the previous real user model
Model provenance needs to be per turn. Separate user_selected, default_resolved, retry_fallback, and synthetic_internal model sources, and only user/default sources should update the durable session model.
If a provider stream finishes with no content, write a terminal retry/error state rather than a synthetic continuation row that looks like user intent. Regression: failed retry on fallback model, then normal user follow-up, must continue with the previous real selected model.
Status update from the original patch investigation: PR #33045 was intentionally closed after validation showed that repairing fallback-created session model state was the wrong layer.
The narrower intended direction is to keep provider rate-limit / retry-advisory failures on the original-model retry path and avoid model-replacement fallback for those failures, rather than allowing a fallback model to become durable and repairing session state afterward. The remaining issue is therefore still valid, but #33045 should not be treated as an active fix.
Activity
github-actions commentedon Jun 20, 2026
This issue might be a duplicate of existing issues. Please check:
Necmttn commentedon Jun 21, 2026
Model provenance needs to be per turn. Separate
user_selected,default_resolved,retry_fallback, andsynthetic_internalmodel sources, and only user/default sources should update the durable session model.If a provider stream finishes with no content, write a terminal retry/error state rather than a synthetic continuation row that looks like user intent. Regression: failed retry on fallback model, then normal user follow-up, must continue with the previous real selected model.
Generated with ax.
codeg-dev commentedon Jul 22, 2026
Status update from the original patch investigation: PR #33045 was intentionally closed after validation showed that repairing fallback-created session model state was the wrong layer.
The narrower intended direction is to keep provider rate-limit / retry-advisory failures on the original-model retry path and avoid model-replacement fallback for those failures, rather than allowing a fallback model to become durable and repairing session state afterward. The remaining issue is therefore still valid, but #33045 should not be treated as an active fix.
github-actions commentedon Sep 21, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.