Add a way to delete message parts and messages in the sdk #2001

Closed
opened 2026-02-16 17:33:41 -05:00 by yindo · 2 comments
Owner

Originally created by @remorses on GitHub (Oct 8, 2025).

Originally assigned to: @thdxr on GitHub.

My use case is writing a plugin that removes tool parts from plan messages, this way I can switch from GPT5 to Sonnet after a plan message without getting the model confused by all the tool calls in context

ChatGPT already does this (it exposes previous message reasoning via an on demand tool), follow up messages discard all the reasoning parts and only keep the final message in context. Codex may do the same too.

Originally created by @remorses on GitHub (Oct 8, 2025). Originally assigned to: @thdxr on GitHub. My use case is writing a plugin that removes tool parts from plan messages, this way I can switch from GPT5 to Sonnet after a plan message without getting the model confused by all the tool calls in context ChatGPT already does this (it exposes previous message reasoning via an on demand tool), follow up messages discard all the reasoning parts and only keep the final message in context. Codex may do the same too.
yindo closed this issue 2026-02-16 17:33:41 -05:00
Author
Owner

@rekram1-node commented on GitHub (Oct 8, 2025):

makes sense, related: https://github.com/sst/opencode/issues/2941

I think anthropic likes to have the CoT at least until a loop is completed but i think openai does what u said above

@rekram1-node commented on GitHub (Oct 8, 2025): makes sense, related: https://github.com/sst/opencode/issues/2941 I think anthropic likes to have the CoT at least until a loop is completed but i think openai does what u said above
Author
Owner

@remorses commented on GitHub (Jan 24, 2026):

This is now possible with the new v2 /update endpoints.

@remorses commented on GitHub (Jan 24, 2026): This is now possible with the new v2 /update endpoints.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2001