Skip to content

Triage run: a session can label its own issue ready-for-agent with the user's gh login #1725

Open

Description

@JacobStephens2

A Triage run's session can still label an issue ready-for-agent itself, and thirdshift never takes the label off. The session holds the user's gh login, so a Report that steers it can do what Q1.12 of the #706/#1323 grilling held back by default: put an issue where the next Pickup run builds and possibly Self-merges it, with nobody reading anything. The Spec review of PR #1715 (Spec #1323) raised this, and the PR leaves the decision here.

Evidence

The review's test, run on issue-1323 at 9c73bb8, has the fake session file an issue itself and then recommend nothing:

scenario.repo_has_labels(&["bug", "ready-for-agent"]);
scenario.agent_does(&format!(
    "gh issue create --title 'Handle an empty cache' --body 'Filed by the session.' --label bug,ready-for-agent > /dev/null || true\n{}",
    recommendation_script(r#"{"category":"bug","state":"ready-for-agent","issues":[],"investigation":"The session filed the empty-cache problem itself."}"#)
));
let result = scenario.run_with_input(&["triage"], REPORT);
assert!(!scenario.issue_labels(8).iter().any(|label| label.eq_ignore_ascii_case("ready-for-agent")));

It fails: ready-for-agent kept without permission on #8: ["bug", "ready-for-agent"]; exit Some(0).

  • src/triage.rs (check_publication, publish): thirdshift files every issue from the session's final Triage recommendation: line and applies needs-triage in place of ready-for-agent unless --allow-ready-for-agent or triage.allow_ready_for_agent permits it. It never reads back what the session itself did on GitHub.
  • src/prompt.rs (triage) and skills/thirdshift-triage/SKILL.md tell the session to write nothing to GitHub. That is a prompt rule, not a wall.
  • The session keeps the user's GitHub login in both launches. The ordinary launch is the fully trusted Harness of ADR 0013, and the --read-machine sandbox links ~/.config/gh into its private home (src/sandbox/triage.rs, prepare_home) without --clearenv.

Why the Day shift has to decide

Spec #1323 has the session file and report its issues, then thirdshift remove ready-for-agent from "any issue it filed". The Spec branch moved filing into thirdshift instead, so thirdshift never applies a label it isn't allowed to (US 11). Neither model catches a session that writes to GitHub without reporting it, and closing that gap changes the trust model ADR 0013 records:

  1. Amend Spec Triage run: turn a Report into triaged issues #1323 to say thirdshift files, and accept ADR 0013's trust in the session for GitHub writes, as for every other Harness session.
  2. Sweep after the session: swap ready-for-agent for needs-triage on any issue created or labelled during the run. It is cheap, but it would also strip readiness that a concurrent Architect run, Security run or the Day shift applied in the same window, and a session that labels an existing issue instead still gets through.
  3. Narrow the session's GitHub access, as Keep text from strangers out of agent sessions #511 proposes for every session: a read-only or repository-scoped token, or thirdshift reading the open issues for the session so it needs no login at all.

I lean toward 1 now and 3 with #511, because 2 trades a rare attack for a common false positive. Related: #511, #1701.

Activity

  1. added
    needs-triage
    ready-for-human
    and removed
    needs-triage
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions