Skip to content

One comment per agent run: merge the status comment and the result, fold the details #9335

Open

Description

@ascerra

Problem

Every agent run leaves at least two comments on the issue or PR:

  1. A status comment. It is posted as 🤖 Started … and rewritten at the end to 🤖 Finished Triage · ✅ Success · Started … · Completed …, followed by the commit, workflow run link, runtime, model, effort and cost (internal/statuscomment).
  2. The agent's result: the triage summary, the prioritize score, the review.

The review agent adds a third, the risk assessment, on top of the formal PR review.

When the result posts successfully, the status comment only repeats that the run finished. Most results are also posted fully expanded, so a thread with several runs is mostly agent text. With sticky comments removed (#9334), every run adds a fresh set.

Proposal

This applies to every agent and to GitHub, GitLab and Jira. The review agent is used as the example below only because its output is the longest.

1. One rule for posting. When an agent posts, look at the last comment in the thread. If it is that agent's own comment and nothing else has been posted since, rewrite it. Otherwise add a new comment at the end.

Status comments already apply this rule to start and finish (PostCompletionWithDetail and analyzeTimeline in internal/statuscomment). This extends it to the result, so Started followed by the result becomes one comment when nothing else happened in between. If someone commented during the run, the result is a new comment at the end, where readers will see it.

2. The result absorbs the status. The merged comment carries everything the status comment reports today: start and completion time, commit, workflow run link, runtime, model, effort and cost. If the result cannot be posted, the comment still ends in its Finished or Failed state, so a run is never silent.

3. Fold the details. The outcome and a short summary are visible. Everything else sits in <details> sections.

Illustrative shape for a review, not a final design:

🤖 **Review** · ✅ Approved · `879c4fa` · 2 findings, 0 blocking

Two to four lines that say what was reviewed and what the verdict rests on.

<details>
<summary>Findings (2)</summary>

…

</details>

<details>
<summary>Run details</summary>

Started 8:14 PM UTC · Completed 8:19 PM UTC · [View workflow run →](…)
Runtime: claude · Model: … · Effort: high · Cost: $0.50

</details>

Requirements

  • Keep the hidden markers the pipeline depends on, so later runs and other agents can still find the latest result.
  • Do not hide anything that blocks. For a request-changes review, the blocking findings, or at least their titles, stay outside the fold.
  • Leave out empty sections.
  • For reviews, the formal PR review and its inline comments are unchanged.
  • Check how the folding renders on GitLab and Jira.

Open questions

  • Does the rule apply only within one run (Started then result), or also across runs? As stated, two back-to-back runs of the same agent with nothing in between would leave one comment. If so, decide what happens to the earlier run's result and run details.
  • The status comment is written by the runner and the result by the agent's post step. Which side does the merge?
  • Does the review's risk assessment fold into the review comment or stay separate?

Acceptance criteria

  • A run with no other activity in between leaves exactly one comment, plus the formal PR review for the review agent.
  • Runtime, model, cost and the workflow run link can be found in that comment.
  • A run whose result fails to post still leaves a visible Finished or Failed status.
  • With all sections collapsed, the comment is about ten lines or fewer.
  • This works for triage, prioritize and review at minimum, on GitHub, GitLab and Jira where the agent runs there.

Related

Activity

  1. fullsend-ai-triage commented on Nov 11, 2026

    @fullsend-ai-triage

    🤖 Triage · ⚠️ Cancelled · Started 6:02 PM UTC · Ended 6:03 PM UTC

    Commit: 35228e6 · View workflow run →

  2. self-assigned this
    on Nov 11, 2026
  3. ascerra commented on Nov 12, 2026

    @ascerra
    ContributorAuthor

    Context from maintainer feedback since this was filed

    This issue is a proposal, not an agreed decision. Removing sticky comments (#9334) was agreed on 2026-11-11 and does not depend on this issue, so it goes first. Merging the status comment with the agent's result was not agreed, and there is an objection to it:

    • The start comment exists to show that a run has started. Other activity can land in the thread between that point and the agent's result.
    • If the result is then written into the start comment, it is no longer the last entry in the thread and readers have to go looking for it. That is the same problem sticky comments have.
    • On that view, the status comment and the result should stay separate comments.

    For reference, the proposal above only reuses the start comment when it is still the last comment in the thread. When anything else has been posted in between, the result goes at the end as a new comment.

    The question to settle before anyone implements parts 1 and 2 of the proposal: is that condition enough, or should the status comment and the result always be separate?

  4. ggallen commented on Nov 12, 2026

    @ggallen
    Member

    Just to be clear as to how the start/end comments work now. From my agent friend. But given how this works I would not make any changes here at all, but leave these comments as is. They can already be disabled, and you could choose to use emojis instead. And we need to remember that these comments apply to all agents, fullsend's and also all custom agents.

    code, fix, and review all use the same status-comment path. Their names only change the label in the message: “Code,” “Fix,” or “Review.” Status comments are posted when the run has a status-repo and issue/PR number; with default comment settings, both start and completion notifications are enabled. (run.go, config.go)

    1. Start: After the run has prepared its harness and configuration, it posts the start comment before preflight checks, sandbox setup, and agent execution. For example: 🤖 Review · Started 2:34 PM UTC. It may also include a short commit SHA and a workflow-run link. (run.go, statuscomment.go)

    2. Agent work and output: The agent runs. Its post-script can publish output during run shutdown; for example, the review agent posts its sticky findings comment before submitting any formal PR review. (run.go, postreview.go)

    3. Completion: The run reports success, failure, cancellation, or a pre-script skip. Normally this happens after post-script and cleanup; a cancelled built-in GitHub review has a special early finalizer that runs before teardown. (run.go, run.go)

    One status comment or two

    The completion handler checks the PR’s issue-comment list and applies these rules: (statuscomment.go, github.go)

    One status comment:
      Start comment at the beginning of the run
      → update that same timeline item at completion
    
    Two status comments:
      Start comment
      → intervening activity, with no agent-authored issue comment
      → append a new completion comment
    
    • One comment: It edits the start comment in place if the start comment is still last on the timeline, or if the agent posted a non-status issue comment after it. The comment stays in its original timeline position, but its body now shows both the start and completion times.
    • Two comments: If other activity—such as a human comment—came after the start and the agent did not post a qualifying issue comment, the start remains unchanged and a new completion comment is appended after that activity.
    • Completion without a start: If no start comment was created, completion is posted as a single new terminal comment when the settings and outcome call for one. If completion is disabled, the code deletes the start comment instead of leaving it showing “Started.” (statuscomment.go)
    • completion: on_failure: The start comment is suppressed. A failure, cancellation, or skip gets a standalone completion comment; success gets none. (statuscomment.go, statuscomment.go)

    The review agent’s sticky findings comment is an ordinary PR issue comment, so it can trigger the “agent posted output” rule. Formal PR reviews and inline review comments are separate review objects; the placement check lists issue comments. (postreview.go, github.go)

    What’s in each body

    • Start: Hidden run marker, agent label, start time in UTC, and—when available—a short commit SHA and safe HTTPS workflow link.
    • Completion: Hidden run and terminal markers, agent label, outcome and completion time, plus the original start time. Failure details or skip reasons may follow the outcome; the body can also include runtime, model, effort, cost, and review-specific cancellation guidance. (statuscomment.go, run.go)

    So your understanding is right: a run can edit one status comment to represent both start and end, or leave the start comment and append a separate end comment, depending on intervening issue-comment activity.

    The start time is captured when PostStart runs, before it attempts to post the start comment. The start body then shows that time in UTC, to the minute. (statuscomment.go, statuscomment.go)

    The completion time is captured when PostCompletionWithDetail begins, before it checks the timeline or writes the completion. The completion body includes both the saved start time and this completion time. (statuscomment.go, statuscomment.go)

    That means:

    • One comment: It starts with just the start time. At completion, the same comment is updated to show both times.
    • Two comments: The original start comment keeps only the start time. The appended completion comment shows both the start and completion times.
    • No start comment posted: If PostStart ran but start comments were suppressed or posting failed, the completion comment can still show both times. If status notification setup failed, neither time is posted.
  5. tpouyer commented on Dec 1, 2026

    @tpouyer
    Contributor

    @ascerra @ggallen thanks for the context, and sorry, I missed these comments before I started on this. I have a branch for parts 1 and 2 but haven't opened a PR. I'd like your ok on the approach before I do.

    On whether the "only when last" condition is enough: the branch avoids that problem by going the other way. Instead of writing the result into the start comment, it writes the status into the result comment.

    • The start comment is posted as it is today, so a running run still shows up.
    • The agent posts its result as a new comment at the end of the thread, as it does today.
    • At completion, the runner rewrites that result comment to add the Finished / Failed line, with the run details folded in a <details> section. Then it deletes the start comment.

    The result stays where it was posted, at the end of the thread. If the agent posts no result, or the rewrite fails, completion works the same way it does now.

    @ggallen on custom agents: the change is in internal/statuscomment, so it applies to any agent whose post step leaves an issue comment. The result body is kept as posted, including its hidden markers. The existing settings still turn this off: with comment.start disabled or completion: on_failure, nothing gets merged. Folding the result body itself is left to each agent's post step.

    It also depends on #9399 (the #9334 change), so it wouldn't land before that.

    Would this shape work for you, or would you rather keep the status and the result as separate comments? If you'd rather keep them separate, I'll drop parts 1 and 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions