Skip to content

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

Closed

Description

@remorses

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.

Activity

  1. rekram1-node commented on Oct 8, 2025

    @rekram1-node
    Contributor

    makes sense, related: #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

  2. remorses commented on Jan 24, 2026

    @remorses
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions