Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions docs/ADRs/0113-steer-the-running-agent-on-work-item-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Accepted
## Context

[ADR 0101](0101-preserve-the-agent-run-in-flight-on-work-item-updates.md) stops the
cancellation: the stage job already working on a work item is left to finish, and the newer
event waits as the single pending run the platform keeps per concurrency group. This ADR builds
on that decision and addresses what preserving alone leaves standing.
cancellation: the stage job already working on a work item is left to finish, and one run waits
behind it as the pending run — normally but not necessarily the newest event — working from the
item's current state. This ADR addresses what preserving alone leaves standing.

Three costs survive it. The run in flight finishes on the state it started with and posts output
that is already stale — a review of a commit that no longer exists, which is
Expand All @@ -47,12 +47,11 @@ to be written down.

## Decision

Steering is an **opt-in** extension of preserving, enabled per harness by the `steer:` block.
While the run in flight holds the work item it absorbs updates to that item itself — the queued
follow-up run becomes the *notification*, not the worker — so that when the queued run finally
starts it finds a receipt saying the work is done and exits. With the block absent, which is the
default everywhere, the behaviour is ADR 0101 alone and nothing more. Steering requires
preserving; the reverse is not true.
Steering is an extension of preserving that is **on by default**, with a per-harness opt-out:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] missing-authorization

The PR body frames the default-on flip as authorized by 'the 2026-09-14 decision recorded on #6957: run continuation is the default, and steering with it.' The visible #6957 discussion (two scribe-bot meeting-update comments) covers run continuation (ADR 0113's territory — not cancelling in-flight runs) but does not explicitly extend that decision to an on-by-default posture for the steering/follow-up-run watcher. This PR is itself what rewrites ADR 0101's Decision section from opt-in to on-by-default, which is normal ADR flow, but the evidentiary chain visible to an outside reviewer is thinner than the PR body's phrasing implies. There is no formally linked (Closes/Fixes) issue on this PR.

Suggested fix: Either add a comment on #6957 that explicitly extends the run-continuation decision to 'steering is on by default,' or soften the PR body's framing to present the on-by-default default as this PR's own design call built on the run-continuation decision, rather than as something #6957 already settled on its own.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] missing-authorization

The Decision section asserts steering is "on by default" as settled fact. The PR body explains this follows "the 2026-09-14 meeting recorded on #6957" and states "#6957's validation criteria still describe steering as off by default and should be read as superseded by ADR 0101" — but the PR does not add a comment to issue #6957 itself, whose Validation criteria section (confirmed live via the GitHub API) still literally reads "No stage regresses when harness.steer is off (default)," the opposite of what this PR ships. A reviewer or future contributor following the normal issue-to-ADR traceability path in this repo, without reading this PR's description, would find issue #6957 uncorrected and contradicting the new default. This is traceability hygiene rather than a live authorization gap, since ADR 0101 (edited in this PR) is the in-repo source of truth going forward.

Suggested fix: Add a comment on issue #6957 noting its Validation criteria are superseded by ADR 0101's on-by-default decision (and link the 2026-09-14 meeting record if one exists in a durable location), so the authorization trail is discoverable from the issue without relying on this PR's description.

`steer: {enabled: false}` gets ADR 0101 alone and nothing more, and an absent block is the
default, which is on. While the run in flight holds the work item it absorbs updates to that item
itself — the queued follow-up run becomes the *notification*, not the worker — so the queued run
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
Resolved
finds a receipt saying the work is done and exits. Steering requires preserving, not the reverse.

The runner learns about an update by listing the execution platform's own run records for its
shim, verifies each candidate's **provenance** against server-side fields the sender cannot
Expand All @@ -65,12 +64,13 @@ After the run, the runner posts a processing receipt as its own comment naming t
it consumed, and a queued run that finds its own id in one exits without starting the agent. The
terminal status comment keeps an informational copy of the marker, which the skip check does not
honour. The receipt is load-bearing rather than an optimization: without one, steering costs
*more* than cancelling does today, since the run in flight absorbs the push and reviews the new
head, and the queued run then reviews that same head again. **Steering may not be enabled
*more* than preserving alone — the run in flight absorbs the push and reviews the new head,
and the queued run then reviews that same head again. **Steering may not be enabled
anywhere until receipts are authenticated by a channel that agents and post-scripts cannot
mint** — a forged receipt drops the update silently rather than merely wasting it. That channel
is the GitHub Actions job token: minting swaps it out of the environment before the sandbox
exists, so the runner alone holds it, and both writing and reading happen under its identity.
is the GitHub Actions job token: minting swaps it out before the sandbox exists, so the runner
alone holds it and reads and writes receipts under its identity — which satisfies the
precondition and is why the default is on rather than a switch each harness must find.

This precondition, like the rest of the rollout order, is guidance a human judges before enabling
steering; the binary does not enforce it.
Expand Down Expand Up @@ -98,16 +98,16 @@ contract with the fleet agent definitions, versioned in
## Consequences

- A burst of events on one work item produces one agent run that absorbs them plus at most one
short follow-up, instead of a full re-run per event — but only once the receipt is
authenticated, since the follow-up is only short if it can trust a receipt to skip on.
short follow-up, instead of a full re-run per event.
- Agents stop posting output computed from state the subject has already moved past, which is the
complaint in [#1207](https://github.com/fullsend-ai/fullsend/issues/1207).
- The runner gains a dependency on the execution platform's run records and its per-stage
`actions: write` grant, and steering is unavailable on any platform that exposes neither.
- A run now holds its sandbox until it settles rather than ending at its first result, so a
steered run occupies a VM longer and can cost as much again per absorbed update.
- Nothing changes for a repository that does not opt in, and the fallback in every failure path —
no ack, no time left, cap reached, runtime cannot steer — is ADR 0101 on its own.
- Every repository steers on the release that carries this unless a harness opts out; an opt-out,
and every failure path — no ack, no time left, cap reached, runtime cannot steer — is ADR 0101
on its own.

Related: [#5445](https://github.com/fullsend-ai/fullsend/issues/5445) and
[#2388](https://github.com/fullsend-ai/fullsend/issues/2388) — `/fs-cancel` gains a second
Expand Down
9 changes: 5 additions & 4 deletions docs/agents/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ The fix agent enforces iteration caps to prevent infinite review-fix loops:
not cancel it: that run finishes, and the new dispatch waits as the single
pending run (normally but not necessarily the newest event), then works from
the PR's current state ([ADR 0101](../ADRs/0101-preserve-the-agent-run-in-flight-on-work-item-updates.md)).
With steering enabled
([ADR 0113](../ADRs/0113-steer-the-running-agent-on-work-item-updates.md))
the in-flight run also absorbs the comment, and the run the comment queued
exits rather than repeating the work. Steering is off by default.
That run also absorbs the comment
([ADR 0113](../ADRs/0113-steer-the-running-agent-on-work-item-updates.md)),
and the run the comment queued exits rather than repeating the work. A
harness that opts out with `steer: {enabled: false}` skips the absorb only —
everything above still holds, and the queued run does the work.

## How it helps

Expand Down
8 changes: 4 additions & 4 deletions docs/agents/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Requires triage-level repository permission or higher (triage, write,
maintain, or admin). Mutation stages such as `/fs-fix` still require
write or higher.

The `/fs-review` command does not accept arguments when it starts a run. Where the agent
has steering enabled (`steer.enabled` in its harness), a `/fs-review` comment posted while a
review is already in flight is different: the run absorbs it and the text after the command
reaches the running agent as an amendment to its task.
The `/fs-review` command does not accept arguments when it starts a run. A `/fs-review`
comment posted while a review is already in flight is different: the run absorbs it and the
text after the command reaches the running agent as an amendment to its task. That is the
default; a harness that sets `steer: {enabled: false}` queues a fresh run instead.

The review agent also runs automatically when a PR is opened, synchronized (new commits
pushed), or moved out of draft by a user with triage-level repository permission or higher.
Expand Down
8 changes: 4 additions & 4 deletions docs/agents/triage.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ maintain, or admin). Mutation stages such as `/fs-code` still require
write or higher.

The `/fs-triage` command does not accept arguments when it starts a run — it re-evaluates
the issue using current content, comments, and any prior triage analysis. Where the agent has
steering enabled (`steer.enabled` in its harness), a `/fs-triage` comment posted while triage
is already in flight is different: the run absorbs it and the text after the command reaches
the running agent as an amendment to its task.
the issue using current content, comments, and any prior triage analysis. A `/fs-triage`
comment posted while triage is already in flight is different: the run absorbs it and the
text after the command reaches the running agent as an amendment to its task. That is the
default; a harness that sets `steer: {enabled: false}` queues a fresh run instead.

Triage also runs automatically when a new issue is opened or edited by a
user with triage-level permission or higher, and when the `ready-for-triage`
Expand Down
5 changes: 3 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ The existing design principle is that [the repo is the coordinator](problems/age
authorized it, and delivers the delta into the live session through the
optional `runtime.Steerer` capability; the terminal status comment then
carries a processing receipt naming what was absorbed, which is how the queued
run knows to skip. Opt-in per agent and per repository; off, behaviour is
unchanged ([ADR 0113](ADRs/0113-steer-the-running-agent-on-work-item-updates.md),
run knows to skip. On by default; a harness opts out with
`steer: {enabled: false}` and gets ADR 0101 alone
([ADR 0113](ADRs/0113-steer-the-running-agent-on-work-item-updates.md),
mechanics in [steering.md](contributing/steering.md)).
- Routing moves from workflow bash to harness CEL `trigger` expressions
evaluated by `fullsend dispatch` with pluggable input/output drivers
Expand Down
4 changes: 3 additions & 1 deletion docs/cli/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ find .fullsend -type f | sort
```

Only `agents/lint-docs.md` needs your attention — it is the agent's prompt and
it ships with marked sections to fill in. Everything else is complete.
it ships with marked sections to fill in, plus a Runner updates section that
already teaches the agent to act on a mid-run amendment from the runner.
Everything else is complete.

### What gets written

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/harness-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Two independent precedence axes govern field resolution
| `api_servers` | Concatenated (base + child) | Absent (nil) = inherit |
| `env` | Sub-maps (`runner`, `sandbox`) merged independently; forge/child keys win (ADR-0055) | Absent (nil) = inherit |
| `security` | Child replaces base entirely (if non-nil) | Absent (nil) = inherit |
| `steer` | Child replaces base entirely (if non-nil) | Absent (nil) = inherit; a child setting `steer:` gets the defaults for any key it omits, not the base's values |
| `steer` | Child replaces base entirely (if non-nil) | Absent (nil) = inherit the base's whole block, including an `enabled: false` opt-out; a child setting `steer:` gets the defaults for any key it omits, not the base's values |
| `overlays` | Concatenated (base + child); all matching entries merged at resolution with later precedence (ADR-0088) | Absent (nil) = inherit |

## `ForgeConfig` struct
Expand Down
66 changes: 44 additions & 22 deletions docs/contributing/steering.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Steering a run in flight

How a fullsend run already working on a work item absorbs an update to that
item — a push, a comment, a stage command — instead of being cancelled and
restarted, and how the run queued behind it learns the work is done.
item — a push, a comment, a stage command — rather than leaving it for the run
queued behind it, and how that queued run learns the work is done.

This page is the contributor reference for the mechanics.
[ADR 0113](../ADRs/0113-steer-the-running-agent-on-work-item-updates.md) is the
Expand Down Expand Up @@ -39,7 +39,8 @@ concurrency:
cancel-in-progress: false
```

so the active run always finishes while one run waits behind it as the single pending run
so the active run always finishes while one run waits behind it as the pending run — normally but
not necessarily the newest event — and works from the item's current state
([ADR 0101](../ADRs/0101-preserve-the-agent-run-in-flight-on-work-item-updates.md)). Whether that
surviving run is *steered* is decided here, by the harness `steer:` block. Preserving is useful on
its own and is the base change's whole subject; steering builds on it.
Expand Down Expand Up @@ -351,18 +352,26 @@ is the change to make.

## Configuration

Per-agent, default off, because enabling it changes how long a run holds its VM:
Per-agent, on by default. A harness that says nothing about `steer:` steers; so does one that
sets only a cap or a cadence. Turning it off takes the key by name:

```yaml
steer:
enabled: true # default: false
enabled: false # default: true — this is the opt-out
max_steers: 2 # default: 2
poll_interval_seconds: 30 # default: 30
```

The runner sets `RunParams.Steerable` only when all of: the harness opted in, the runtime
`enabled` is a pointer internally for exactly this reason: absent and `false` have to mean
different things, so `steer: {max_steers: 3}` cannot silently opt a harness out while it is
trying to raise the cap.

The runner sets `RunParams.Steerable` only when all of: the harness has not opted out, the runtime
implements `Steerer`, and the job is a GitHub Actions run. Otherwise `Steerable` stays false and
`Run` is single-turn exactly as today.
`Run` is single-turn exactly as before. The runner announces a declined watch only when the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] docs-inconsistency

steering.md states the runner announces a declined watch only when 'the harness named steering itself.' The actual code condition, SteerExplicitlyEnabled() in internal/cli/steer.go, is narrower: true only when enabled is an explicit true, not merely when a steer: block is present with other keys set (e.g. max_steers). steer: {max_steers: 3} — which does 'name steering' by tuning its cap — stays silent on a declined watch under the code, per the new TestStartSteerWatcherDeclineMessage case. docs/reference/harness-reference.md's wording ('only when the harness set enabled: true') matches the code correctly.

Suggested fix: Align steering.md's wording with harness-reference.md and the code: the warning fires only when the harness explicitly sets enabled: true, not merely when it includes any steer: block.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] docs-inconsistency

This sentence ("The runner announces a declined watch only when the harness set enabled: true itself...") and a similarly absolute sentence in docs/reference/harness-reference.md omit the environment-defect exception. internal/cli/steer.go's steerDecline.defect classification means a missing job token or GITHUB_RUN_ID on an otherwise-eligible GitHub Actions run is unconditionally announced via StepWarn, regardless of whether enabled: true was explicitly set — pinned by TestStartSteerWatcherAnnouncesEnvironmentDefects.

Suggested fix: Clarify in both documents that ordinary declines are announced only when enabled: true is explicit, but environment defects (missing job token or run id) are always announced regardless of harness configuration.

harness set `enabled: true` itself — a block that sets only a cap or a cadence stays quiet, since
with the default on most declines are ordinary conditions rather than misconfiguration. A missing
job token or `GITHUB_RUN_ID` is always announced.

## What changes for each stage

Expand Down Expand Up @@ -396,8 +405,8 @@ possible follow-up, not part of this decision.

**GitLab is not wired.** GitLab pipelines already queue rather than cancel, and the provenance
join is different — `GET /pipelines/:id/variables` exposes the poller-set `STAGE` and
`RESOURCE_KEY`, already covered by the HMAC dispatch signature. The watcher is GitHub-only for now
and says so when it declines to start.
`RESOURCE_KEY`, already covered by the HMAC dispatch signature. The watcher is GitHub-only for now,
and on GitLab it declines quietly unless the harness set `enabled: true` itself.

**A steer needs time left.** The exec hosting a live session cannot be extended once running, so
the watcher settles rather than steering when less than `MinRemaining` (default five minutes) of
Expand All @@ -423,16 +432,29 @@ This precondition, like the rest of the rollout order, is judged by the people w
steering; nothing in the binary enforces it.

The receipt is load-bearing rather than an optimization. Without one, steering costs *more* than
cancelling does today: the active run absorbs the push and reviews head B, then the queued run
reviews head B again — two reviews where cancel-and-restart produces one. So the skip check and
the authenticity it depends on ship together, or neither ships.

Once that holds, the harness `steer:` block is the only switch. With it off, a repository sits in
exactly the base change's state, where the run in flight finishes and the queued run does the
work from the item's current state. Nothing is half-enabled, so a repository can sit there
indefinitely, which is where every repository starts.

Steering is the second step and needs its own preconditions met: the fleet agent definitions
([fullsend-ai/agents#1163](https://github.com/fullsend-ai/agents/issues/1163)) merged, since the
envelope's shape changed; one real steer of each runtime observed on OpenShell; and the
authenticated receipt above. Then `steer:` goes on one harness at a time.
preserving alone: the active run absorbs the push and reviews head B, then the queued run reviews
head B again — two reviews of the same head where preserving alone produces one. So the skip
check and the authenticity it depends on ship together, or neither ships.

Once that holds, the harness `steer:` block is the only switch, and it is now on by default:
steering arrives with the release that carries it rather than one harness at a time. A harness
that opts out with `enabled: false` sits in exactly the base change's state, where the run in
flight finishes and the queued run does the work from the item's current state. Nothing is
half-enabled, so a harness can sit there indefinitely.

The preconditions this ordering existed to impose are not waived by moving the switch; they are
what the people cutting the release check by hand, since nothing in the binary enforces them.
The authenticated receipt ships in the change below this one. Still open at the time of
writing: the fleet agent definitions
([fullsend-ai/agents#1163](https://github.com/fullsend-ai/agents/pull/1163)) are unmerged, so
the agents have not yet been taught the envelope; each runtime's transport has been driven in
isolation, but no end-to-end steer inside OpenShell from a real workflow run has been observed;
the receipt's identity match has not been seen on a live run; and that same PR teaches the
envelope to code, fix, review and triage only, so prioritize, retro and scribe must either learn
the contract or set `steer: {enabled: false}` before the default reaches them — an eligible run
on a definition that ignores the envelope still acks the delivery and still posts a receipt, so
the queued run skips and the update is dropped silently, which is the one failure mode this
design may not have. All four belong before the default reaches a release. Agents that
`fullsend agent new` scaffolds from here on carry the contract in their generated body; ones
scaffolded earlier must be regenerated to gain it, and neither changes the fleet definitions
above.
10 changes: 5 additions & 5 deletions docs/guides/user/bugfix-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ You can control the pipeline from issue or PR comments:
| `/fs-retro` | Issue or PR comment | Triggers a retrospective analysis of the workflow |

If the stage you name is already running on that item, your comment reaches
the agent mid-run instead of cancelling it: an authorized `/fs-review` or
the agent mid-run rather than waiting behind it: an authorized `/fs-review` or
`/fs-fix` while that stage is in flight is delivered to the running agent,
and the run your comment queued then exits rather than repeating the work.
This needs steering enabled for the repository
([ADR 0113](../../ADRs/0113-steer-the-running-agent-on-work-item-updates.md));
without it the comment queues a fresh run as it always has.
and the run your comment queued then exits rather than repeating the work
([ADR 0113](../../ADRs/0113-steer-the-running-agent-on-work-item-updates.md)).
An agent whose harness opts out with `steer: {enabled: false}` queues a fresh
run instead, as it always has.

Authorization is verified via the collaborator permission API and is
stage-dependent: `/fs-triage` and `/fs-review` accept triage-level
Expand Down
Loading
Loading