[BUG] Failed to generate conversation summary - response did not contain valid text content

Resolved 💬 3 comments Opened Jan 14, 2026 by Pzixel Closed Feb 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude code says that my context is reached, but when I'm trying to compact I get an error

I'm using following envs:

export ANTHROPIC_DEFAULT_SONNET_MODEL="openai/gpt-5.1-codex-max"
export ANTHROPIC_DEFAULT_OPUS_MODEL="openai/gpt-5.2-pro"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="minimax/minimax-m2:exacto"

What Should Happen?

I should be able to continue the work.

Error Messages/Logs

⎿  Context limit reached · /compact or /clear to continue

✻ Sautéed for 28m 14s

❯ /compact 
  ⎿  Error: Error during compaction: Error: Failed to generate conversation summary - response did not contain valid text content

Steps to Reproduce

  1. make agent run for a long time so their context is filled
  2. compactify it
  3. observe it doesn't work
  4. if it does work try to use envs I set above to use GPT instead of Claude models

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.7

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗