MoonshotAI / MoonshotAI/kimi-cli

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

Open
#2,525 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

Bug description

In goal mode, when the agent is waiting on an external condition it cannot accelerate (e.g. a long-running remote training job, or a GPU becoming free on a shared server), goal continuation turns fire every few seconds indefinitely. Each turn:

  1. re-injects the full goal-mode system reminder together with the complete (long) objective into the model's context, and
  2. produces a no-op assistant reply ("waiting, no action this turn") since nothing changed.

In a single session today this produced 160+ continuation turns in ~3 hours (turns 10 through 160+ of the goal). Each round-trip carries the full reminder + objective (~1-2k tokens), so >200k tokens were spent on no-ops, and the context window filled with hundreds of duplicated reminders, crowding out the actual work history.

Version

kimi-cli 0.28.0 (kimi --version)

Reproduction

  1. Create a goal whose completion depends on waiting for an external long-running job (e.g. /goal with an objective that includes running a several-hours training job on a remote machine and evaluating afterwards).
  2. Let the agent reach the point where the only remaining action is to wait (job submitted, running remotely).
  3. Observe the session: continuation turns fire every few seconds, each re-emitting the full system-reminder + objective, with the model replying no-ops.

Expected behavior

Some form of pacing for continuation turns when nothing has changed, e.g.:

  • Exponential backoff / debounce between consecutive continuation turns that produced no tool calls or state changes (e.g. 1m -> 5m -> 15m cap), or
  • Compact reminders: emit the full goal-mode reminder only on the first continuation turn; subsequent turns get a one-line pointer, or
  • An explicit wait primitive: let the agent declare "sleep until time T or event X" and have the runtime honor it instead of polling via model turns.

Actual behavior

Unbounded rapid-fire continuation turns with full reminders, each consuming model tokens and permanent context space.

Impact

  • Direct token cost (hundreds of thousands of tokens for a single wait).
  • Context-window pressure: the repeated reminders displace genuine conversation/tool history, which can degrade the agent's later decisions in the same session.
  • UI noise: the transcript shows dozens of identical "no-op" turns, making the session hard to review (this is how the issue was noticed in practice).

Workaround used

The agent resorted to server-side watchers (nohup scripts on the remote host) and background Bash sleep tasks to avoid needing continuation turns at all — but the runtime still keeps firing them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the goal-mode scenario with a long-running external job and observe how continuation turns are scheduled and what context each turn receives. Trace the goal continuation path from the CLI runtime, then choose and verify a pacing, compact-reminder, or explicit-wait behavior that prevents unbounded no-op turns while preserving eventual goal progress.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.