Skip to content

[Feature]: Pass thinking level to Claude Code provider as effort parameter #3917

@FrankThonig6

Description

@FrankThonig6

Summary

Forward thinking level from GSD2 to the Claude Agent SDK's effort parameter when using the claude-code provider.

Problem to solve

  • The GSD2 thinking level is not taken into account for the claude-code provider's effort level
  • Claude Code uses its own default or the value from .claude/settings.json independently

Current behavior

  • streamViaClaudeCode in stream-adapter.ts receives options.reasoning but does not read it
  • buildSdkOptions() does not accept or forward an effort parameter
  • The Anthropic provider (anthropic.ts) correctly maps options.reasoning to effort via mapThinkingLevelToEffort() and guards with supportsAdaptiveThinking() — both from anthropic-shared.ts

Expected behavior

  • The claude-code provider should forward thinking level as effort, matching the Anthropic provider's pattern
  • When thinking is "off", reasoning is undefined and effort should be omitted, allowing .claude/settings.json effortLevel to take effect as the default

Implementation note

The required helpers (mapThinkingLevelToEffort, supportsAdaptiveThinking) exist in anthropic-shared.ts but are not accessible to the claude-code extension — @gsd/pi-ai does not export them via the barrel or a subpath.

Use cases

  • User selects thinking level in GSD2 UI → agent loop passes options.reasoning to provider → claude-code provider forwards as effort to Agent SDK → Claude Code applies effort level

Impact

  • Affected: all users of the claude-code provider
  • Frequency: every claude-code session
  • Consequence: thinking level UI control is non-functional for claude-code provider

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions