Skip to content

A command can choose its Security review's Harness, overriding security.harness #2215

Open

Description

@JacobStephens2

This was generated by AI during triage.

Problem

security.harness is set once per machine, in the User config. Every Command on that machine runs its Security review on that Harness, whatever repository it works on. Nothing on the command line can change that.

This came up on 2026-11-14, when Grok Build's balance ran out. The tourbot work needed Claude Code for its sessions and Antigravity (agy) for its Security reviews. The thirdshift and manager-tourbots work on the same hosts needed a different split. The cron lines could choose the tourbot Harness with harness claude, but its Security Harness could only change for the whole host. Setting security.harness = "agy" on factory therefore also moved the Security reviews for the thirdshift and manager-tourbots work there.

The request: the command chooses both Harnesses, and the command wins over the User config.

What already exists

  • Default Harness: a command's harness <name> (or --harness) already wins over harness.default. The guide says "the command wins, then the User config, then the default" (docs/guide.md, Harness section). Nothing is needed here beyond confirming it still holds when harness.routes is set.
  • Security run: a secure command's harness <name> already wins over security.harness. The config comment says it applies "unless its command names one".
  • Security review: has no command-level choice. ADR 0021 considered "a command word for the review's Harness" and left it out because "the choice is about this machine's Harnesses … which is the User config's to say". This issue asks to revisit that, now that one machine serves several repositories that need different Security Harnesses.

Proposed behaviour

  • A new command word, for example security-harness <name> (or --security-harness), on every command that can run a Security review: a Ticket run, pickup, review, fix, architect without --plan-only, a Spec run and a Base fix.
  • Precedence for a Security review: the command's word, then security.harness, then the Command's own Harness. This mirrors the existing order for harness.
  • On secure, the new word means the same as harness. If a command names both with different values, it's an argument error, so the precedence is never ambiguous.
  • The review uses the chosen Harness's [harness.<name>] Model and Effort, as ADR 0021 does today.
  • ADR 0021's fallback is unchanged. If the named Security Harness can't start, the review falls back to the Command's default Harness, with the same warning.
  • A Spec run passes the choice to every Ticket and to the Spec PR's review. A Continuation or Recovery command reproduces it, which means the choice must now be recorded with the Command, because the User config no longer settles it.
  • The Command log, the Session trace and the Run notification name the Harness the review ran on, as now.

Open questions

  • Should there also be security-model and security-effort words, or is the [harness.<name>] section enough?
  • Should the word override security.routes too, or only the first choice before the routes are tried?
  • Is a repository-level setting a better fit than a command word? An example would be a [security] harness read from the repository's own config. Cron lines already set the Harness per repository, which favours the command word.

Acceptance criteria

  • thirdshift pickup base master harness claude security-harness agy runs implement sessions on Claude Code and the Security review on agy, on a machine whose security.harness is claude.
  • A command without the word behaves exactly as today.
  • ADR 0021 is amended, or a new ADR replaces its "command word" decision. The User config and Harness sections of docs/guide.md describe the new precedence.

Activity

  1. added
    enhancement
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 14, 2026
  2. JacobStephens2 commented on Nov 14, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Investigation summary

    This request reverses a recorded decision and leaves design questions open, so the Day shift must decide before an agent builds it. Once decided, it is a single Ticket; no split is needed.

    Confirmed in the code (Base main, 5372181)

    • No command-level choice exists today. Flags::security_review_harness (src/asks.rs:186-198) takes the Security review's Harness only from config.security_harness, "whatever the command's harness, model and effort words asked". The Run and the router read the same value: src/processes.rs:258 and src/plan_usage.rs:308 both call Choice::of_security_review(config.security_harness, &config.harness).
    • A secure command's harness already wins over security.harness. Flags::security_harness (src/asks.rs:262-275) shows this, as the issue says.
    • ADR 0021 rejects a command word on purpose. Its reasons: the choice "is the User config's to say", and "a Continuation reads the same User config, so the Recovery command needs no new word to reproduce the choice". src/recovery.rs:198-253 depends on that: it adds a line saying the Harness was "chosen by security.harness in the User config" and leaves the Recovery command without any security word. A command word means the Continuation or Recovery command (args::continuation) must carry it.
    • Routing already has a rule for command choices. Router::of (src/plan_usage/router.rs:78-125) routes only choices the User config made (ChosenBy::SecurityConfig or ChosenBy::Routes). "A Harness or Model named by a command or a Step stays pinned": it keeps only its fallback to harness.default when it can't start. That is open question 2's answer if the existing convention is kept.
    • The Console must offer the word too. The Console's Start controls already choose the Security Harness (src/console/start_controls.rs:334-336), and ADR 0026 requires /api/v1 to do what the CLI can.
    • No duplicate. No open issue covers this. Codex refuses security-fix Tickets in the implement session; route them to security.harness or reroute after a refusal #2153, routing security-fix implement sessions, is related but separate.

    Decisions for the Day shift

    1. Reverse ADR 0021's "command word" decision, or not? The alternative is a repository-level [security] harness. Recommendation: the command word, because cron lines already choose a Harness per repository. Record it in a new ADR that supersedes that part of 0021.
    2. Add security-model and security-effort words? Recommendation: not now. The [harness.<name>] Model and Effort are enough, matching ADR 0021.
    3. Does the word override security.routes? Recommendation: yes, it pins the review. Mark it ChosenBy::Command, so Router::of skips security.routes, the same way the harness word pins ordinary sessions. ADR 0021/Check the Security review's Harness at preflight and fall back to the default Harness when it can't be used #975's fallback to harness.default stays.
    4. On secure, what if harness and security-harness differ? Recommendation: an argument error, as the issue proposes.

    Ticket scope once decided

    • Parse security-harness <name> / --security-harness on every command that can run a Security review: Ticket run, pickup, review, fix, architect without --plan-only, Spec run, Base fix.
    • Store it in Flags. Make security_review_harness and Router::of prefer it over config.security_harness.
    • Carry it into each Ticket of a Spec run and into the Spec PR review.
    • Write it into the Continuation and Recovery command, and update the Recovery line in src/recovery.rs.
    • Add it to the Console Start controls and API.
    • Name the new source in ChosenBy's description (src/harness.rs:397), the Command log and the Session trace.
    • Update the User config and Harness sections of docs/guide.md, then regenerate site/docs.
    • Search site/how-it-works/ and site/architecture/ for security.harness and fix what they say.
    • Tests in src/asks.rs (next to a_security_review_runs_on_security_harness_with_its_own_settings_whatever_the_command_asked) and src/plan_usage/router.rs. Cover the issue's acceptance case: pickup ... harness claude security-harness agy on a machine with security.harness = "claude".

    Acceptance criteria as in the issue.

  3. added
    ready-for-human
    and removed
    in-progress
    on Nov 14, 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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions