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.Newis governed: a Policy is required unlessAllowNoPolicyis set, and an explicitScope *agent.ToolScopeis required.agent.NewLegacykeeps the previous permissive behavior.ToolScopeAllRegisteredsnapshots names at assembly;ToolScopeNoneexposes zero tools;ToolScopeNamedmust reference registered tools.- Directly constructed
agent.Agentvalues are rejected at run entry. internal/governance.ClassifyErroris an internal reference classifier, not a public API.
Python¶
AgentOptionsis governed unlesslegacy=True.scope=ToolScope(ToolScopeMode.NONE | NAMED | ALL_REGISTERED)andallow_no_policy=Trueselect the scope and the independent policy opt-out.praxo.classify_error/ErrorClassclassify typed exceptions.
TypeScript¶
AgentOptionsis governed unlesslegacy: true.scope: { mode: "none" | "named" | "all-registered", names }andallowNoPolicyselect the scope and policy opt-out.classifyError/ErrorClassclassify known codes and boundary fallbacks.
Rust¶
AgentOptions::newis governed;AgentOptions::legacy(model)keeps the old behavior.ToolScope { mode, names }andallow_no_policyselect the scope and policy opt-out.classify_error/ErrorClassclassify inventoried codes and boundaries.
Java¶
AgentOptionsis governed;AgentOptions.legacy(model)keeps the old behavior.ToolScope.none(),ToolScope.named(...)orToolScope.allRegistered()andallowNoPolicyselect the scope and policy opt-out.ErrorClassifier.classify/ErrorClassclassify known codes and boundaries.
Rules¶
- A configured Policy is still called when the policy opt-out is set; the opt-out only permits absence.
nonemeans zero tools;namedrequires registered tools;all-registeredsnapshots names at assembly.- Do not combine legacy
AllowedTools/allowed_toolswith 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.