aws / aws/bedrock-agentcore-sdk-python
AgentCoreMemorySessionManager does not support extended thinking
- Dominant language
- Python
- Stars
- 764
- Forks
- 148
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
**Describe the bug**
Multi-turn interaction with an agent using a model with [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) does not work
```
An error occurred (ValidationException) when calling the ConverseStream operation: The model returned the following errors: messages.11.content.0.type: Expected `thinking` or `redacted_thinking`, but found `text`. When `thinking` is enabled, a final `assistant` message must start with a thinking block. We recommend you include thinking blocks from previous turns.
```
**To Reproduce**
Steps to reproduce the behavior:
* Create a Strands Agent with AgentCoreMemorySessionManager and with Claude Sonnet 4.5 with extended thinking enabled
```
additional_request_fields={
"thinking": {"type": "enabled", "budget_tokens": 4096}
}
```
* Interact with the agent twice in the same session
**Expected behavior**
Multi-turn interaction works without an error
Contributor guide
Research direction
Start with AgentCoreMemorySessionManager and reproduce the two-turn interaction using Claude Sonnet 4.5 with extended thinking and the shown additional_request_fields. Trace how messages are persisted and restored between turns; done means the second interaction completes without the ConverseStream validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- ai, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100