Skip to content

112. Harness overlays may set any harness field ​

Date: 2026-10-01

Status ​

Accepted

Context ​

Harness overlays: (ADR 0088) change a harness per event through a CEL when:, but only for the forge-oriented fields in the harness field reference. model, effort, timeout_minutes, image and the other top-level-only fields cannot vary per event, which blocks per-task routing (cheaper runs on trivial changes, #5777, #2842, agents#497; deeper review on security signals, agents#535) for no reason except that overlays began as a forge mechanism.

Overlays can already set policy, providers and env from any event field, and the normalized event is gaining change facts the author shapes, so which inputs may set a security-relevant field needs deciding.

Options ​

  • A separate routing: policy in .fullsend/config.yaml (#7808): it also routes the runtime, but adds a second conditional mechanism.
  • Per-prompt routing in the sandbox (#6361), rejected: it reads author-controlled prompts and loses the prompt cache mid-loop.
  • Overlays set any field, chosen: routing and every other conditional setting reuse one mechanism.

Decision ​

  1. Any field. An overlay may set any harness field except base, trigger, overlays, slug and the deprecated forge, which decide how a harness is found, composed or dispatched and stay top level. Fields merge as the harness field reference describes for overlays, so a child's own top-level value still wins. ADR 0091's precedence is unchanged: flags, FULLSEND_* variables and the agent's agents: entry still beat a value an overlay set.
  2. Inputs. when: expressions read the normalized event, including the change facts its spec adds, the entity and nullable event of ADR 0098, and a new runtime.attempt: how many times the runner has started this harness for the same entity.
  3. Guarded fields. Every field is guarded except the routing fields model, effort, models, efforts, subagents, timeout_minutes, sandbox_timeout_seconds, description and doc, so a field added later is guarded by default. An overlay that sets a guarded field may read only runtime.forge, config (read from the trusted ref, never the change) and the event and entity fields the normalized event spec lists as trusted. Validation rejects any other read, including the value of a parent object of an untrusted field, runtime.attempt, or a path it cannot resolve; event != null and a has() test on an object that holds a trusted field, such as has(event.source) or has(event.state.change_proposal), are allowed. On such an overlay, a missing event or key counts as no match, as today, and any other evaluation error fails the run.
  4. Resolution trace. The plan output, metrics.json and the root span record which overlays matched, the names of the fields each set (values only for the routing fields), and for each of those fields whether it applied or which higher-precedence source overrode it.

Consequences ​

  • Per-task routing needs no mechanism of its own: a harness sets model and effort in overlays keyed on change facts, within the models it supports (ADR 0130).
  • A repo routes a built-in agent by composing a custom harness on it through base:; overriding harness settings without a custom harness is separate work.
  • Setting anything beyond routing from something a change's author or an event's actor can choose is rejected at validation instead of being left to review, while today's built-in overlays, custom overlays keyed on config and overlays that fall through when there is no event keep working.
  • The runtime is not a harness field (ADR 0091), so overlays cannot route it; persona models become routable once a harness can set them (ADR 0131).

Deferred ​