> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How Qoder CLI Remembers Information

<div id="overview">
  # Overview
</div>

Qoder CLI **reconstructs the 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 Qoder uses to retain information helps you solidify knowledge that should be kept long-term, while preventing irrelevant content from filling up the context.

The information Qoder relies on primarily comes from three levels, each with different lifecycles and purposes:

| Level                | Lifecycle                | Maintained By                           | Typical Content                                                  |
| :------------------- | :----------------------- | :-------------------------------------- | :--------------------------------------------------------------- |
| Conversation Context | Current session          | Automatically accumulated by Qoder      | Historical messages, tool calls, results                         |
| Project Instructions | Long-term, per project   | You or your team                        | `AGENTS.md`, rules                                               |
| Long-Term Memory     | Long-term, cross-session | Team conventions + optional Auto-Memory | Preferences, project background, locations of external resources |

<div id="conversation-context">
  # Conversation Context
</div>

Conversation context is the accumulated history within the current session—your inputs, Qoder's responses, and every tool call along with its results. It allows Qoder to maintain coherence within a single session, remembering what you discussed just a few minutes ago.

Conversation context has several key characteristics:

* **Session-scoped**: It only exists within the current session. When you start a new session, the previous conversation context is not automatically carried over.
* **Limited capacity**: The context window is finite. The longer the conversation, the more space it consumes.
* **Manageable**: You can proactively clear or compact the context.

## Managing Conversation Context

* **`/clear`**: Clears the conversation history context and starts a new session, allowing you to "start from scratch." This is useful when switching to a completely unrelated new task.
* **`/compact`**: Summarizes and compacts the current session's historical context into a more concise form, freeing up context space while retaining key information. Ideal for long sessions when the context starts getting tight.

When a conversation is long and context pressure is high, Qoder will also compact it when necessary. For related performance and context troubleshooting, see Performance Troubleshooting.

<div id="project-instructions">
  # Project Instructions
</div>

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, ensuring Qoder adheres to team conventions.

There are two main forms:

* **`AGENTS.md`**: The default context file name for Qoder CLI, suitable for hosting overall project instructions and stable conventions. Common locations include user-level `~/.qoder/AGENTS.md`, project-level `<project>/AGENTS.md`, and local project-level `<project>/AGENTS.local.md`.
* **Rules**: Markdown rule files placed under `<project>/.qoder/rules/`, split by topic or file scope, suitable for replacing a single bloated `AGENTS.md`.

You can run `/init` in your project to automatically generate `AGENTS.md`, or use `/memory` to manage memory files at various levels. For full details, see [Memory](/en/cli/04-extending-qoder-cli/memory).

> Project instructions are context provided to the model, not enforced policies. If you need to **strictly** block certain commands, tools, or paths, use [permission](/en/cli/06-configuration-and-security/permissions) or [Hooks](/en/cli/04-extending-qoder-cli/hooks).

<div id="long-term-memory">
  # Long-Term Memory
</div>

Long-term memory is information retained across sessions. In addition to the static memory maintained by the team mentioned above (`AGENTS.md`, rules), Qoder CLI also supports **Auto-Memory**: when enabled, Qoder saves information learned from conversations that remains useful later into local Markdown memory files, such as your preferences, feedback, project background, and the locations of external reference materials.

Entry points for viewing and managing Auto-Memory:

* Open the auto-memory folder in the `/memory` panel.
* Run `/memory manage` to manage automatically saved topic files.

Auto-Memory is also provided to the model as context, helping Qoder carry forward previously accumulated understanding in new sessions. See [Memory](/en/cli/04-extending-qoder-cli/memory) for details.

<div id="how-they-work-together">
  # How They Work Together
</div>

At the start of a session, Qoder loads the applicable project instructions and long-term memory, injecting them into the context as background; as the conversation progresses, the conversation context continuously accumulates. Together, these three form the complete background Qoder relies on when making decisions:

* **Conversation context** addresses "where we are in this session."
* **Project instructions** address "what conventions must be followed in this project."
* **Long-term memory** addresses "what preferences and background should be remembered across sessions."

To make a piece of knowledge effective long-term, write it into project instructions or save it as long-term memory; keep temporary information relevant only to the current task in the conversation context, and clean it up with `/clear` or `/compact` when necessary.
