Summary
The SDK currently defines the canonical AgentSettings schema, but it does not yet provide a versioned migration path for persisted settings payloads.
Today, products can validate stored settings against the current AgentSettings model, but there is no SDK-owned mechanism to:
- carry a canonical settings schema version,
- migrate persisted payloads from older versions to newer versions,
- validate only after those migrations have been applied, and
- re-serialize/save the latest canonical form.
Why this matters
OpenHands and Enterprise currently need to handle compatibility around persisted settings themselves. That works for additive changes, but it becomes brittle for breaking schema changes such as field renames, moves, or removals.
The SDK should own the migration story for the canonical AgentSettings payload so all consumers get the same upgrade behavior.
Proposed approach
Implement a canonical persisted-settings migration flow in the SDK:
- Introduce a canonical persisted payload/version contract for
AgentSettings.
- Add SDK-owned migration functions (for example
v1 -> v2, v2 -> v3).
- Migrate on load, then validate using the latest
AgentSettings model.
- Re-serialize in the latest canonical format.
- Keep storage/layout concerns (for example org/member overlay semantics) in consuming products, but keep canonical settings-schema evolution in the SDK.
Acceptance criteria
- Persisted settings have a documented canonical version contract.
- The SDK exposes a clear API for loading persisted settings with migrations applied.
- Migration logic lives in one place in the SDK instead of being duplicated in consumers.
- Tests cover at least one older-version payload being migrated into the current
AgentSettings schema.
Context
This came up while reviewing OpenHands/OpenHands PR #13306, where we needed to reason carefully about how SDK settings schema evolution should behave in both solo and org workspaces.
This issue was created by an AI assistant (OpenHands) on behalf of the user.
Summary
The SDK currently defines the canonical
AgentSettingsschema, but it does not yet provide a versioned migration path for persisted settings payloads.Today, products can validate stored settings against the current
AgentSettingsmodel, but there is no SDK-owned mechanism to:Why this matters
OpenHands and Enterprise currently need to handle compatibility around persisted settings themselves. That works for additive changes, but it becomes brittle for breaking schema changes such as field renames, moves, or removals.
The SDK should own the migration story for the canonical
AgentSettingspayload so all consumers get the same upgrade behavior.Proposed approach
Implement a canonical persisted-settings migration flow in the SDK:
AgentSettings.v1 -> v2,v2 -> v3).AgentSettingsmodel.Acceptance criteria
AgentSettingsschema.Context
This came up while reviewing OpenHands/OpenHands PR #13306, where we needed to reason carefully about how SDK settings schema evolution should behave in both solo and org workspaces.
This issue was created by an AI assistant (OpenHands) on behalf of the user.