aws / aws/bedrock-agentcore-sdk-python
[BUG] filter_restored_tool_context is incompatible with extended thinking
- Lingua principale
- Python
- Stelle
- 761
- Fork
- 147
- Merge medio
- 1g 23h
- PR unite (30g)
- 7
Descrizione
### 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 https://github.com/strands-agents/harness-sdk/issues/3651, where an interrupted turn leaves a session permanently unusable.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci il malfunzionamento con bedrock-agentcore 1.19.0 usando AgentCoreMemoryConfig(filter_restored_tool_context=True), la cronologia ripristinata e Claude extended thinking. Traccia la configurazione e la gestione dei messaggi ripristinati, quindi verifica che l’opzione funzioni con i blocchi di thinking oppure venga rifiutata in fase di configurazione con indicazioni documentate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, python
- Ambito
- ai, backend-api-design
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100