feat: expose reasoning effort for Claude (--effort) + /effort command, picker & cron/webhook - #161
Closed
ryuhaneul wants to merge 1 commit into
Closed
feat: expose reasoning effort for Claude (--effort) + /effort command, picker & cron/webhook#161ryuhaneul wants to merge 1 commit into
ryuhaneul wants to merge 1 commit into
Conversation
…ffort command and /status display reasoning_effort was a shared config field but only Codex consumed it. Wire it into the Claude path and surface it to users: - claude_provider passes --effort <reasoning_effort> when set (skips "default"/unset), mirroring codex_provider's -c model_reasoning_effort. - Provider-aware effort validation: Claude supports low|medium|high|xhigh|max (max is Claude-only); Codex uses its live model cache, falling back to a constant set so max is rejected even when the cache is unavailable. - New /effort command: active-provider-aware effort buttons (Claude shows max, Codex does not), reusing the model wizard's reasoning step so selection flows through switch_model as an effort-only change. Unsupported providers (gemini/antigravity) get an info message and no UI. - /model provider switch re-validates the carried-over effort against the new provider and resets it to medium when unsupported (prevents Claude max reaching Codex). Effort is no longer wiped when switching between Codex and Claude (only dropped for non-effort providers). - /status shows the active provider's reasoning effort (Claude and Codex). - RULES docs and i18n (all languages) updated.
Contributor
Author
|
Closing for now — the topic-scoped effort change here regresses behavior: setting reasoning effort inside a forum topic overwrites the global default (this also affects Codex, which previously no-op'd in topics). Reworking effort to be session-scoped (per-topic in topics, default in the main chat) for both providers; will resubmit as a fresh PR. Thanks! |
ryuhaneul
pushed a commit
to ryuhaneul/ductor
that referenced
this pull request
Jun 25, 2026
Expose reasoning effort for Claude (--effort) with a /effort command, provider-aware validation (claude low..max, codex low..xhigh with a no-cache fallback), /status display, cron/webhook executor support, model-picker effort sub-selector, and i18n — scoped per-session like model (replaces the closed PleasePrompto#161, which made topic effort changes leak globally and broke codex). Mirror the existing per-session model mechanism exactly: - SessionData gains a reasoning_effort field; sync_session_target/resolve_session store and capture-on-first-use (fixed at creation time, like model). - AgentRequest gains effort_override; CLIService resolves request.effort_override or config default (like model_override or default_model). - flows (_prepare_normal, named, heartbeat), injection, tasks/hub, and the background observer thread the effective per-session effort into every turn. - switch_model applies the global default only from main/DM (if not is_topic); in a topic it writes the topic session's effort, with provider-switch re-validation resetting an unsupported carried-over effort to medium. - NamedSession/BackgroundSubmit/BackgroundTask/TaskSubmit/TaskEntry carry reasoning_effort so named foreground/background runs keep their session effort. - claude_provider (--effort) and codex_provider (-c model_reasoning_effort) both consume the resolved per-turn effort. - /status shows the effective effort (session in a topic, else global default).
Contributor
Author
|
Superseded by #164, which resolves reasoning effort per session (parity with model selection) for both Claude and Codex. |
ryuhaneul
pushed a commit
to ryuhaneul/ductor
that referenced
this pull request
Jun 25, 2026
Expose reasoning effort for Claude (--effort) with a /effort command, provider-aware validation (claude low..max, codex low..xhigh with a no-cache fallback), /status display, cron/webhook executor support, model-picker effort sub-selector, and i18n — scoped per-session like model (replaces the closed PleasePrompto#161, which made topic effort changes leak globally and broke codex). Mirror the existing per-session model mechanism exactly: - SessionData gains a reasoning_effort field; sync_session_target/resolve_session store and capture-on-first-use (fixed at creation time, like model). - AgentRequest gains effort_override; CLIService resolves request.effort_override or config default (like model_override or default_model). - flows (_prepare_normal, named, heartbeat), injection, tasks/hub, and the background observer thread the effective per-session effort into every turn. - switch_model applies the global default only from main/DM (if not is_topic); in a topic it writes the topic session's effort, with provider-switch re-validation resetting an unsupported carried-over effort to medium. - NamedSession/BackgroundSubmit/BackgroundTask/TaskSubmit/TaskEntry carry reasoning_effort so named foreground/background runs keep their session effort. - claude_provider (--effort) and codex_provider (-c model_reasoning_effort) both consume the resolved per-turn effort. - /status shows the effective effort (session in a topic, else global default).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exposes Claude Code's
--effortreasoning-depth control through ductor, unifying reasoning-effort handling across Codex and Claude.Previously
reasoning_effortwas Codex-only (-c model_reasoning_effort); the Claude provider ignored it. Claude Code supports--effort <low|medium|high|xhigh|max>for both headless (-p) and the TUI, so this wires it through.Changes
--effort:claude_providerpasses--effort <level>whenreasoning_effortis set (mirrors the Codex-c model_reasoning_effortpattern; skipped onmedium/default).low..max(incl.max), Codexlow..xhigh. Switching providers re-validates the stored effort (e.g. Claudemax→ Codex resets tomedium); a Codex no-cache fallback keepsmaxrejected for Codex even when the model cache is unavailable./effortcommand: new command to set reasoning effort for the active provider (provider-appropriate options), reusing the existing reasoning-selection path./modelnow offers the effort sub-selector (as Codex already did)./status: now displays the active provider's current reasoning effort (previously shown for neither provider).--effortfor Claude tasks (Codex keeps-c model_reasoning_effort; other providers unchanged).Tests
Added coverage for:
--effortpass/skip, provider-aware validation (ClaudemaxOK, Codexmaxrejected incl. no-cache fallback),/effortselection, model-picker effort for Claude (with Codex no-regression),/statuseffort display, and executor per-provider emission.Notes
Standalone — no dependency on the interactive-REPL work; applies to the
-pexecution path.