Skip to content

Carry per-root-Turn settings over the Runtime protocol - #918

Merged
SaladDay merged 3 commits into
mainfrom
feat/turn-settings-protocol
Nov 5, 2026
Merged

SaladDay merged 3 commits into
mainfrom
feat/turn-settings-protocol

Conversation

@SaladDay

@SaladDay SaladDay commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

This change carries the official per-root-Turn settings over the Core–Runtime and Runtime–Harness protocols, ahead of the Session agent update and review (Agents API pin 3.45.0). Behavior does not change: every Harness receives the same values as before.

Protocol

  • PromptRequestPayload.Turn is a new proto.TurnSettings holding model, reasoning_effort and service_tier. The fields moved there from their old places, so none of them exists twice:
    • model is no longer in agent_options;
    • effort and tier are no longer in ExecutionControls.
  • proto.Version is now 0.24.0.
  • Turn stays part of the Executor's identity, so a retained Executor with different settings is still a configuration_conflict. StartTurn(ctx, runID, turn, input, out) receives the Turn's settings, which equal the prepared ones. The change that applies them natively also relaxes the identity, for Harnesses that declare it.
  • Read-only workspace preparation sends a zero Turn, and validation enforces it.
  • harnessconfig gets Prepare(model, options) and ValidateTurnSettings. ValidateTurnSettings takes over the effort and tier checks from ValidateExecutionControls. As a result, when a request has several unsupported values, the 400 message may name a different field first.
  • Core fills Turn from the Session snapshot, and the adapters read model, effort and tier from it at startup.
  • Docs updated, with their Chinese versions: docs/runtime-protocol.md, harness-onboarding.md and execution-tools.md. The wire scenario checks that StartTurn receives Turn.

Verification

  • go vet passes.
  • go test passes for ./internal/..., ./apps/daemon/... and Core execution.
  • make check-runtime-contract and make check-harness-catalog pass.
  • check-translations passes.
  • The tests check the following:
    • a retained Executor rejects a changed turn.model, including after suspension;
    • Core builds Turn from the snapshot;
    • Codex maps Turn to its native config and rejects undeclared values.

@blacksmith-sh

This comment has been minimized.

Add proto.TurnSettings (model, reasoning effort, service tier, review) to the
prepare configuration, moved out of agent_options and ExecutionControls. The
Executor identity ignores it; the Runtime hands each Turn's settings to
StartTurn. harnessconfig gains Reviews and ValidateTurnSettings, and
Prepare takes the model. Protocol version 0.24.0. No behavior change.
A retained Executor that accepted a different turn would have run the
prepared settings silently. Review support has no sender yet, so it waits
for the change that sends it.
@SaladDay
SaladDay merged commit 3b1772e into main Nov 5, 2026
25 checks passed
@SaladDay
SaladDay deleted the feat/turn-settings-protocol branch November 5, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant