Skip to content

fix(runtime): remove the default step limit - #763

Merged
Astro-Han merged 2 commits into
mainfrom
fix/760-remove-default-step-limit
Jul 12, 2026
Merged

Astro-Han merged 2 commits into
mainfrom
fix/760-remove-default-step-limit

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Remove the implicit 50-step limit from normal product turns.
  • Keep explicit maxSteps limits for CLI, programmatic, Harbor, and benchmark callers.
  • Keep step-cap grace behavior scoped to explicitly limited turns.

Why

A live CLI turn stopped after exactly 50 tool calls while the model was still working. The runtime treated the hidden default as a normal end of turn, leaving the task incomplete.

Normal turns should continue until the model stops or the user interrupts them. Callers that need a fixed budget can still configure one.

Closes #760. Refs #759.

Scope

This PR does not add the step_limit terminal reason or change TUI/Desktop rendering. That work remains in #761.

Verification

  • npm test -w @maka/runtime
    1304 passed, 2 skipped.
  • npm run typecheck
    Passed across all workspaces.
  • Regression test drives 51 tool calls without an explicit limit, then verifies the model reaches its natural stop on call 52.
  • Explicit maxSteps: 3 still stops after three model steps.
  • No visual evidence is applicable because this changes runtime continuation behavior without changing rendered UI.

Impact

Interactive and other unconfigured product turns no longer stop after 50 steps. Existing explicit limits remain compatible.

Reviewer notes

Vercel AI SDK defaults streamText to one step when stopWhen is omitted. The unlimited path therefore uses its exported isLoopFinished() non-stopping condition. Explicit limits continue to use stepCountIs(maxSteps).

Codex max-effort review passed with no P0/P1/P2 findings. Its only P3, stale default-50 contract comments, was fixed in f7334b2d.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

@Astro-Han
Astro-Han merged commit 30f83ff into main Jul 12, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the fix/760-remove-default-step-limit branch July 12, 2026 07:57
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.

fix(runtime): remove the default step limit

1 participant