Skip to content

Validate agent tool entries on write, in the commit path #6727

Description

@mmabrouk

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".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions