Skip to content

issue intents: add description suffix to nudge agent to include rationale and confidence #42762

Description

@alondahari

Summary

When issue_intents is enabled, the agent has rationale and confidence fields available in the tool schemas for set_issue_type, set_issue_field, and add_labels, but nothing instructs it to use them. As a result, the agent often sends calls without intent metadata.

Fix

In generate_safe_outputs_tools.cjs, when GH_AW_RUNTIME_FEATURES includes issue_intents, append an intent instruction to the tool descriptions for set_issue_type, set_issue_field, and add_labels.

After the existing description suffix logic (~line 132):

const runtimeFeatures = (process.env.GH_AW_RUNTIME_FEATURES || "").split(",");
if (runtimeFeatures.includes("issue_intents") && ["set_issue_type", "set_issue_field", "add_labels"].includes(tool.name)) {
  enhancedTool.description += " INTENT: Include rationale (max 280 chars) and confidence (LOW/MEDIUM/HIGH) with each call.";
}

This follows the same pattern as the existing description_suffixes enhancement and is gated behind the feature flag.

Affected files

  • actions/setup/js/generate_safe_outputs_tools.cjs

Context

The tool schemas already expose rationale and confidence fields but the agent takes the simpler path unless explicitly told to include them. This was observed in live runs where set_issue_type and set_issue_field were called without rationale, and add_labels sent plain strings instead of objects with metadata.

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions