Skip to content

fix(adapters): Claude Code is no longer cut off at 24 turns - #114

Merged
DaXu999 merged 2 commits into
mainfrom
fix/claude-code-max-turns
Nov 8, 2026
Merged

DaXu999 merged 2 commits into
mainfrom
fix/claude-code-max-turns

Conversation

@DaXu999

@DaXu999 DaXu999 commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • CLAUDE_CODE_MCP_HARNESS no 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> through args; mcp-conformance passes --max-turns 24 itself, so its runs stay bounded as before.
  • When Claude ends a run with an error subtype and no result text, the failure message names the subtype instead of the generic line. error_max_turns reads "Claude Code stopped at its turn limit after 24 model turns (error_max_turns)", using the frame's num_turns when 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 check is green on the branch: format, typecheck, vitest 1137/1137, test:release 7/7, docs:api:check and conformance:check.

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.
@DaXu999
DaXu999 merged commit ecabdaa into main Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant