bedrock-thinking-signature-recovery

Strip stale thinking.signature blocks from API request copies to prevent 400 errors.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/liuyu520/cc_source --skill bedrock-thinking-signature-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bedrock-thinking-signature-recovery
Source: https://github.com/liuyu520/cc_source/tree/main/skills/bedrock-thinking-signature-recovery
Command: npx skills add https://github.com/liuyu520/cc_source --skill bedrock-thinking-signature-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Thinking.signature blocks can cause 400 errors when resuming or proxying sessions across Bedrock-compatible providers. This Skill cleans and reinstates safe API request content without altering the transcript UI.

Core Features & Use Cases

  • Identify and strip stale thinking.signature blocks from API request copies to prevent Invalid signature in thinking block errors.
  • Apply across Bedrock, Vertex, Foundry, third-party proxies, and non-first-party Anthropic base URLs to ensure compatibility during session recovery.
  • Preserve transcript/UI history while cleaning only the API request copy.

Quick Start

Enable signature cleanup before sending API requests to avoid 400 errors caused by stale thinking blocks.

Frequently Asked Questions about bedrock-thinking-signature-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix the Invalid signature in thinking block 400 error on Bedrock?

To fix the Invalid signature in thinking block 400 error on Bedrock, you must identify and strip stale thinking.signature blocks from your API request copies. This cleanup restores safe request content without altering the transcript.

Why does thinking.signature cause 400 errors when resuming sessions across providers?

Thinking.signature blocks cause 400 errors during session resumption or proxying because the signatures become stale across different Bedrock-compatible providers. Stripping these invalid blocks restores API request compatibility.

Does thinking signature cleanup work with Vertex and Foundry proxies?

Yes, thinking signature cleanup works across Vertex, Foundry, third-party proxies, and non-first-party Anthropic base URLs. It ensures compatibility during session recovery by cleaning only the API request copy.

How do I strip stale thinking blocks without modifying the transcript UI history?

You can strip stale thinking blocks without modifying the transcript UI history by applying safe, limited cleanup using existing stripSignatureBlocks logic. This cleans the API request copy while preserving the original transcript.

When should I enable signature cleanup for Anthropic API requests?

You should enable signature cleanup before sending API requests to avoid 400 errors caused by stale thinking blocks. This is necessary when proxying or resuming sessions across Bedrock-compatible providers.