Claude Code for Continuous Integration
Your CI pipeline uses claude_agent_sdk to automatically diagnose and fix failing tests in a monorepo. The agent is configured with allowed_tools=["Read", "Edit", "Bash", "Glob", "Grep"] and max_turns=30. After three weeks in production, engineers report that roughly 15% of CI runs are silently completing with no code changes made, even when the test failures are reproducible and fixable. Examining the logs, you find these runs consistently produce ResultMessage subtypes of error_max_turns. The failing tests are in deeply nested service modules that require extensive file traversal before any fix can be applied. What is the most effective architectural response?