Commit c0d3af7
fix: extract --max-turns from claude_args for SDK turn limit
The SDK enforces its own maxTurns counter independently of CLI flags.
When --max-turns is passed via claude_args, it lands in extraArgs and
reaches the CLI, but the SDK cuts off execution at its own default (10)
before the CLI can act on it.
Extract --max-turns from extraArgs into sdkOptions.maxTurns, following
the same pattern used for allowedTools and disallowedTools. The direct
max_turns input takes precedence when both are set.
Fixes #1177
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 035417e commit c0d3af7
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
256 | 264 | | |
257 | 265 | | |
258 | 266 | | |
259 | 267 | | |
260 | | - | |
| 268 | + | |
261 | 269 | | |
262 | 270 | | |
263 | 271 | | |
| |||
0 commit comments