Problem
After the session triggers context compaction, the system prompt and project-level instructions (e.g., AGENTS.md, skills, environment context) appear to be reloaded from scratch. This costs a significant number of tokens (~20k in observed cases) even though the information itself has not changed.
Steps to reproduce
- Start a Kimi Code CLI session in a project with a large
AGENTS.md / skill set.
- Work until context compaction is triggered.
- Observe that the system prompt and project instructions are re-injected/reloaded instead of being preserved.
Expected behavior
Context compaction should prune transient conversation history while keeping immutable or unchanged context (system prompt, project instructions, skills) pinned, so it does not need to be re-sent and re-billed.
Actual behavior
The system prompt and project instructions are reloaded after compaction, causing unnecessary token usage.
Additional information
No response
Problem
After the session triggers context compaction, the system prompt and project-level instructions (e.g.,
AGENTS.md, skills, environment context) appear to be reloaded from scratch. This costs a significant number of tokens (~20k in observed cases) even though the information itself has not changed.Steps to reproduce
AGENTS.md/ skill set.Expected behavior
Context compaction should prune transient conversation history while keeping immutable or unchanged context (system prompt, project instructions, skills) pinned, so it does not need to be re-sent and re-billed.
Actual behavior
The system prompt and project instructions are reloaded after compaction, causing unnecessary token usage.
Additional information
No response