Overview
Qoder CLI CN reconstructs its context for every session — it does not automatically remember what was discussed in the previous session unless that information is explicitly saved. Understanding the mechanisms by which Qoder remembers information helps you solidify knowledge that should be kept long-term, while keeping irrelevant content from filling up the context.
The information Qoder relies on comes mainly from three layers, each with a different lifecycle and purpose:
| Layer | Lifecycle | Maintained by | Typical content |
|---|---|---|---|
| Conversation context | Within the current session | Accumulated automatically by Qoder | Message history, tool calls, results |
| Project instructions | Long-term, with the project | You or your team | AGENTS.md, rules |
| Long-term memory | Long-term, across sessions | Team conventions + optional auto-memory | Preferences, project background, locations of external references |
Conversation context
Conversation context is the history accumulated within the current session — your inputs, Qoder's replies, and every tool call with its result. It keeps Qoder coherent within a session, remembering what you discussed minutes ago.
Conversation context has a few key characteristics:
- Session-scoped: it exists only in the current session. When you start a new session, previous conversation context does not carry over automatically.
- Limited capacity: the context window is finite. The longer the conversation, the more it consumes.
- Manageable: you can actively clear or compact the context.
Managing conversation context
/clear: clears the conversation history context and starts a new session, letting you "start from scratch." Useful when switching to a completely unrelated new task./compact: summarizes and compresses the current session's history context into a leaner form, freeing context space while retaining key information. Good for the middle of a long session when context starts getting tight.
Project instructions
Project instructions are static memory explicitly written by you or your team to tell Qoder about the project's structure, development standards, and collaboration conventions. They are provided to the model as context in every session, so Qoder follows team conventions.
There are two main forms:
AGENTS.md: Qoder CLI CN's default context file name, suited for overall project descriptions and stable conventions. Common locations include the user-level~/.qoder-cn/AGENTS.md, project-level<project>/AGENTS.md, and local project-level<project>/AGENTS.local.md.- Rules: Markdown rule files under
<project>/.qoder/rules/, split by topic or file scope — a good replacement for a single bloatedAGENTS.md.
/init in a project to generate AGENTS.md automatically, or use /memory to manage memory files at all levels. See Memory for the full description.
Project instructions are context provided to the model, not enforced policy. If you need to hard-block certain commands, tools, or paths, use Permissions and Directory Trust or Hooks.
Long-term memory
Long-term memory is information retained across sessions. Besides the static memory maintained by the team above (AGENTS.md, rules), Qoder CLI CN also supports auto-memory: when enabled, Qoder saves information learned from conversations that remains useful later into local Markdown memory files — for example your preferences, feedback, project background, and the locations of external reference material.
Where to view and manage auto-memory:
- Open the auto-memory folder from the
/memorypanel. - Run
/memory manageto manage automatically saved memory topic files.
How the three work together
When a session starts, Qoder loads the applicable project instructions and long-term memory and injects them into the context as background; as the conversation progresses, conversation context keeps accumulating. Together they form the complete background Qoder relies on for decisions:
- Conversation context answers "where are we in this session."
- Project instructions answer "what conventions must be followed in this project."
- Long-term memory answers "what preferences and background should be remembered across sessions."
/clear or /compact when needed.