fix: wire max_turns input through to SDK in run.ts#1184
Open
qozle wants to merge 1 commit intoanthropics:mainfrom
Open
fix: wire max_turns input through to SDK in run.ts#1184qozle wants to merge 1 commit intoanthropics:mainfrom
qozle wants to merge 1 commit intoanthropics:mainfrom
Conversation
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 anthropics#1177 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
c0d3af7 to
56ba89d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run.tsnever passesmaxTurnstorunClaude(), so the SDK omits--max-turnsfrom the CLI args and the CLI defaults to 10 turns. The base-action entrypoint already wires this correctly —run.tswas just missing it.max_turnsinput toaction.ymlINPUT_MAX_TURNSthrough the composite step env blockmaxTurnsto therunClaude()call inrun.tsNote:
--max-turnsviaclaude_argsdoes work correctly (the SDK passesextraArgsthrough to the CLI). This fix adds the dedicatedmax_turnsinput for discoverability and consistency with the base-action.Test plan
bun run typecheckpassesbun testpasses (664/664)bun run format:checkpassesmax_turns: 50allows Claude beyond 10 turnsFixes #1177