[PR #6114] fix(session): prevent GPT-5.2 resume reasoning crash #11739

Open
opened 2026-02-16 18:16:41 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6114

State: open
Merged: No


Summary

  • Prevent resume failures on GPT-5.2 by dropping assistant messages that contain only reasoning/step-start parts when rebuilding the prompt.
  • Add unit coverage for the filtering behavior.

Context

Force-quitting mid-stream can persist an assistant message with only reasoning parts; on GPT-5.2 this can violate OpenAI Responses item sequencing and error on restore.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6114 **State:** open **Merged:** No --- ## Summary - Prevent resume failures on GPT-5.2 by dropping assistant messages that contain only `reasoning`/`step-start` parts when rebuilding the prompt. - Add unit coverage for the filtering behavior. ## Context Force-quitting mid-stream can persist an assistant message with only reasoning parts; on GPT-5.2 this can violate OpenAI Responses item sequencing and error on restore.
yindo added the pull-request label 2026-02-16 18:16:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11739