/schedule (RemoteTrigger create) returns 400: events[0] event_type is required vs proto unknown field event_type — schema v1→v2 mismatch

Resolved 💬 2 comments Opened Jun 2, 2026 by cello1508 Closed Jun 6, 2026

Summary

The /schedule skill (backed by POST /v1/code/triggers via the RemoteTrigger tool, action=create) is unable to create new triggers since approximately 2026-06-02. The endpoint appears to be in an inconsistent state during a v1→v2 migration: the v1 validator demands an event_type field inside events[], but the v2 proto translator rejects every value passed for that field as "unknown field event_type".

Triggers created before this change continue to fire normally and can be updated via action=update for simple fields (name, run_once_at, enabled). However, updates that include job_config.ccr.events[*].data.message.content fail with the same error, so existing triggers cannot have their prompts rewritten either.

Repro

RemoteTrigger action=create with this body (the exact shape returned by action=get on a working pre-migration trigger):

\\\json
{
"name": "test",
"run_once_at": "2030-01-01T00:00:00Z",
"persist_session": false,
"job_config": {
"ccr": {
"environment_id": "env_XXXXXXXXXXXXXXXXXXXXXXX",
"session_context": {"allowed_tools": ["Bash"], "model": "claude-sonnet-4-6"},
"events": [
{"data": {"message": {"role": "user", "type": "user", "parent_tool_use_id": null, "session_id": "", "uuid": "11111111-1111-1111-1111-111111111111", "content": "test prompt"}}}
]
}
}
}
\
\\

Returns HTTP 400:

\\\
{"error":{"message":"translate job_config v1→v2: events[0]: event_type is required","reason":"invalid session config","type":"invalid_request_error"}}
\
\\

Adding event_type at any level inside the event yields the opposite error:

\\\
{"error":{"message":"translate job_config v1→v2: job_config is not a valid CreateSessionRequest: proto: (line 1:X): unknown field \"event_type\"","reason":"invalid session config","type":"invalid_request_error"}}
\
\\

Values tried for event_type

All rejected as "unknown field":

  • "message"
  • "user_message"
  • "USER_MESSAGE"
  • "EVENT_TYPE_USER_MESSAGE"
  • "type" instead of "event_type" (different unknown field error)

Also tried alternative shapes — all rejected:

  • events: [{}] (empty event)
  • events: [{"user_message": {"content": "..."}}]
  • events: [{"data": {"user_message": {"content": "..."}}}]
  • session_context.initial_message
  • Top-level prompt (Extra inputs not permitted)
  • job_config.session instead of job_config.ccr (unknown field "session")

Omitting events entirely creates a trigger but the session has no initial prompt, so Claude does nothing when it fires.

Impact

The /schedule skill is currently unusable for creating any new agentic schedule. Users have to fall back to local cron / launchd / external schedulers, which lose the headless remote execution capability that /schedule provides. This blocks anyone trying to set up recurring or one-shot agent runs from a Claude Code session today.

Suggested fix

Either:

  1. Restore the v1 input acceptance until the v2 schema and migration path are publicly documented, or
  2. Publish the v2 CreateSessionRequest proto schema (or the equivalent JSON shape) so callers can construct valid bodies. Current public docs (code.claude.com, platform.claude.com) do not cover this endpoint's request body.

Environment

  • Claude Code: Opus 4.7 (1M context), CLI
  • API endpoint: https://api.anthropic.com/v1/code/triggers (via internal RemoteTrigger tool)
  • Observed: 2026-06-02 ~13:00–15:30 UTC
  • Last known working trigger created at 2026-06-02T05:00:13Z UTC, fired successfully at 2026-06-02T11:00:08Z UTC (same schema rejected on create now)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗