Skip to content

Update Session settings and review, bound per root Turn - #920

Merged
SaladDay merged 4 commits into
mainfrom
feat/session-turn-settings
Nov 5, 2026
Merged

SaladDay merged 4 commits into
mainfrom
feat/session-turn-settings

Conversation

@SaladDay

@SaladDay SaladDay commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

The official Session update now covers agent.model, agent.reasoning.effort, agent.service_tier and review, and each root Turn binds its settings when Core accepts the input that creates it (Agents API pin 3.45.0). No Harness declares these changes yet, so after this change every real change returns a typed 400. The Codex and Claude Code changes flip their declarations.

Behavior

  • Session update.
    • Only the members present are applied: model; reasoning.effort (null resets); service_tier (null becomes auto); review; metadata.
    • agent.tools returns 400 with param agent.tools.
    • When the update touches agent or review, the result is validated against the Harness declaration, and a changed setting the Harness cannot apply between root Turns returns 400 unsupported_or_invalid_configuration naming the field.
    • A metadata-only update keeps the configuration as it is.
  • review on create and update is validated against the declaration (Execution.Reviews), which replaces the hard-coded auto_review rejection. The value is stored and rendered only for auto_review.
  • Binding. turns.settings and environment_input_reservations.settings hold {model, reasoning_effort, service_tier, review}, projected by one function, sessions.TurnSettingsOf. Dispatch builds proto.TurnSettings from them, not from the Session snapshot, so a Turn queued before an update keeps its values.
  • Admin execution configuration reports the current model from the Session configuration; its source becomes session after an update changes the model.
  • Declarations. harnessconfig gains SessionUpdates{Model, ReasoningEffort, ReasoningEffortReset, ServiceTier} and Execution.Reviews. Every built-in Harness declares them Unsupported or empty.

No protocol change.

Deleted

  • UpdateSessionMetadata, rejectAutoReview, and the snapshot-based Turn settings path.
  • The old agent and review rows of the unsupported-fields test.

Docs

English and zh/: index.md, wire-semantics.md, model-execution.md, admin-api.md, harness-capabilities.md (every Harness rejects these updates for now), and the "Declare the Harness" paragraph of harness-onboarding.md.

Verification

  • go vet passes.
  • go test passes for internal/harnessconfig/... and Core api, sessions, execution and sessionpg.
  • These integration tests pass against PostgreSQL: Turn settings, metadata, write audit, execution configuration, Environment input and dispatch.
  • The new integration test uses a declaration that supports changes and checks three things:
    • the Turn after an update carries the new model;
    • a Turn queued before the update keeps the old one;
    • an undeclared change writes nothing.
  • make openapi, check-sqlc, check-harness-catalog, check-docs and check-translations pass.
  • The official-client test official_session_metadata.py runs in CI.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

A metadata-only update no longer re-validates the Session configuration,
and the settings columns need no backfill because there are no in-place
upgrades.
@SaladDay
SaladDay merged commit ff41380 into main Nov 5, 2026
25 checks passed
@SaladDay
SaladDay deleted the feat/session-turn-settings branch November 5, 2026 05:07
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