Coding Memory is a dedicated memory system for Code mode that allows the Agent to read, write, and edit persistent code context during coding tasks.
Coding Memory is automatically enabled when switching to Code mode — no additional configuration required. Related settings are in the modes.code section of config/config.yaml:
modes:
code:
rails:
- FileSystemRail
- SkillUseRail
- LspRail
tools:
- web_free_search
- web_fetch_webpage
- web_paid_search
- user_todos
embedding_config:
model_name: null # Empty = use global embedding config
base_url: null
api_key: nullCoding Memory provides three tools, automatically registered by CodingMemoryRail within the subprocess:
Read current coding memory content.
| Parameter | Type | Description |
|---|---|---|
query |
string | Search keyword to retrieve relevant coding context |
Returns matching code snippets and context descriptions.
Write new code context or experience to coding memory.
| Parameter | Type | Description |
|---|---|---|
content |
string | Code content or experience to write |
section |
string | Category label (e.g. architecture, bugfix, pattern) |
Edit an existing coding memory entry.
| Parameter | Type | Description |
|---|---|---|
memory_id |
string | ID of the memory entry to edit |
content |
string | New content |
section |
string | Optional; change the category label |
| Memory System | Applicable Modes | Description |
|---|---|---|
Built-in memory (write_memory / read_memory) |
Agent mode | General conversation memory |
Experience memory (experience_retrieve / experience_learn) |
All modes | Task-level experience retrieval and consolidation |
Coding memory (coding_memory_read / write / edit) |
Code mode | Code context and coding experience |
All three memory systems can coexist in Code mode.
Coding memory data is stored in the workspace/agent/memory/ directory, sharing the storage path with built-in memory.
When Dreaming is enabled in Code mode, the system reviews past coding sessions during idle time and automatically extracts reusable experience — debugging root causes, API edge behaviors, design decisions — to {workspace}/coding_memory/consolidated_{hash}.md. This is the sleep-time complement to the in-session coding_memory_* tools above.
See Memory → Dreaming: Sleep-Time Memory Consolidation for how to enable it and extraction details.
- Modes — Mode configuration and switching
- Memory — Built-in memory and external memory
- Task Memory — Task-level experience retrieval