MoonshotAI / MoonshotAI/kimi-code
Goal mode: make the continuation-turn interval configurable (fixed ~40s tick burns tokens during idle waits)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Summary
Goal mode fires a continuation turn on a fixed, short cadence (observed: roughly every 40 seconds) while the goal is active. There is no configuration surface for this interval. Each continuation turn is a full model call — it consumes tokens/quota even when the agent has nothing to do but wait for an external event (e.g. a long-running background build, a CI run, or a dispatched subagent that will notify on completion).
Motivation
Long-running autonomous goals frequently have idle waiting phases: the agent has dispatched background work and is correctly waiting for the completion notification. During these phases the fixed tick produces dozens of no-op turns per hour, each costing tokens and (for users with notifications enabled) producing noise. The only current escape hatch is /goal pause, which also stops legitimate event-driven progress checks and must be remembered to resume.
Proposed solution
Make the continuation-turn interval configurable, e.g.:
[goal]
continuation_interval_s = 300 # default: current behavior
A reasonable addition would be an idle-aware backoff: when the previous N turns produced no tool calls and no state change, lengthen the interval exponentially up to a cap, resetting on any real progress (tool call, background-task completion, user message).
Alternatives considered
/goal pauseduring waits: works, but is manual, easy to forget, and disables the goal lifecycle entirely (no automatic continuation when the waited-on event fires — the agent only resumes on the user's manual action).- Ending turns with minimal output: still burns the model call and its input tokens every tick.
Additional context
Observed on Windows with kimi-code CLI, goal mode active with background tasks pending. Happy to provide session logs if useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the goal-mode continuation loop and the CLI configuration entry point. Trace how /goal pause currently affects continuation and how background-task completion resumes work. Done means the continuation interval is configurable with the current behavior as default, with tests covering idle waits and resumed progress.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100