Skip to content

claude-sdk: README documents 'Default max turns: 5' but code uses 100 #10

@joewalker

Description

@joewalker

Observed behavior

The README's documentation for the claude-sdk agent (in section "### claude-sdk") states:

  • Default tools: Read, Glob, Grep
  • Default max turns: 5
  • Permission mode: acceptEdits

The actual implementation in src/agents/claude-sdk.ts uses:

const DEFAULT_MAX_TURNS = 100;

That value is used at:

maxTurns: this.#config.maxTurns ?? DEFAULT_MAX_TURNS,

So when a user does not configure maxTurns, the agent will allow up to 100 turns per prompt rather than the 5 documented in README.md. The README's other two facts (default tools, permission mode) match the code; only the maxTurns figure is stale.

Expected behavior

Either:

  • README updated to "Default max turns: 100", or
  • DEFAULT_MAX_TURNS lowered to match the documented value (5 is far more conservative and was the previous default).

Minimal reproduction

Compare README.md (section "### claude-sdk") with the DEFAULT_MAX_TURNS constant at the top of src/agents/claude-sdk.ts.

Suggested fix

Pick the intended value and align both sites. If the new larger budget is intentional, also reword the README's "Default max turns" line to make clear it is a budget, not a tight cap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S4Clean-ups or nits with low behavioral riskbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions