What is wrong: a task is one row per work item, and every requeue bumps attempt on the next claim. A workflow.handoff (triage to implement), an approved plan continuing, a review-gate answer and a remediation round all show as new attempts of one run, so the task page lists triage and implement as attempt 1 and 2, mixed with real retries.
Wanted (maintainer decision): a handoff ends the current run and starts a separate run of the next workflow, linked to it. Attempts mean retries of one run only.
Constraint found: the run and the work item are the same row. tasks is unique on (org, identity, owner, repo, issue_number), and the issue number is what forge steps use (close issue, Implements #n, branch name). workflow.call children dodge the constraint with synthetic chat issue numbers, which would cut a handed-off implement run off from its issue. So this needs the run split from the work item (or the uniqueness keyed by run), not a step change.
Done when:
a handoff leaves the triage run finished and a new linked implement run on the same issue, each with its own attempt 1;
forge steps in the new run still reference the original issue;
the task page shows the linked runs and their order;
retry semantics and limits are unchanged.
**What is wrong:** a task is one row per work item, and every requeue bumps `attempt` on the next claim. A `workflow.handoff` (triage to implement), an approved plan continuing, a review-gate answer and a remediation round all show as new attempts of one run, so the task page lists triage and implement as attempt 1 and 2, mixed with real retries.
**Wanted (maintainer decision):** a handoff ends the current run and starts a separate run of the next workflow, linked to it. Attempts mean retries of one run only.
**Constraint found:** the run and the work item are the same row. `tasks` is unique on (org, identity, owner, repo, issue_number), and the issue number is what forge steps use (close issue, `Implements #n`, branch name). `workflow.call` children dodge the constraint with synthetic chat issue numbers, which would cut a handed-off implement run off from its issue. So this needs the run split from the work item (or the uniqueness keyed by run), not a step change.
**Done when:**
- a handoff leaves the triage run finished and a new linked implement run on the same issue, each with its own attempt 1;
- forge steps in the new run still reference the original issue;
- the task page shows the linked runs and their order;
- retry semantics and limits are unchanged.
Landed in c30624a5 and deployed. Migration 0068 adds handoff_from_task_id/handoff_to_task_id and keys the item uniqueness on the current run only. A handoff is one State Store transaction (HandoffTask RPC): the run goes running to completed, points at its successor, and the successor is inserted queued on the same issue with the item's title, body, labels, inputs and plan; attempts, branch and outputs start fresh. TaskByIssue, EnqueueIssue dedupe and chat outcome posting follow the current run; worktree cleanup and archive leave a successor's worktree alone. The task page links "Continues task #n" / "Handed off to task #n". Verified against the e2e Postgres (completed + linked successor, TaskByIssue returns the successor, a second handoff is refused) and in the browser. Not yet seen on a live triage run.
Landed in c30624a5 and deployed. Migration 0068 adds handoff_from_task_id/handoff_to_task_id and keys the item uniqueness on the current run only. A handoff is one State Store transaction (HandoffTask RPC): the run goes running to completed, points at its successor, and the successor is inserted queued on the same issue with the item's title, body, labels, inputs and plan; attempts, branch and outputs start fresh. TaskByIssue, EnqueueIssue dedupe and chat outcome posting follow the current run; worktree cleanup and archive leave a successor's worktree alone. The task page links "Continues task #n" / "Handed off to task #n". Verified against the e2e Postgres (completed + linked successor, TaskByIssue returns the successor, a second handoff is refused) and in the browser. Not yet seen on a live triage run.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What is wrong: a task is one row per work item, and every requeue bumps
attempton the next claim. Aworkflow.handoff(triage to implement), an approved plan continuing, a review-gate answer and a remediation round all show as new attempts of one run, so the task page lists triage and implement as attempt 1 and 2, mixed with real retries.Wanted (maintainer decision): a handoff ends the current run and starts a separate run of the next workflow, linked to it. Attempts mean retries of one run only.
Constraint found: the run and the work item are the same row.
tasksis unique on (org, identity, owner, repo, issue_number), and the issue number is what forge steps use (close issue,Implements #n, branch name).workflow.callchildren dodge the constraint with synthetic chat issue numbers, which would cut a handed-off implement run off from its issue. So this needs the run split from the work item (or the uniqueness keyed by run), not a step change.Done when:
Landed in
c30624a5and deployed. Migration 0068 adds handoff_from_task_id/handoff_to_task_id and keys the item uniqueness on the current run only. A handoff is one State Store transaction (HandoffTask RPC): the run goes running to completed, points at its successor, and the successor is inserted queued on the same issue with the item's title, body, labels, inputs and plan; attempts, branch and outputs start fresh. TaskByIssue, EnqueueIssue dedupe and chat outcome posting follow the current run; worktree cleanup and archive leave a successor's worktree alone. The task page links "Continues task #n" / "Handed off to task #n". Verified against the e2e Postgres (completed + linked successor, TaskByIssue returns the successor, a second handoff is refused) and in the browser. Not yet seen on a live triage run.