Skip to content

Commit 56ba89d

Browse files
qozleclaude
andcommitted
fix: wire max_turns input through to SDK in run.ts
The main entrypoint (run.ts) never passes maxTurns to runClaude(), so the SDK omits --max-turns from the CLI args and the CLI defaults to 10 turns. The base-action entrypoint wires this correctly — run.ts was just missing it. - Add max_turns input to action.yml - Pass INPUT_MAX_TURNS through the composite step env block - Add maxTurns to the runClaude() call in run.ts Fixes #1177 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0f1fe5e commit 56ba89d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ inputs:
8686
required: false
8787
default: "false"
8888

89+
max_turns:
90+
description: "Maximum number of agentic turns for Claude to use"
91+
required: false
92+
default: ""
8993
claude_args:
9094
description: "Additional arguments to pass directly to Claude CLI"
9195
required: false
@@ -268,6 +272,7 @@ runs:
268272
INPUT_EXPERIMENTAL_SLASH_COMMANDS_DIR: ${{ github.action_path }}/slash-commands
269273
INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE: ${{ inputs.path_to_claude_code_executable }}
270274
INPUT_PATH_TO_BUN_EXECUTABLE: ${{ inputs.path_to_bun_executable }}
275+
INPUT_MAX_TURNS: ${{ inputs.max_turns }}
271276
INPUT_SHOW_FULL_OUTPUT: ${{ inputs.show_full_output }}
272277
DISPLAY_REPORT: ${{ inputs.display_report }}
273278
INPUT_PLUGINS: ${{ inputs.plugins }}

src/entrypoints/run.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ async function run() {
268268
const claudeResult: ClaudeRunResult = await runClaude(promptConfig.path, {
269269
claudeArgs: prepareResult.claudeArgs,
270270
appendSystemPrompt: process.env.APPEND_SYSTEM_PROMPT,
271+
maxTurns: process.env.INPUT_MAX_TURNS,
271272
model: process.env.ANTHROPIC_MODEL,
272273
pathToClaudeCodeExecutable:
273274
process.env.INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE,

0 commit comments

Comments
 (0)