Skip to content

Require rationale/confidence for close and assignment tools with an issue-intents opt-out #43175

Description

@alondahari

Summary

Extend issue-intent metadata to the close_issue, assign_to_user, and assign_to_agent safe-output tools. As with #44535, rationale and confidence should be required by default in generated tool schemas, with an explicit compatibility opt-out for older GitHub Enterprise Server deployments.

Motivation

Closing an issue or assigning work carries the same kind of reasoning as setting an issue type, field, or label. Capturing rationale and confidence provides:

  • Auditability: reviewers can understand why the agent closed an issue or selected an assignee.
  • Consistency: issue-mutation tools expose the same intent contract.
  • Future value: intent metadata can support suggestion and approval experiences.

Proposed behavior

Issue intents are enabled by default. Workflows can disable them independently on each affected safe output:

safe-outputs:
  close-issue:
    issue-intent: false
  assign-to-user:
    issue-intent: false
  assign-to-agent:
    issue-intent: false

Runtime handling remains lenient. Older generated calls or direct calls without metadata should still be accepted; handlers should omit unavailable enrichment rather than fabricate values or reject the operation solely because metadata is missing.

Default: issue intents enabled

For each of these tools, the generated input schema requires:

  • rationale: string, maximum 280 characters.
  • confidence: exactly one of LOW, MEDIUM, or HIGH.
Tool Example rationale
close_issue "Duplicate of #123 — same root cause confirmed in thread"
assign_to_user "User is CODEOWNER for the affected path and has capacity"
assign_to_agent "Issue requires code changes in the auth module — delegating to Copilot"

Intent-capable API paths and feature headers should be used where the corresponding GitHub API supports them.

Per-tool opt-out: issue-intent: false

  • Generate legacy-compatible schemas where rationale and confidence are optional or omitted.
  • Do not append intent instructions to tool descriptions.
  • Do not send intent metadata or intent-specific feature headers.
  • Use legacy API paths for close and assignment operations.

Implementation scope

  1. Add intent properties to the static tool definitions for close_issue, assign_to_user, and assign_to_agent.
  2. Make those properties required in generated schemas when issue intents are enabled.
  3. Reuse the per-safe-output issue-intent configuration introduced by Require rationale/confidence by default with an issue-intents opt-out #44535.
  4. Propagate the configured mode to the three runtime handlers.
  5. Normalize and pass metadata only when issue intents are enabled and supported by the target API.
  6. Keep validator and normalization behavior lenient for legacy calls without metadata.
  7. Document that each safe-output tool has its own intent opt-out.

Acceptance criteria

  • Generated schemas require rationale and confidence by default for all three tools.
  • Setting issue-intent: false on any affected safe output generates a legacy-compatible schema for that tool only.
  • Disabled mode does not emit intent metadata or intent-specific feature headers.
  • Calls missing rationale/confidence remain runtime-compatible in both modes.
  • Tests cover default mode, disabled mode, metadata normalization, and legacy calls without metadata.

References

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions