kimi-code icon indicating copy to clipboard operation
kimi-code copied to clipboard

[Feature Request] Add global memory across sessions

Open djfch opened this issue 5 months ago • 2 comments

djfch avatar Jun 23 '26 03:06 djfch

This would be really useful. My idea:

  1. Add a ~/.kimi-code/memory.md file that persists across sessions
  2. On session start, load the memory file and inject it as system context
  3. On session end (Stop hook), append a summary of key decisions/learnings to the memory file
  4. Add a kimi memory command to view/edit the global memory

This is similar to how agentscope-java handles memory with MemoryFlushMiddleware — it extracts key information from the session and writes it to a persistent store, then loads it on the next session start.

The memory file could be structured as:

## Decisions
- 2024-01-15: Use pnpm instead of npm for this project
- 2024-01-20: API base URL is https://api.example.com

## Patterns
- This project uses conventional commits
- Tests are in the `tests/` directory, not `__tests__/`

Mind if I take this?

itxaiohanglover avatar Jun 23 '26 06:06 itxaiohanglover

@itxaiohanglover Sure, feel free to take it — thanks for picking this up! Happy to help test or refine the design!

djfch avatar Jun 23 '26 07:06 djfch