You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Goal mode: no-op continuation turns fire indefinitely while waiting on external conditions, burning tokens and context #1977
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:
re-injects the full goal-mode system reminder together with the complete (long) objective into the model's context, and
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
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).
Let the agent reach the point where the only remaining action is to wait (job submitted, running remotely).
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.
Confirming this still reproduces on 0.29.2, with quantified impact from a real session (logs + wire files preserved).
What we observed (all from agents/main/wire.jsonl + logs/kimi-code.log, UTC)
Setup: /goal + yolo + /swarm, model k3, task whose completion depended on external timers (fuzz jobs finishing hours later). Once all 42 subagents had finished, the main agent repeatedly ended its turn with "waiting, no action" — and the runtime auto-continued every ~8–10 s:
Burst 1 (2026-07-28 17:12:08–17:14:35): 16 no-op turns in ~2.5 min — 13 usage records, 6,525,184 cache-read tokens, 657 output tokens. Ended only by manual turn.cancel.
Burst 2 (21:01:02–21:07:10): 21 no-op turns, a user steer ("stop waiting for any expiry time") producing one productive turn, then 10 more no-op turns until a second manual cancel. Window total: 41 usage records, 22,604,288 cache-read tokens, 6,049 output tokens in ~8 minutes.
Aggregate across the session: ≈36.3M cache-read tokens on self-admitted no-op turns, ~29% of the session's total cache-read usage (124.9M). Each no-op turn re-read a ~550–600K-token cached context — so the waste scales with session size, far beyond the ~1–2k tokens/turn estimated in the original report. The user's final prompt literally had to include "do not enter idle spinning" to get the goal to complete.
Related observation
While the goal was paused, cron-fired prompts (CronCreate jobs) also each produced a full-context LLM turn just to reply "goal still paused" — ~7.2M more cache-read tokens across 14 fires. Filed separately as #2390 since the fix point is different (pre-dispatch short-circuit).
Happy to attach the session log / wire files if useful.
Activity
tizerluo commentedon Jul 30, 2026
Confirming this still reproduces on 0.29.2, with quantified impact from a real session (logs + wire files preserved).
What we observed (all from
agents/main/wire.jsonl+logs/kimi-code.log, UTC)Setup:
/goal+yolo+/swarm, modelk3, task whose completion depended on external timers (fuzz jobs finishing hours later). Once all 42 subagents had finished, the main agent repeatedly ended its turn with "waiting, no action" — and the runtime auto-continued every ~8–10 s:2026-07-28 17:12:08–17:14:35): 16 no-op turns in ~2.5 min — 13 usage records, 6,525,184 cache-read tokens, 657 output tokens. Ended only by manualturn.cancel.21:01:02–21:07:10): 21 no-op turns, a user steer ("stop waiting for any expiry time") producing one productive turn, then 10 more no-op turns until a second manual cancel. Window total: 41 usage records, 22,604,288 cache-read tokens, 6,049 output tokens in ~8 minutes.Aggregate across the session: ≈36.3M cache-read tokens on self-admitted no-op turns, ~29% of the session's total cache-read usage (124.9M). Each no-op turn re-read a ~550–600K-token cached context — so the waste scales with session size, far beyond the ~1–2k tokens/turn estimated in the original report. The user's final prompt literally had to include "do not enter idle spinning" to get the goal to complete.
Related observation
While the goal was paused, cron-fired prompts (CronCreate jobs) also each produced a full-context LLM turn just to reply "goal still paused" — ~7.2M more cache-read tokens across 14 fires. Filed separately as #2390 since the fix point is different (pre-dispatch short-circuit).
Happy to attach the session log / wire files if useful.