[BUG] Routines API: fire payload delivered as a second message, racing the routine's first turn

Open 💬 1 comment Opened Jul 5, 2026 by rancohen-pictime

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Related: #51465 (closed not_planned) — the payload is now delivered rather than lost, but it still lands after the first turn instead of alongside the saved prompt as the docs imply."

Description: When firing a routine via POST /v1/claude_code/routines/{id}/fire (beta experimental-cc-routine-2026-04-01) with { "text": "..." }, the session starts with the routine's configured prompt as the first user turn, and the fire text is injected afterward as a separate <routine-fire-payload> message. The model completes its first turn before the payload arrives, so a routine whose prompt says "read the identifiers from the trigger text" sees no trigger data at all and can wrongly conclude the trigger was empty (in our case it sent a false "couldn't start" push notification). Since the fire endpoint receives the text atomically in the request body, the prompt and payload should be delivered together in the initial turn — or at minimum the payload should be guaranteed to precede the first model turn.

What Should Happen?

Expected: fire text present in the routine's first turn.

Error Messages/Logs

Steps to Reproduce

Repro: Monday.com webhook → Azure Function relay → single fire call with populated text. Session transcript shows: static routine prompt turn → model responds (no payload in context) → <routine-fire-payload> message arrives with the full text.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

this is a cloud issue

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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