MoonshotAI / MoonshotAI/kimi-code
[openai_responses] Continuous compaction loop on startup
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What version of Kimi Code is running?
0.29.2
Which open platform/subscription were you using?
self-hosted
Which model were you using?
step-3.7-flash
What platform is your computer?
Linux 6.17.13.2-pve x86_64 x86_64
What issue are you seeing?
In Kimi 0.29.2 (Linux x64), when using the openai_responses API type with a self-hosted model, Kimi continuously triggers compaction immediately after startup.
The application repeatedly performs compaction without any user interaction:
● Compaction complete (29477 → 266 tokens) (Ctrl-O to show compaction summary)
● Compaction complete (270 → 832 tokens) (Ctrl-O to show compaction summary)
● Compaction complete (836 → 621 tokens) (Ctrl-O to show compaction summary)
This makes Kimi unable to enter the normal interactive state.
The same self-hosted model works correctly with Codex, so the model endpoint appears to be compatible. The issue only occurs when using Kimi 0.29.2 with the openai_responses configuration.
What steps can reproduce the bug?
Steps to reproduce
- Configure Kimi 0.29.2 to use a self-hosted model.
- Set the API type to
openai_responses. - Start Kimi.
- Observe that compaction starts repeatedly without any user interaction.
What is the expected behavior?
Kimi should start normally, connect to the self-hosted model, and wait for user input.
Compaction should only happen when the context length reaches the configured limit, not continuously during startup.
Additional information
No response
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 reproducing the startup loop with a self-hosted model configured for the openai_responses API type, then trace why compaction is triggered before user input. Compare the context-length checks with the startup path and add coverage for this configuration. Done means Kimi reaches its interactive state and compaction remains idle until the configured limit is reached.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100