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.
Summary
When
issue_intentsis enabled, the agent hasrationaleandconfidencefields available in the tool schemas forset_issue_type,set_issue_field, andadd_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, whenGH_AW_RUNTIME_FEATURESincludesissue_intents, append an intent instruction to the tool descriptions forset_issue_type,set_issue_field, andadd_labels.After the existing description suffix logic (~line 132):
This follows the same pattern as the existing
description_suffixesenhancement and is gated behind the feature flag.Affected files
actions/setup/js/generate_safe_outputs_tools.cjsContext
The tool schemas already expose
rationaleandconfidencefields but the agent takes the simpler path unless explicitly told to include them. This was observed in live runs whereset_issue_typeandset_issue_fieldwere called without rationale, andadd_labelssent plain strings instead of objects with metadata.