Skip to content

Agent mode with Claude models fails repeatedly with 400 thinking or redacted_thinking blocks in the latest assistant message cannot be modified #979

Open

Description

@hollyleap1

Describe the bug
In agent mode with Claude Opus 5.5 and Claude Sonnet 5.5, a chat breaks after some turns with:
"unhandled status from server: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.1: thinking or redacted_thinking blocks in the latest assistant message cannot be modified..."}}"
After the first occurrence, every further message in the same chat (including "try to continue") fails with the same error. Only a new chat works again. This happens several times per day and makes longer agent tasks very hard to complete.

It seems to be the same issue as microsoft/vscode#316787 (fix proposed in microsoft/vscode#318076: do not send historical thinking blocks on the Messages API).

Versions

  • Copilot for Xcode:0.51.0
  • Xcode: 27.2
  • macOS: 27.2
  • Models: Claude Opus 5.5 and Claude Sonnet 5.5, agent mode, reasoning "Medium"

Steps to reproduce

  1. Start an agent mode chat with a Claude model on a larger task (many tool calls, terminal output).
  2. After a number of turns the error appears. It also appeared directly after attaching a screenshot to the chat.
  3. Retrying or "try to continue" fails with the same error.

Expected behavior
The chat continues, or the client recovers automatically (e.g. by dropping old thinking blocks).

Example request IDs
01d11d9e-c8ea-438c-a634-8163afd8f83d (GitHub: F488:CE7BC:AA531:B38F7:6AEB2B64)
96fad8d5-7d5b-4fbc-bdc2-7f6498c71e7c (GitHub: F51C:1D53C8:16E732:180C5D:6AEB2C8A)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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