Root cause of the 2026-09-09 production incident behind #6722. The agent's commit_revision writes the tools list as free JSON (api/oss/src/core/tools/platform_handlers.py, applied in api/oss/src/core/workflows/service.py). Nothing validates a tool entry against the SDK tool models on write, so a gateway_connection entry saved without policy committed fine and broke every later run of that agent (500 on invoke, "Message wasn't sent").
#6722 made the reader tolerant (missing policy = inherit, legacy shape translated, unrepairable legacy entry dropped with a warning). The writer still accepts anything.
Do: parse each entry of tools with the SDK's strict models (sdks/python/agenta/sdk/agents/tools/parsing.py) in the commit path and refuse the commit with a clear error naming the entry and the field. Keep the read-side tolerance for data already saved.
Related: #6722, #6708 class of "state written at creation, never migrated".
Root cause of the 2026-09-09 production incident behind #6722. The agent's
commit_revisionwrites thetoolslist as free JSON (api/oss/src/core/tools/platform_handlers.py, applied in api/oss/src/core/workflows/service.py). Nothing validates a tool entry against the SDK tool models on write, so agateway_connectionentry saved withoutpolicycommitted fine and broke every later run of that agent (500 on invoke, "Message wasn't sent").#6722 made the reader tolerant (missing policy = inherit, legacy shape translated, unrepairable legacy entry dropped with a warning). The writer still accepts anything.
Do: parse each entry of
toolswith the SDK's strict models (sdks/python/agenta/sdk/agents/tools/parsing.py) in the commit path and refuse the commit with a clear error naming the entry and the field. Keep the read-side tolerance for data already saved.Related: #6722, #6708 class of "state written at creation, never migrated".