schedule skill: clarify that `events` is a sibling of `session_context`, not nested in it

Resolved 💬 1 comment Opened Apr 26, 2026 by svkaenel Closed May 28, 2026

Summary

The built-in schedule skill (used by /schedule) documents the create-body shape for RemoteTrigger {action: "create"} with events as a sibling of session_context under ccr. The example is correct, but the closing braces are easy to miscount, and the API's error message when you nest events inside session_context is misleading enough to send you down a long debugging path.

What happens today

Sending the (wrong) shape:

"job_config": {
  "ccr": {
    "environment_id": "...",
    "session_context": {
      "model": "claude-sonnet-4-6",
      "allowed_tools": ["Bash", "WebFetch"],
      "events": [...]            // wrong — nested one level too deep
    }
  }
}

returns:

HTTP 400
translate job_config v1→v2: job_config is not a valid CreateSessionRequest:
proto: (line 1:115): unknown field "events"

The "v1→v2 translate" wording reads like a schema deprecation. It's not — the API just runs an internal proto translation and the unknown-field check fires at whatever nesting level the parser happens to be in (which here is CreateSessionRequest, i.e. the proto for session_context). It took ~10 trial-and-error API calls (probing prompt, initial_prompt, messages, task, instructions, text, query, command, etc. inside session_context) before realizing the issue was placement, not field name.

Suggested fix

Add a short "Common Mistake" callout right under the create-body JSON example in the schedule skill, e.g.:

Common mistake: events lives at the ccr level alongside session_context — putting it inside session_context returns proto: unknown field "events" in CreateSessionRequest. The "v1→v2 translate" prefix is not a deprecation message; it just means the unknown-field error fired during internal proto translation.

Optionally, the example could also use // ← sibling, not inside style inline comments next to the events line to make the nesting unambiguous at a glance.

Where

The skill is shipped inside the Claude Code binary (verified via strings $(which claude) | grep "Schedule Remote Agents"). The source file would be the corresponding schedule skill / slash-command definition in this repo.

Why it's worth fixing

The error message strongly implies a schema-version problem, which derails debugging. A two-sentence callout costs nothing and saves the next person a similar detour.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗