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
Summary
Forward thinking level from GSD2 to the Claude Agent SDK's
effortparameter when using the claude-code provider.Problem to solve
.claude/settings.jsonindependentlyCurrent behavior
streamViaClaudeCodeinstream-adapter.tsreceivesoptions.reasoningbut does not read itbuildSdkOptions()does not accept or forward an effort parameteranthropic.ts) correctly mapsoptions.reasoningto effort viamapThinkingLevelToEffort()and guards withsupportsAdaptiveThinking()— both fromanthropic-shared.tsExpected behavior
"off", reasoning isundefinedand effort should be omitted, allowing.claude/settings.jsoneffortLevelto take effect as the defaultImplementation note
The required helpers (
mapThinkingLevelToEffort,supportsAdaptiveThinking) exist inanthropic-shared.tsbut are not accessible to the claude-code extension —@gsd/pi-aidoes not export them via the barrel or a subpath.Use cases
options.reasoningto provider → claude-code provider forwards aseffortto Agent SDK → Claude Code applies effort levelImpact