Skip to content

Linear: follow-up @bgagent comment on a PR-less completed task is silently dropped — should start new work #614

Description

@isadeks

Problem

A follow-up @bgagent <request> comment on a completed Linear task that opened no PR is silently dropped — no reaction, no reply, nothing — even when the repo is known.

handleStandaloneCommentTrigger (cdk/src/handlers/linear-webhook-processor.ts, ~L2408-2421) is iteration-only: it resolves the task, finds prNumber === null, checks for a clarify-hold, and if it isn't one it returns with only an info log:

A6 comment (standalone): ABCA task has no resolvable PR/repo — cannot iterate (has_repo: true)

The comment is treated as "iterate on an existing PR," but a follow-up like "add a one liner to the readme" is brand-new work, not an iteration. There is no branch for that.

Why this is real (not a test artifact)

A task completes PR-less in several genuinely reachable ways:

  1. No change needed — requested change already exists / nothing to commit (code_changed=false, success, no PR).
  2. Failed before committing — out of turns / build broke / errored before the PR step.
  3. Question / investigation task — deliverable is an answer, not code.

All three hit pr_number === null → same silent dead-end, even though the repo is known (has_repo: true).

Proposed fix

When the task has no PR and it is not a clarify-hold, and task.repo + task.user_id are present and the comment carries instruction text, dispatch a fresh coding/new-task-v1 against task.repo using the comment text as the description — reusing the existing 👀-ack + threaded-reply (postIterationAck) + idempotency scaffolding already present in the clarify-resume path (maybeResumeClarifyHold, ~L2543) and the iteration path (~L2451).

Edge cases:

  • Bare @bgagent with no instruction text → no dispatch (nothing to act on), but a short threaded reply so it isn't silent.
  • No task.repo → keep the existing no-op log (genuinely can't act).
  • Idempotency keyed on (issue, comment) so a webhook redelivery doesn't double-dispatch.

Acceptance

  • Follow-up @bgagent <request> on a PR-less completed task with a known repo → new coding/new-task-v1 dispatched; 👀 reaction + threaded "On it" reply posted.
  • Bare @bgagent (no instruction) → short reply, no dispatch.
  • Clarify-hold path unchanged; iteration (has-PR) path unchanged.
  • Idempotent on webhook redelivery.

Tracked as Linear ABCA-706. Diagnosed live on demo-abca DEM-37 (the "no feedback" report was the completed loop firing correctly; the actual silence was the follow-up comments hitting this dead-end).

Metadata

Metadata

Assignees

Labels

approvedWhen an issue has been approved and readyenhancementNew feature or request

Type

No type

Fields

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