Skip to content

Claude Code provider not displaying reasoning/thinking content for Claude 3.5 Sonnet 4.0Β #5111

@hannesrudolph

Description

@hannesrudolph

App Version

3.19.1+ (current)

API Provider

Claude Code

Model Used

Claude 3.5 Sonnet 4.0

πŸ” Steps to Reproduce

  1. Configure Roo Code to use Claude Code provider
  2. Set model to Claude 3.5 Sonnet 4.0 (which supports reasoning/thinking)
  3. Send a request that should trigger reasoning (e.g., complex problem-solving task)
  4. Observe the chat response

πŸ’₯ Outcome Summary

Expected: Reasoning/thinking process should be displayed in collapsible reasoning blocks in the chat, similar to other providers

Actual: No reasoning/thinking content is displayed in the chat, even though the model supports it and other providers (like AWS Bedrock) show reasoning properly

Technical Analysis

Based on code investigation, the issue appears to be in the Claude Code provider integration:

Backend reasoning processing is implemented:

  • claude-code.ts:93-104 correctly processes "thinking" and "redacted_thinking" content types
  • Transforms them to "reasoning" stream chunks that should display in UI

Frontend reasoning display exists:

Recent related work:

Possible Root Causes

  1. Claude Code CLI integration issue: The external Claude CLI might not be returning thinking blocks in the expected format
  2. Model configuration: Claude 3.5 Sonnet 4.0 might need specific parameters to enable reasoning output through Claude Code CLI
  3. Stream processing bug: Reasoning content might be getting lost in the stream processing pipeline
  4. Version mismatch: Claude Code CLI version might not support reasoning output

Expected Behavior

Reasoning/thinking content should display in collapsible blocks similar to other providers, allowing users to see the model's thought process.

πŸ“„ Relevant Logs or Errors (Optional)

No specific errors displayed - reasoning content simply doesn't appear in the chat interface.

Metadata

Metadata

Assignees

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions