MoonshotAI / MoonshotAI/kimi-cli
功能建议:超长 goal 自动落盘为 goal.md 并支持 CLI 内编辑/暂停 || Function suggestion: Super long goals will automatically be saved as goal.md and support editing/pausing within the CLI.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
现状
目前 Kimi Code CLI 的 /goal slash 命令似乎有 4000 字节 的长度限制。虽然很多 harness(例如 Claude Code)也采用类似做法,但对于复杂、长期运行的任务来说,这个限制很容易成为瓶颈。
期望
希望借鉴 Codex 的处理方式,对超长 goal 做文件化支持:
-
超长 goal 自动落盘
当 goal 文本超过 4000 字节限制时,自动在 harness 自己的工作目录(或专用目录)中创建goal.md,而不是截断或拒绝输入。 -
每次唤醒时读取文件
每次唤醒/继续 goal 时,harness 在提示词中让模型去读取goal.md,而不是把完整 goal 塞进上下文。 -
CLI 内直接编辑与暂停
在 goal 执行过程中,用户可以直接在 CLI 内部对 goal 进行操作,例如:/goal edit:用默认编辑器打开goal.md。/goal pause:暂停当前 goal 的执行,保留状态。
-
修改后仅通知变更
用户修改goal.md后,harness 只需告诉模型“goal 文件已变更,请重新读取”,无需重新同步全部内容。
收益
这样既能保留短 goal 的轻量路径,又能让复杂、迭代型长程任务在 Kimi Code CLI 里更实用。
Current situation
Currently the Kimi Code CLI's /goal slash command appears to have a length limit of 4000 bytes. Although many harnesses (such as Claude Code) use a similar approach, this limitation can easily become a bottleneck for complex, long-running tasks.
Expectations
We hope to learn from Codex’s processing methods and provide documented support for very long goals:
-
Super long goal automatically placed
When the goal text exceeds the 4000 byte limit, automatically create agoal.mdin the harness's own working directory (or private directory) instead of truncating or rejecting the input. -
Read file every time you wake up
Each time a goal is awakened/continued, harness tells the model to readgoal.mdin the prompt word instead of stuffing the complete goal into the context. -
Direct editing and pausing in CLI
During the execution of the goal, the user can directly operate the goal within the CLI, for example:/goal edit: Opengoal.mdwith the default editor./goal pause: Pause the execution of the current goal and retain the state.
-
Only notify the changes after modification
After the user modifiesgoal.md, harness only needs to tell the model "the goal file has changed, please re-read" without resynchronizing the entire content.
Revenue
This not only retains the lightweight path of short goals, but also makes complex, iterative long-term tasks more practical in Kimi Code CLI.
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 CLI implementation of the /goal command and the current 4000-byte validation or truncation path. Review how goals are stored and resumed, then determine the scope for file-backed goals, editing, pausing, and change notifications. Done should cover long goals without truncation or rejection and preserve the requested resume and CLI operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100