Claude API premature stop_reason: end_turn - Model stops mid-workflow

Resolved 💬 3 comments Opened Nov 4, 2025 by harshh-jainn Closed Nov 8, 2025

Description

The Claude API model (claude-sonnet-4-20250514) is stopping generation with stop_reason: "end_turn" before completing an expected multi-step workflow, despite having adequate token budget remaining.

Expected Behavior

The model should complete the full workflow:

  1. Info message ✓
  2. Request template ✓
  3. Status message (exohelp) ✓
  4. Multiple analyst status messages (Steps 1-4) ✗
  5. Detailed analysis ✗
  6. Question form ✗

Actual Behavior

Model stops after step 3 with only 492 tokens generated, saying it will "coordinate with analyst" but never actually doing so.

Evidence

  • Working example: 1,943 tokens, completes full workflow
  • Breaking example: 492 tokens, stops with end_turn after initial status
  • Same prompt structure, different outcomes
  • No max_tokens constraint hit
  • No stop_sequence triggered

API Response Details

{
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "output_tokens": 492
}

Impact

Inconsistent completion of structured multi-step responses, breaking deterministic workflows that rely on the model following through on stated intentions.

Model

claude-sonnet-4-20250514

Reproduction Files

See attached files: tool_use.md (working) and tool_use_breaking.md (breaking)

View original on GitHub ↗

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