AGENTS.mdfiles: durable instructions maintained by you or your team, useful for coding standards, project structure, commands, and collaboration rules.- Auto-memory: local Markdown memories saved by Qoder CLI when the feature is enabled, useful for preferences, feedback, project background, and references that should be available later.
Memory Types
| Mechanism | Written by | Best for | Scope | View with |
|---|---|---|---|---|
AGENTS.md | You or your team | Explicit, stable instructions to apply every session | User, project, local project, plugin-provided | /memory |
| Auto-memory | Qoder CLI | Reusable learnings from conversation, such as preferences, feedback, project background, and references | Project; optional user scope | /memory opens the auto-memory folder; /memory manage manages topic files |
AGENTS.md
AGENTS.md is the default context file name in Qoder CLI. When memory is loaded or refreshed, Qoder CLI reads available AGENTS.md files and injects their content as session context.
Common Locations
| Location | Purpose | Commit it? |
|---|---|---|
~/.qoder/AGENTS.md | Cross-project preferences and personal workflow habits for the current user | No |
<project>/AGENTS.md | Team-shared project rules, architecture notes, and common commands | Yes |
<project>/AGENTS.local.md | Machine-local project notes, such as local URLs or personal test data | No |
context.fileName, which accepts a single string or an array of strings. The default is AGENTS.md.
Loading Logic
When memory is loaded or refreshed, Qoder CLI only searches upward for project memory. It does not scan child directories:- User memory: loads
AGENTS.mdfrom the user config directory. - Project and local project memory: in trusted workspaces, searches from the current workspace directory upward for
AGENTS.mdandAGENTS.local.md, stopping by default at the directory containing.git. - Subdirectory memory: not preloaded at startup. Only after Qoder CLI successfully reads a file inside a subdirectory does it walk upward from that file’s directory and load any not-yet-loaded
AGENTS.mdorAGENTS.local.md. That on-demand content enters later context and appears in/memory.
/repo/packages/app checks:
/repo does not preload /repo/packages/app/AGENTS.md; it is loaded on demand only after Qoder CLI accesses a file under packages/app.
Writing Good Instructions
UseAGENTS.md for facts and conventions that should still matter next session. Good entries include:
- Build, test, format, and release commands
- Project layout and important module boundaries
- Code style, naming, and review requirements
- Team workflows for commits, branches, or test data
- Repository-specific security or compliance notes
- Temporary state for the current task
- Fast-changing schedule or progress notes
- Long duplicated content that can already be read from code or README files
- Policies that must be enforced. Use permissions or Hooks for enforcement
Import Other Files
AGENTS.md can import another file with @path/to/file. Relative paths resolve from the file containing the import.
- Relative paths, absolute paths, and
~/paths are supported. @...inside Markdown inline code or fenced code blocks is ignored.- Project and local project memory files can import files inside the project boundary by default. Imports outside that boundary require explicit approval or a security setting.
- Imports are expanded recursively with a depth limit to avoid infinite cycles.
@README.md literally, wrap it in backticks: `@README.md`.
Auto-Memory
When auto-memory is enabled, Qoder CLI saves useful cross-session information as local Markdown files while you work. It does not save every conversation turn; it decides whether a detail is useful enough for future sessions.What Auto-Memory Stores
Auto-memory uses four content types:| Type | Use |
|---|---|
user | User role, long-term preferences, and cross-project habits |
feedback | Corrections or confirmations about how Qoder CLI should work with you |
project | Project background, constraints, or decision reasons not directly derivable from code |
reference | Locations of external systems, boards, dashboards, or documents |
Enable Auto-Memory
Auto-memory runs only in interactive sessions. In the current implementation, the effective switch is an environment variable:QODER_MEMORY_USER only takes effect when QODER_MEMORY is enabled. When auto-memory is not enabled, /memory can still manage AGENTS.md files; /memory manage shows that auto-memory is unavailable.
Auto-Memory Storage
Project-scope auto-memory is stored under the Qoder project config directory:MEMORY.md index and optional topic files:
MEMORY.md is an index, not the place for long-form memory content. At startup, Qoder CLI loads each active auto-memory root’s MEMORY.md, up to the first 200 lines or about 25KB. Detailed notes should live in topic files referenced by the index.
View and Manage
In TUI, run:/memory opens the memory overview. It shows user, project, and local project memory files, and shows Open auto-memory folder entries when auto-memory is enabled. Selecting one opens the corresponding auto-memory folder with the system file manager.
To manage auto-memory topic files inside the TUI:
/memory manage opens the auto-memory manager. It lets you view, open, edit, or delete auto-memory topic files. When a topic file is deleted, Qoder CLI also removes the corresponding MEMORY.md index entry.
Remember or Forget
Use natural language:AGENTS.md instead:
Troubleshooting
Qoder CLI Is Not Following AGENTS.md
- Run
/memoryand confirm the target file appears. - Confirm the current directory is trusted; untrusted folders do not apply project settings, Hooks, MCP, or
AGENTS.mdfiles. - Look for conflicting instructions between user, project, and local project files.
- Check whether
agentsMdExcludesexcludes the file. - Make vague instructions more specific and verifiable.
@ Imports Do Not Load
- Confirm the path exists and is not inside Markdown inline code or a fenced code block.
- Imports outside the project boundary are blocked by default; approve the external import or adjust the security setting.
- npm package names, mentions, and plain
@wordtext are not treated as file imports.
Auto-Memory Does Not Appear
- Confirm you are in a TUI interactive session.
- Confirm the session was started with
QODER_MEMORY=1. - Run
/memoryand check whether the auto-memory folder entry appears, or run/memory manageto check whether the auto-memory manager is available. - Auto-memory does not save something every turn. Creating zero memories is normal when no reusable information was found.