Skip to content

feat(agent-core): add config hint to max-steps-per-turn error - #1097

Merged
liruifengv merged 2 commits into
mainfrom
feat/max-steps-config-hint
Jun 25, 2026
Merged

feat(agent-core): add config hint to max-steps-per-turn error#1097
liruifengv merged 2 commits into
mainfrom
feat/max-steps-config-hint

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No related issue.

Problem

When a turn exceeds loop_control.max_steps_per_turn, the agent only reports Turn exceeded maxSteps=N. Users who hit the limit because it is set too low get no hint that they can raise it themselves in config.toml, so the error is not actionable.

What changed

Append a hint to the max-steps-exceeded error message that points users to the loop_control.max_steps_per_turn option in config.toml, and align the error code's action text to match. The existing turn test now asserts the hint appears in the error payload.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5fb1381

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 25, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@5fb1381
npx https://pkg.pr.new/@moonshot-ai/kimi-code@5fb1381

commit: 5fb1381

@liruifengv
liruifengv merged commit 27ef516 into main Jun 25, 2026
9 checks passed
@liruifengv
liruifengv deleted the feat/max-steps-config-hint branch June 25, 2026 07:49
@github-actions github-actions Bot mentioned this pull request Jun 25, 2026
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Jul 11, 2026
…otAI#1097)

* feat(agent-core): add config hint to max-steps-per-turn error

* test(agent-core): assert config hint in max-steps error

(cherry picked from commit 27ef516)
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