---
title: "Discussion on \"Claude Code 400 Recovery When cache_control Cannot Be Set for Empty Text Blocks: Keep Your Session\" | Hashnode"
description: "Discussion on \"Claude Code 400 Recovery When cache_control Cannot Be Set for Empty Text Blocks: Keep Your Session\". A Python script that surgically removes the corrupted block from your JSONL session file, plus the four input patterns that trigger it"
url: "https://hashnode.com/posts/claude-code-cache-control-empty-text-block-400-recovery/6a015eda1138639290b57274"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Claude Code 400 Recovery When cache\_control Cannot Be Set for Empty Text Blocks: Keep Your Session](https://yurukusa.hashnode.dev/claude-code-cache-control-empty-text-block-400-recovery?utm_source=hashnode&utm_medium=feed)

A Python script that surgically removes the corrupted block from your JSONL session file, plus the four input patterns that trigger it

May 11 · 7 min read · yurukusa.hashnode.dev  
Read the article

-   [#anthropic](https://hashnode.com/tag/anthropic)
-   [#api](https://hashnode.com/tag/api)
-   [#claudecode](https://hashnode.com/tag/claudecode)
-   [#debugging](https://hashnode.com/tag/debugging)
-   [#python](https://hashnode.com/tag/python)

## Written by

[yurukusa](https://hashnode.com/@yurukusa)

@yurukusa

  
[View profile](https://hashnode.com/@yurukusa)

Building free developer tools. 56 browser-based tools, all single HTML files.

Building free developer tools. 56 browser-based tools, all single HTML files. No npm, no build step.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
