MoonshotAI / MoonshotAI/kimi-code

Cron-fired prompts against a paused goal still make full-context LLM calls (~7M tokens spent answering 'goal is paused')

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Bug description

A cron job created inside a goal-mode session (via CronCreate) keeps firing while the goal is paused. Each fire injects the prompt and produces a full-context LLM turn whose only content is "goal still paused, reply 'continue' to resume". In one session this happened 14 times across two windows (~17:41–20:41 and ~21:11–00:41 UTC), burning ~7.2M cache-read tokens in total just to answer "I'm paused".

Environment

  • kimi-code 0.29.2 (npm @moonshot-ai/kimi-code), Node v22.23.1, Ubuntu 26.04 LTS VPS
  • Mode: /goal + yolo; cron job created by the agent itself (cron-fire jobId="b73dc518" cron="9,39 * * * *", firing every 30 min)
  • Session context ~550–600K tokens at the time, so each paused-cron turn re-read the full cached context

Evidence

From the session's agents/main/wire.jsonl and logs/kimi-code.log:

  • 6 cron-fired turns between 17:41 and 20:41 UTC (2026-07-28), each a full LLM call answering along the lines of "目标仍在暂停中…回复"继续"即可恢复" — ~3.1M cache-read tokens for the window.
  • 8 more cron-fired turns between 21:11 (2026-07-28) and 00:41 (2026-07-29) — ~4.1M cache-read tokens.
  • Each turn's assistant text explicitly states no work was done because the goal is paused.

Expected vs actual

  • Expected: a cron-fired prompt against a paused goal should be skipped or queued without an LLM call (deliver it on resume, or drop it with a log line).
  • Actual: the paused-goal short-circuit happens after the model call instead of before it — 14 full-context turns spent saying "I'm paused".

Suspected cause (speculation)

Cron-fire steers are injected unconditionally; the paused-goal check short-circuits post-generation rather than pre-dispatch.

Repro

  1. In a goal-mode session, create a recurring cron job (CronCreate) with a short interval.
  2. Pause the goal (/goal pause).
  3. Observe: each cron fire still produces a full LLM turn.

Attachments (available on request)

Full session artifacts preserved (main-agent wire.jsonl with per-turn usage.record, kimi-code.log, state.json). Happy to attach.

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 issue with a recurring CronCreate job in a paused /goal session, then inspect the recorded agents/main/wire.jsonl, logs/kimi-code.log, and state.json artifacts. Trace where cron-fire prompts are dispatched relative to the paused-goal check. Done means a paused cron fire makes no LLM call and is either delivered on resume or dropped with a log line.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.