Code Generation with Claude Code
Your Claude Code integration generates function implementations by issuing tool-use requests. Overnight batch jobs show that roughly 12% of code generation tasks are failing silently — the pipeline records a successful API call but produces no usable output. Examining the raw API responses, you find these calls have stop_reason: "max_tokens" and the content array contains a partially constructed tool_use block with no closing structure. What is the most likely root cause of this failure pattern?