Skip to content

[BUG] filter_restored_tool_context is incompatible with extended thinking #621

Description

@surecloud-jleite

Version

bedrock-agentcore 1.19.0

Model

Claude Sonnet 4.6 via Amazon Bedrock, with extended thinking enabled ({"type": "adaptive", "display": "summarized"})

What happens

Setting filter_restored_tool_context=True on AgentCoreMemoryConfig makes every request fail once there is history to restore:

ValidationException: messages.1.content.6: `thinking` or `redacted_thinking` blocks in
the latest assistant message cannot be modified. These blocks must remain as they were
in the original response.

The option is unusable for any agent with extended thinking enabled. Turning the flag off restores normal operation.

Expected

Either the option works alongside extended thinking, or the incompatibility is documented and the flag rejected at configuration time rather than failing on every request at runtime.

Context

We hit this while trying to work around strands-agents/harness-sdk#3651, where an interrupted turn leaves a session permanently unusable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions