Skip to content

triage: never let the agent's label_actions add ready-for-triage #2082

Description

@tpouyer

Problem

The triage agent's result can ask the post-script to add or remove labels on the issue it triaged (label_actions). scripts/post-triage.src.sh refuses pipeline labels there through CONTROL_LABELS and is_control_label (needs-info, ready-to-code, duplicate, feature, blocked, triaged, question, bug, documentation, not-planned, completed, pr-open), so the agent can't set them itself.

ready-for-triage isn't on that list, and adding it to an issue dispatches triage (the routing in docs/triage.md "Triggers", and the CEL trigger: in harness/triage.yaml, which accepts the label from a human or a bot). So a result with label_actions: [{"action": "add", "label": "ready-for-triage"}] gets the label applied and starts another triage run on the same issue. That run can do the same, through a model mistake or a prompt injection in the issue text, so triage can re-trigger itself repeatedly.

The post-script's own use of the label is legitimate and separate: it labels the sub-issues it creates with ready-for-triage through the *-triage-ops.lib.sh helpers (github-triage-ops.lib.sh, gitlab-triage-ops.lib.sh, jira-triage-ops.lib.sh), not through label_actions.

Found in review of #2079.

What should change

  • Refuse ready-for-triage in label_actions, as the other pipeline labels are, on GitHub, GitLab and Jira.
  • Check whether any other label that dispatches an agent from a triage result has the same gap, and refuse it too if it can loop.
  • Keep the post-script's own sub-issue labelling unchanged.

Done when

  • A triage result asking to add ready-for-triage (or remove it) leaves the label untouched and the run reports it as not applied, like other control labels.
  • scripts/post-triage-test.sh covers it on each tracker, and sub-issue labelling still passes.

Activity

  1. self-assigned this
    on Nov 18, 2026
  2. fullsend-ai-triage commented on Nov 18, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 5:48 AM UTC · Completed 5:51 AM UTC

    Commit: 22ab92e · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.21

  3. added
    bug
    ready-to-code
    on Nov 18, 2026
  4. fullsend-ai-triage commented on Nov 18, 2026

    @fullsend-ai-triage

    Triage found the issue ready for implementation.

    Findings beyond the report

    • The label_actions guard is a single shared code path in the post-triage script, so one change to the control-label list covers GitHub, GitLab, and Jira. Tests still need to cover each tracker, as the issue requires.
    • Check of other agent-dispatching labels: ready-to-code is already guarded; ready-for-review dispatches review on PRs, while triage label_actions apply to the triaged issue, so it does not form a triage loop; the fix agent's labels are PR-scoped. No other label appears to share the gap, but the implementer should re-confirm.
    • Related, separate problem: the control-label comparison is case-sensitive (tracked in post-review/post-triage control-label guard is case-sensitive; agent-recommended removes can strip pipeline labels like requires-manual-review #1682), so a differently-cased spelling may not be caught by the new entry either. This is not a blocker for this fix.

    Proposed test case

    For each tracker (GitHub, GitLab, Jira):
      result.label_actions = add "ready-for-triage"  -> warning "Refused to add control label", label untouched
      result.label_actions = remove "ready-for-triage" -> warning "Refused to remove control label", label untouched
      split action still labels created sub-issues with ready-for-triage
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  5. fullsend-ai-coder commented on Nov 18, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 5:53 AM UTC · Completed 6:03 AM UTC

    Commit: 22ab92e · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $1.62

  6. added a commit that references this issue on Nov 19, 2026
    0de8ef6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugready-to-code

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions