Skip to content

Governed Defaults Migration

Status: active source contract, 2026-12-05. These defaults are active in SPEC_VERSION 0.3.0; published packages may still implement 0.2.0. Pin a version before upgrading. See Execution Contract Evolution and Execution Errors.

The migration has two shapes: a governed default plus an explicit escape that keeps the previous permissive behavior. The escape is temporary, not a target design.

Go

  • agent.New is governed: a Policy is required unless AllowNoPolicy is set, and an explicit Scope *agent.ToolScope is required.
  • agent.NewLegacy keeps the previous permissive behavior.
  • ToolScopeAllRegistered snapshots names at assembly; ToolScopeNone exposes zero tools; ToolScopeNamed must reference registered tools.
  • Directly constructed agent.Agent values are rejected at run entry.
  • internal/governance.ClassifyError is an internal reference classifier, not a public API.

Python

  • AgentOptions is governed unless legacy=True.
  • scope=ToolScope(ToolScopeMode.NONE | NAMED | ALL_REGISTERED) and allow_no_policy=True select the scope and the independent policy opt-out.
  • praxo.classify_error / ErrorClass classify typed exceptions.

TypeScript

  • AgentOptions is governed unless legacy: true.
  • scope: { mode: "none" | "named" | "all-registered", names } and allowNoPolicy select the scope and policy opt-out.
  • classifyError / ErrorClass classify known codes and boundary fallbacks.

Rust

  • AgentOptions::new is governed; AgentOptions::legacy(model) keeps the old behavior.
  • ToolScope { mode, names } and allow_no_policy select the scope and policy opt-out.
  • classify_error / ErrorClass classify inventoried codes and boundaries.

Java

  • AgentOptions is governed; AgentOptions.legacy(model) keeps the old behavior.
  • ToolScope.none(), ToolScope.named(...) or ToolScope.allRegistered() and allowNoPolicy select the scope and policy opt-out.
  • ErrorClassifier.classify / ErrorClass classify known codes and boundaries.

Rules

  • A configured Policy is still called when the policy opt-out is set; the opt-out only permits absence.
  • none means zero tools; named requires registered tools; all-registered snapshots names at assembly.
  • Do not combine legacy AllowedTools / allowed_tools with the new scope.
  • Direct construction and legacy constructors are migration escapes, not targets.
  • Error classification preserves identity; it does not claim uniform native exception behavior across SDKs.