Skip to content

Add reasoning effort support to assign-to-agent - #60346

Merged
pelikhan merged 8 commits into
mainfrom
copilot/add-reasoning-effort-support
Sep 12, 2026
Merged

Add reasoning effort support to assign-to-agent#60346
pelikhan merged 8 commits into
mainfrom
copilot/add-reasoning-effort-support

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

assign-to-agent can now forward optional, model-specific reasoning effort through the existing agent assignment API. Unsupported agents, models, or values emit a warning and continue without the field.

  • Configuration

    • Adds templatable reasoning_effort string support.
    • Preserves expressions until runtime.
    • Updates schemas, fixtures, references, and changeset.
  • Runtime

    • Sends supported values as agent_assignment.reasoning_effort.
    • Centralizes agent/model capability validation.
    • Includes reasoning effort in staged previews.
    • Preserves existing issue and pull-request assignment behavior.
  • Coverage

    • Covers literals, expressions, omitted and invalid values, model-specific values, fallback behavior, and issue/PR targets.
safe-outputs:
  assign-to-agent:
    name: copilot
    model: o3
    reasoning_effort: high

Dynamic values are also supported:

reasoning_effort: ${{ inputs.reasoning_effort }}

Copilot AI and others added 2 commits September 11, 2026 23:52
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add reasoning_effort support to assign-to-agent safe output Add reasoning effort support to assign-to-agent Sep 12, 2026
Copilot AI requested a review from pelikhan September 12, 2026 00:13
@pelikhan
pelikhan marked this pull request as ready for review September 12, 2026 00:47
Copilot AI balanced review requested due to automatic review settings September 12, 2026 00:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Dynamic special-character values can break handler configuration parsing, while explicit empty values bypass the required warning.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds optional model-specific reasoning effort to assign-to-agent, spanning configuration, runtime validation, previews, tests, fixtures, and documentation.

Changes:

  • Propagates reasoning_effort into compatible assignment requests.
  • Adds capability-aware validation with warning-based fallback.
  • Updates coverage, examples, schema, and release notes.
File summaries
File Description
scratchpad/safe-outputs-specification.md Documents payload behavior.
pkg/workflow/safe_outputs_handler_registry_assignments.go Propagates the configuration.
pkg/workflow/assign_to_agent.go Defines the new field.
pkg/workflow/assign_to_agent_test.go Tests parsing and types.
pkg/parser/schemas/main_workflow_schema.json Adds schema support.
pkg/cli/workflows/test-copilot-assign-to-agent.md Adds a supported literal fixture.
pkg/cli/workflows/test-assign-to-agent-with-model.md Adds an unsupported-model fixture.
pkg/cli/workflows/test-assign-to-agent-with-dynamic-reasoning-effort.md Adds an expression fixture.
docs/src/content/docs/reference/safe-outputs.md Documents safe-output usage.
docs/src/content/docs/reference/frontmatter-full.md Updates generated reference content.
docs/src/content/docs/reference/copilot-cloud-agent.mdx Documents Copilot configuration.
actions/setup/js/assign_to_agent.test.cjs Tests previews and issue/PR propagation.
actions/setup/js/assign_to_agent.cjs Passes configuration into assignments.
actions/setup/js/assign_agent_helpers.test.cjs Tests capability validation.
actions/setup/js/assign_agent_helpers.cjs Validates and builds the API payload.
.changeset/patch-assign-to-agent-reasoning-effort.md Records the feature change.
Review details
  • Files reviewed: 16/16 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

AddTemplatableInt("max", c.Max).
AddIfNotEmpty("name", c.DefaultAgent).
AddIfNotEmpty("model", c.DefaultModel).
AddIfNotEmpty("reasoning_effort", c.ReasoningEffort).
AddTemplatableInt("max", c.Max).
AddIfNotEmpty("name", c.DefaultAgent).
AddIfNotEmpty("model", c.DefaultModel).
AddIfNotEmpty("reasoning_effort", c.ReasoningEffort).
@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

⚠️ Security scanning failed for Design Decision Gate 🏗️. Review the logs for details.

No ADR enforcement needed: PR does not have the 'implementation' label and has <=100 new lines of code in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer failed during the skills-based review.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer completed successfully!

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #60346

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Code Quality Reviewer failed during code quality review.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

🔎 Code quality review by PR Code Quality Reviewer

*/
const AGENT_NAME_BY_LOGIN = Object.fromEntries(Object.entries(AGENT_LOGIN_NAMES).flatMap(([agentName, logins]) => logins.map(login => [normalizeLogin(login), agentName])));

const REASONING_EFFORT_CAPABILITIES = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot this is a lost cause, there will be more models in the future with different reasoning model. Do not try to enforce besides the enum values.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in f8fda4e. reasoning_effort is now validated only against the enum (none, minimal, low, medium, high, xhigh) and forwarded without agent/model capability checks; tests cover an unknown future model.

Copilot AI and others added 3 commits September 12, 2026 02:28
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
name: "copilot" # default agent (default: "copilot")
model: "claude-sonnet-5" # default AI model (default: "auto")
model: "o3" # default AI model (default: "auto")
reasoning_effort: "high" # optional enum value or expression

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot use - instead of _ like other fields in the safe outputs from matter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in c07e8f4. The safe-output frontmatter and handler configuration now use reasoning-effort consistently; only the required REST API payload remains agent_assignment.reasoning_effort.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan September 12, 2026 02:45
@pelikhan
pelikhan merged commit e7f2aa9 into main Sep 12, 2026
44 checks passed
@pelikhan
pelikhan deleted the copilot/add-reasoning-effort-support branch September 12, 2026 03:30
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.89.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add reasoning_effort support to assign-to-agent safe output

3 participants