Status comment stays on "started" when the agent calls report_incomplete, because the conclusion step that updates it is skipped
Summary
With status-comment: true, the activation job posts a status comment such as "has started processing this issue comment". When the run ends, the conclusion job's step "Update reaction comment with completion status" should replace that text with the outcome. If the agent calls report_incomplete, that step never runs, so the comment keeps its "started" text for good, even though the run failed.
The step has no if:, so it has the implicit success(). The step before it, "Handle agent failure", calls core.setFailed for report_incomplete, so Actions skips the update step. The other conclusion steps all use if: always(), and the update script already has wording for failed, timed-out and cancelled runs, so it is meant to run after failures.
I saw this in a private repository: a slash-command workflow whose agent hit its AI credit cap and emitted report_incomplete. The conclusion job showed "Handle agent failure" as failed and "Update reaction comment with completion status" as skipped. The comment was never edited (updated_at equal to created_at).
Verified on release v1.3.0 and on main at cbf8ba5 (2026-11-17).
Reproduction
Scratch repository with one workflow, .github/workflows/repro.md:
---
on:
slash_command:
name: repro
events: [pull_request_comment]
status-comment: true
permissions:
contents: read
pull-requests: read
engine: copilot
---
# Repro
Say hello.
git init && git remote add origin https://github.com/example/repro.git
gh aw compile repro # v1.3.0, and a build of main at cbf8ba5
awk '/^ - name: (Handle agent failure|Report failed jobs|Update reaction comment with completion status)/{print NR": "$0; getline; print NR": "$0; getline; print NR": "$0}' .github/workflows/repro.lock.yml
Output on v1.3.0:
1451: - name: Handle agent failure
1452: id: handle_agent_failure
1453: if: always()
1512: - name: Report failed jobs
1513: id: report_failed_jobs
1514: if: always()
1531: - name: Update reaction comment with completion status
1532: id: conclusion
1533: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
A build of main at cbf8ba5 gives the same shape (lines 1476, 1537 and 1556). The update step has no if: and no continue-on-error, while the two steps before it have if: always().
At run time, an agent that calls report_incomplete makes handle_agent_failure.cjs call core.setFailed. A later step without if: is then skipped by Actions. With if: always() on the update step, it would run and notify_comment_error.cjs would write the failure text. I did not run that fix live in a public repository: doing so needs a Copilot run in which the agent emits report_incomplete. The evidence is the compiled step condition plus Actions step semantics.
Analysis
pkg/workflow/notify_comment.gobuilds the step and only sets a condition when anadd_commentsafe-output job exists:notify_comment.go#L100-L120. In every other casestepConditionstays empty, and the step builder then emits noif:(safe_outputs_steps.go#L179-L182). Theadd_commentcase usesalways() && !(needs.add_comment.outputs.comment_id), soalways()was intended there.handle_agent_failure.cjsmarks its own step failed on purpose whenreport_incompletewas emitted, so that optional issue reporting can still run:handle_agent_failure.cjs#L4678-L4682. Any error thrown from that script also fails the step.- The two neighbouring conclusion steps already use
StepCondition: "always()":notify_comment_conclusion_helpers.go#L566and#L847. notify_comment_error.cjsmaps agent conclusionscancelled,skippedandtimed_outto status text, so it is designed to run for failed runs:notify_comment_error.cjs#L98-L113.- Plain agent failures are not affected, because
handle_agent_failure.cjsdoes not callcore.setFailedfor them. That is why the bug only shows withreport_incomplete, or when the failure handler itself throws. - No test checks the condition of the update step.
pkg/workflow/status_comment_decoupling_test.goandpkg/workflow/notify_comment_test.goonly check whether the step is present, andnotify_comment_test.gopinsif: always()only forreport_failed_jobs(notify_comment_test.go#L385). - No open or closed issue or PR matched searches for "report_incomplete status comment", "status-comment not updated agent failure" or "Update reaction comment with completion status skipped" on 2026-11-17.
Implementation plan
- Run the step after failures (
pkg/workflow/notify_comment.go): setstepCondition = "always()"by default, and keepalways() && !(needs.add_comment.outputs.comment_id)when theadd_commentjob exists. - Test the condition (
pkg/workflow/notify_comment_test.go, next to thereport_failed_jobsassertion): for a workflow withstatus-comment: true, assert the compiled "Update reaction comment with completion status" step hasif: always()and comes after "Handle agent failure". Add a case with anadd-commentsafe output that expects the combined condition. The existing cases inpkg/workflow/status_comment_decoupling_test.goalready cover the negative case: withstatus-commentunset, the step is absent. - Recompile the repository's locks: run
make recompileso the committed.lock.ymlfiles pick up the new condition. - Add a changeset (
.changeset/): apatchentry such as "Update the status comment when the agent calls report_incomplete or the failure handler fails." - Run
make agent-report-progress.
Acceptance criteria
- A workflow with
status-comment: truecompiles withif: always()on "Update reaction comment with completion status". - A workflow with both
status-comment: trueand anadd-commentsafe output compiles withalways() && !(needs.add_comment.outputs.comment_id)on that step. - After a run in which the agent calls
report_incomplete, the status comment no longer reads "started processing" and instead shows the failure text fromnotify_comment_error.cjs. - A workflow with
status-commentunset orfalsestill compiles without the step. make agent-report-progresspasses.
Suggested labels: bug, workflow