copilot-sdk icon indicating copy to clipboard operation
copilot-sdk copied to clipboard

[Feature Request] Allow subagents to override reasoning effort in CustomAgentConfig (parity with Claude Agent SDK)

Open nicbstme opened this issue 7 months ago • 5 comments

Summary

Allow custom subagents defined via CustomAgentConfig to specify their own reasoning effort independent of the orchestrator session's reasoning. The Claude Agent SDK supports this via an effort field on AgentDefinition. copilot-sdk's CustomAgentConfig does not, so reasoning is fixed at session level and applies uniformly to every subagent invocation.

Motivation

  • Orchestrators often benefit from high or max reasoning for planning and delegation
  • Many subagent tasks are mechanical execution (validation, extraction, format conversion) and do not benefit from deep reasoning, but today pay its latency and cost
  • Conversely, security focused or analysis focused subagents may want stronger reasoning than the orchestrator
  • Without per subagent control, the tallest reasoning setting propagates to every dispatch

Current state

  • CustomAgentConfig (copilot-sdk types.d.ts, lines 802 to 833) has no reasoningEffort or effort field
  • Session level reasoningEffort in providerOptions applies to all subagent dispatches in that session

Proposed

  1. Add optional reasoningEffort (or effort) field to CustomAgentConfig
  2. Accept existing values: low | medium | high | xhigh | max, plus numeric for models that support it
  3. Fall back to session reasoning when omitted
  4. Mirror the field in the YAML frontmatter loader (coordinated with github/copilot-cli#2904)

Precedent

Claude Agent SDK's AgentDefinition.effort: https://code.claude.com/docs/en/agent-sdk/subagents

Identical value vocabulary already in use by this SDK.

Related

  • github/copilot-cli#2904 — Custom Agent YAML Frontmatter Should Support Reasoning Effort (CLI surface for the same feature)
  • #1019 — Per agent tool visibility for custom sub agents (same architectural axis)

nicbstme avatar Apr 23 '26 23:04 nicbstme

+1 — observed adjacent gap on Copilot CLI v1.0.40. While testing per-launch model: (which the closing comment on github/copilot-cli#2939 suggests should work for subagents), I found that model: arguments and frontmatter are silently dropped at task dispatch — sub-agents inherit the parent session's model. The #2939 close comment explicitly notes that CustomAgentConfig "doesn't yet expose model," which is the same architectural shape as this issue's missing effort field: the YAML/runtime side parses the value, but the SDK dispatch type can't carry it through to inference.

If both fixes (model + effort fields on CustomAgentConfig) land together, the per-agent routing and per-agent reasoning-effort use cases on the customization-repo side both unblock. Reproduction for the model side: https://github.com/spencerbk/copilot-config/blob/dev/docs/incidents/2026-05-02-copilot-cli-subagent-model-ignored.md. Related: github/copilot-cli#2939 (closed "partial"), github/copilot-cli#1354 (open), github/copilot-cli#2904 (open — per-agent effort on the CLI side).

spencerbk avatar May 03 '26 07:05 spencerbk

Any update in this? Similar request for VS Code Chat was closed with the comment that GitHub team is moving their effort to support Copilot SDK: https://github.com/microsoft/vscode/issues/327099

filip-be avatar Aug 01 '26 12:08 filip-be

There are multi-agent workflows that would GREATLY benefit from the ability to control the reasoning level of each sub agent call. This topic needs some attention.

scorpyonmike avatar Aug 10 '26 08:08 scorpyonmike

I'm very interested in seeing subagent reasoning effort support. Surprised it's missing entirely.

romanstetsenko avatar Aug 13 '26 15:08 romanstetsenko

Thanks for the request, and thanks everyone for the +1s. CustomAgentConfig now has an optional reasoningEffort (Python reasoning_effort, .NET/Go ReasoningEffort, Java setReasoningEffort, Rust with_reasoning_effort) alongside model, so each sub-agent can run with its own effort, and when it's omitted the runtime falls back as described in the custom agents docs. This is available in Copilot SDK v1.0.8 and later (#1981); please use the latest release, which also includes runtime refinements to how agent reasoning effort is applied, and note that agent definition files can set reasoning-effort in their frontmatter too (github/copilot-cli#2904). If it doesn't take effect on the latest version, feel free to reopen.

Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.

patniko avatar Oct 26 '26 20:10 patniko