/context command fails when thinking mode is enabled: Haiku doesn't support thinking

Resolved 💬 4 comments Opened Nov 10, 2025 by ruptonapex Closed Jan 23, 2026

Description

The /context built-in command fails with a 400 error when the session has thinking mode enabled because it attempts to use Claude Haiku, which doesn't support thinking blocks.

Error Message

Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"'claude-3-5-haiku-20241022' does not support thinking."},"request_id":"req_vrtx_011CV13AWUSuHe9Y38roN9qr"}

Steps to Reproduce

  1. Start a Claude Code session with thinking mode enabled (e.g., thinking_mode: interleaved)
  2. Run the /context command
  3. Observe the 400 error

Expected Behavior

The /context command should work regardless of the parent session's thinking mode setting. It should either:

  • Explicitly disable thinking mode when using Haiku, OR
  • Use Sonnet when the parent session has thinking enabled, OR
  • Document that /context is incompatible with thinking mode

Actual Behavior

The command inherits the thinking mode setting from the parent session and tries to call Haiku with thinking enabled, which Haiku rejects.

Environment

  • Claude Code Version: Current (as of 2025-11-10)
  • Model in use: claude-sonnet-4-5@20250929
  • Thinking mode: interleaved (enabled)
  • Platform: macOS (Darwin 24.6.0)

Context

The /context command likely uses Haiku intentionally for performance/cost optimization, which is a good design choice. However, it needs to handle the thinking mode conflict properly.

Suggested Fix

When the /context command spawns its agent/API call, it should either:

  1. Force thinking_mode: false when using Haiku
  2. Check if thinking is enabled in parent session and use Sonnet instead
  3. Add error handling to gracefully degrade

View original on GitHub ↗

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