Summary
When a workflow uses centralized slash_command routing (strategy: centralized), the child workflow runs as workflow_dispatch. The add_comment safe-output handler resolves the target issue from caller/aw_context, but **update_issue with target: triggering fails because github.event.issue is absent.
This causes partial delivery: comments post successfully, body updates do not. The workflow run is marked failed even when the agent completed.
We hit the same class of problem earlier with skip-bots checking GITHUB_ACTOR on the dispatched run (github-actions[bot]) instead of the originating human. Membership checks already use aw_context on workflow_dispatch; update_issue (and possibly add_labels / remove_labels) need the same treatment.
Environment
- gh-aw compiler: v0.79.8
- Host: GitHub.com, organization-owned private repository
- Workflow pattern:
slash_command:
name: refresh-proposal
events: [issue_comment]
strategy: centralized
safe-outputs:
update-issue:
body: true
max: 1
add-comment:
max: 4
- Trigger: Human
issue_comment with slash command /refresh-proposal on an issue
- Child run event:
workflow_dispatch (dispatched by Agentic Commands router)
- Example failed run ID:
27599222275 (unique within the repository; not globally identifiable without repo access)
Note on run IDs: GitHub Actions run IDs are unique per repository, not across all of GitHub. We are not sharing the repository name or a run URL.
Steps to reproduce
- Configure a workflow with centralized
slash_command on issue_comment and update-issue + add-comment safe outputs.
- Comment the slash command on an issue (e.g.
/refresh-proposal).
- Agentic Commands router dispatches the target workflow via
workflow_dispatch.
- Agent completes and emits safe outputs:
update_issue then add_comment(s).
Actual behavior
| Safe output |
Result |
update_issue (message 1/3) |
Failed |
add_comment (messages 2–3) |
Succeeded |
safe_outputs log:
Processing message 1/3: update_issue
##[warning]Target is "triggering" but not running in issue context, skipping update_issue
##[error]✗ Message 1 (update_issue) failed: Target is "triggering" but not running in issue context, skipping update_issue
Processing message 2/3: add_comment
Resolved target issue #3 (target config: triggering)
✓ Message 2 (add_comment) completed successfully
Processing message 3/3: add_comment
✓ Message 3 (add_comment) completed successfully
Successful: 2
Failed: 1
- Child run
event: workflow_dispatch (not issue_comment)
add_comment resolves the triggering issue from caller context (GH_AW_COMMENT_ID / aw_context)
- Issue body is not updated
- Overall workflow conclusion: failure (“failed to deliver outputs”)
Expected behavior
On workflow_dispatch dispatched by centralized slash-command routing, update_issue with target: triggering should resolve the same issue that add_comment already resolves from aw_context (issue number, comment id, or equivalent caller payload).
Same pattern as team membership validation, which already logs:
Validating centralized workflow_dispatch against originating actor '<user>'
✓ command_name 'refresh-proposal' resolved from workflow_dispatch aw_context
Impact
For issue-only workflows that must rewrite the issue body (e.g. freeze a submission template into a canonical section), centralized routing blocks a core safe output. Workarounds are awkward:
- Dropping centralized routing is blocked when the same workflow also needs
issues: opened (compiler error: cannot combine slash_command + issues without centralized strategy).
- Instructing the agent to use
gh issue edit via bash bypasses safe outputs and is undesirable.
Suggested fix
In the update_issue handler (and likely add_labels / remove_labels with target: triggering), when github.event_name === 'workflow_dispatch' and caller/aw_context includes issue context:
- Resolve issue number/repo from the same source
add_comment uses today.
- Apply the body/label update to that issue.
- Do not require
github.event.issue on the dispatched event.
Related
- Centralized routing +
skip-bots false negative on github-actions[bot] actor (repo-side workaround: removed skip-bots).
- Agentic workflows no longer need a PAT (org-billed
GITHUB_TOKEN; unrelated but same test setup).
Workaround today
None clean within safe outputs + centralized routing. Manual issue body edit or wait for this fix.
Summary
When a workflow uses centralized
slash_commandrouting (strategy: centralized), the child workflow runs asworkflow_dispatch. Theadd_commentsafe-output handler resolves the target issue from caller/aw_context, but **update_issuewithtarget: triggeringfails becausegithub.event.issueis absent.This causes partial delivery: comments post successfully, body updates do not. The workflow run is marked failed even when the agent completed.
We hit the same class of problem earlier with
skip-botscheckingGITHUB_ACTORon the dispatched run (github-actions[bot]) instead of the originating human. Membership checks already useaw_contextonworkflow_dispatch;update_issue(and possiblyadd_labels/remove_labels) need the same treatment.Environment
issue_commentwith slash command/refresh-proposalon an issueworkflow_dispatch(dispatched by Agentic Commands router)27599222275(unique within the repository; not globally identifiable without repo access)Steps to reproduce
slash_commandonissue_commentandupdate-issue+add-commentsafe outputs./refresh-proposal).workflow_dispatch.update_issuethenadd_comment(s).Actual behavior
update_issue(message 1/3)add_comment(messages 2–3)safe_outputslog:event:workflow_dispatch(notissue_comment)add_commentresolves the triggering issue from caller context (GH_AW_COMMENT_ID/aw_context)Expected behavior
On
workflow_dispatchdispatched by centralized slash-command routing,update_issuewithtarget: triggeringshould resolve the same issue thatadd_commentalready resolves fromaw_context(issue number, comment id, or equivalent caller payload).Same pattern as team membership validation, which already logs:
Impact
For issue-only workflows that must rewrite the issue body (e.g. freeze a submission template into a canonical section), centralized routing blocks a core safe output. Workarounds are awkward:
issues: opened(compiler error: cannot combineslash_command+issueswithout centralized strategy).gh issue editvia bash bypasses safe outputs and is undesirable.Suggested fix
In the
update_issuehandler (and likelyadd_labels/remove_labelswithtarget: triggering), whengithub.event_name === 'workflow_dispatch'and caller/aw_contextincludes issue context:add_commentuses today.github.event.issueon the dispatched event.Related
skip-botsfalse negative ongithub-actions[bot]actor (repo-side workaround: removedskip-bots).GITHUB_TOKEN; unrelated but same test setup).Workaround today
None clean within safe outputs + centralized routing. Manual issue body edit or wait for this fix.