Repository navigation
fix(adapters): Claude Code is no longer cut off at 24 turns - #114
Merged
Merged
Conversation
CLAUDE_CODE_MCP_HARNESS launched Claude with --max-turns 24, the cap of the MCP conformance probe, and every host that runs the spec as is took it too. A real agent doing a few rounds of reading, building and checking ran out mid-task, while the Codex, DeepSeek and Pi specs cap nothing and end only at the host's step and time limits. The spec now sets no turn cap. A host or probe that wants Claude's own cap appends --max-turns <n> through args; mcp-conformance does so with 24, so its runs are bounded as before.
When Claude stops a run itself, at --max-turns for one, its result frame carries an error subtype and no result text. The failure then read "The Claude Code harness reported a failure." and a host showing the message had no reason to give. The message now names the subtype; error_max_turns says the run stopped at its turn limit, after the frame's num_turns when it is a count.
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.
What
CLAUDE_CODE_MCP_HARNESSno longer passes--max-turns 24. A Claude turn now ends at the host's step and time limits, as Codex's, DeepSeek's and Pi's do. A host that wants Claude's own cap appends--max-turns <n>throughargs;mcp-conformancepasses--max-turns 24itself, so its runs stay bounded as before.resulttext, the failure message names the subtype instead of the generic line.error_max_turnsreads "Claude Code stopped at its turn limit after 24 model turns (error_max_turns)", using the frame'snum_turnswhen it is a count.Why
24 was the MCP conformance probe's cap, and every host running the spec as is inherited it. A real agent doing a few rounds of reading, building and checking ran out mid-task, and the failure it reported gave no reason.
Related
#115 raises the turn time ceiling from 10 minutes to 2 hours. With the turn cap gone, time is the next limit a long turn meets. The two are independent and either merges alone.
Checks
pnpm checkis green on the branch: format, typecheck, vitest 1137/1137, test:release 7/7,docs:api:checkandconformance:check.