Skip to content

analyze_issue_with_seer fails with ZodError: Failed to validate keys: autofix.status #1064

@InterstellarStella

Description

@InterstellarStella

What happened

Calling analyze_issue_with_seer on a SaaS org consistently fails. The agent surfaces a generic "Sentry API communication error", but the underlying MCP telemetry shows the real error:

ZodError: Failed to validate keys: autofix.status
  at SentryApiService.getAutofixState

Reproduces on both transports (cloud mcp.sentry.dev and stdio @sentry/mcp-server@latest). Read-only tools and the Sentry UI's Seer work fine.

Root cause

GET /organizations/{org}/issues/{id}/autofix/ now returns the explorer/agent-based shape with a lowercase status (processing / completed / error / awaiting_user_input), but AutofixStatusSchema only accepts the legacy uppercase enum (PROCESSING, COMPLETED, …), so AutofixRunStateSchema.parse() throws. Since ZodError isn't an ApiError, it falls through to the generic "communication error" branch instead of a clear validation message. Not a 5xx, and unrelated to billing/quota (that path returns 402).

Fix already exists but is unmerged

This is exactly what the closed #961 addressed, now split into the draft stack #963 + #966 ("Status enum collapsed to the explorer values"). Both have been sitting in draft since 2026-05-13. Filing this to track landing + releasing them, since the published package and cloud deployment are currently broken for any org on the explorer-mode autofix backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions