Skip to content

add-comment safe output declared in frontmatter but missing from compiled handler config #21863

@chrizbo

Description

@chrizbo

Summary

When an agentic workflow declares add-comment in the safe-outputs frontmatter block, the compiler does not include it in the GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG environment variable in the compiled lock file. As a result, the agent cannot post comments at runtime even though the prompt instructs it to.

Reproduction

Source .md frontmatter:

safe-outputs:
  github-token: ${{ secrets.MY_TOKEN }}
  update-issue:
    body:
    footer: false
    target: "*"
    target-repo: "*"
    max: 5
  add-comment:
    max: 1
    target: "*"
    target-repo: "*"

After gh aw compile, the lock file contains:

GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"update_issue\":{\"allow_body\":true,\"footer\":false,\"max\":5,\"target\":\"*\",\"target-repo\":\"*\"}}"

add_comment is absent from the config. Only update_issue, missing_data, missing_tool, and noop are present.

Expected behavior

The compiled handler config should include:

"add_comment": {"max": 1, "target": "*", "target-repo": "*"}

Impact

  • The agent prompt instructs the model to use add-comment for nudge comments
  • At runtime the safe-outputs MCP server does not register an add_comment tool
  • The agent silently skips the comment step (no error, no output)
  • Tested across compiler versions v0.52.1, v0.60.0, and the latest upgrade — same result

Workaround

None currently. The add-comment tool is simply unavailable to the agent.

Metadata

Metadata

Labels

Type

No type
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