Skip to content

fix(agent-core): back off idle goal continuations - #2499

Open
xy200303 wants to merge 1 commit into
MoonshotAI:mainfrom
xy200303:fix/goal-idle-continuation-loop
Open

fix(agent-core): back off idle goal continuations#2499
xy200303 wants to merge 1 commit into
MoonshotAI:mainfrom
xy200303:fix/goal-idle-continuation-loop

Conversation

@xy200303

@xy200303 xy200303 commented Aug 1, 2026

Copy link
Copy Markdown

Related Issue

Resolve #1977

Problem

When an active goal produces consecutive text-only turns while waiting on an external condition, the goal driver immediately launches another full-context model request. This can repeat indefinitely, consuming tokens and filling the context with no-op continuation history.

What changed

  • Detect whether each goal turn invoked a tool and apply a 1-minute, 5-minute, then 15-minute capped backoff after two consecutive turns without tool progress.
  • Reset the idle streak when tool progress resumes, wake the delay immediately when steered input arrives, keep the wait cancelable, and respect the remaining wall-clock budget.
  • Add end-to-end coverage for exponential pacing, cancellation while waiting, and steer-triggered wake-up.

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 Aug 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 071fa0c

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

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.

Goal mode: no-op continuation turns fire indefinitely while waiting on external conditions, burning tokens and context

1 participant