ADR 0006doc/{zh,en}/adr/0006-steering.md

ADR 0006: Steering a Running Run

Status: accepted, 2026-11-16 (P6; the owner's answers of the same day).

Status: accepted, 2026-11-16 (P6; the owner's answers of the same day).

Context

A message sent while the sender's run is still working became the next run, so a correction ("make it short", "use the staging database") arrived after the work it was meant to change. Feishu use shows people writing follow-ups while a long command or an approval is under way.

Decision

  1. Contract. A Trigger decision steer adds the event's text to the active run. TriggerInput.CanSteer is set by the Host only when the conversation's active run belongs to the sender, it is not waiting on a question (an approval or ask_user), and its runtime's manifest declares steering: true. A runtime reads messages with RuntimeHost.Steering(ctx) → []SteerMessage{id, text, sender, at} (JSON-RPC host/steering), which returns every message of the run each time; the runtime keeps the ids it showed in its checkpoint, so a message reaches the model once, also across a restart.
  2. Chat trigger. Commands, answers and approvals keep their meaning; other text steers when CanSteer, otherwise starts a run as before. While a question is pending, today's rules stay: approvals take approval words and other text gets the hint; other text to an ask_user question closes it and starts a new run.
  3. Host. A steered message is stored in run_steering (keyed by run and event id, so a redelivered event is stored once) and acknowledged with the localized notice run.steered (en-US "Added to the current request.", zh-CN "已加入当前任务"). When the runtime first reads a message, it joins the session log as the user's message of that run. Messages a run never read become the next run when it ends, each its own message in the session log; a cancelled run drops them. A message recalled or removed before the run reads it is blanked there: the run never reads it and no next run starts from it, and /recall counts it among the sender's messages (2026-12-05, review #264, second review item 6).
  4. Agent. plugins/agent declares steering: true and reads steering before every model call, after the pending tool batch; sub-agents do not.

Consequences

  • ◆A runtime that does not declare steering (echo, external runtimes) keeps the old behavior: the message waits as the next run, with no acknowledgement.
  • ◆Steering only from the run's own sender: in a group, another member's message starts a run of their own.
  • ◆New table, Trigger decision, TriggerInput field, manifest field and RuntimeHost method; existing runtimes and triggers are unaffected.