Skip to content

Commit a37bcf4

Browse files
authored
Merge pull request #112 from marijnvdwerf/codex/memory-prompt-omissions
prompts: add missing memory-type guidance in memory flows
2 parents f311f99 + 4a2463c commit a37bcf4

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

prompts/en/branch.md.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Depending on why the channel branched, you might:
2929
Search for relevant memories. Be specific with queries — use key terms the memory might contain, not abstract descriptions. You'll get curated results ranked by relevance. Use these to inform your conclusion.
3030

3131
### memory_save
32-
Save something important that came up during your thinking. If you discovered a fact, noticed a preference, reached a decision, identified a goal, or heard a task for later — save it. The channel doesn't save memories — that's your job.
32+
Save something important that came up during your thinking. If you discovered a fact, identity detail, noticed a preference, reached a decision, captured an event, identified a goal, noticed an observation pattern, or heard a task for later — save it. The channel doesn't save memories — that's your job.
3333

3434
### memory_delete
3535
Forget a memory by ID. Use this when the user wants something removed, or when you find memories that are wrong or outdated. Get memory IDs from memory_recall results. When asked to forget something, recall first to find the relevant memories, then delete them.
@@ -45,8 +45,11 @@ If the user wants something done now and it needs execution tools (shell, file,
4545
4. If you spawn a worker, your conclusion should tell the channel what was started and what to expect. Then you're done — the worker runs independently.
4646
5. You have a limited number of turns. Don't loop. Recall, think, conclude.
4747
6. Save memories proactively. If the conversation reveals a preference, a fact, a decision, a goal, or a task, save it before returning your conclusion. Use the right type:
48+
- **identity** — core information about who the user or agent is ("the user is a backend engineer", "the agent's role is release coordination")
4849
- **fact** — something stated as true ("the API uses OAuth2")
4950
- **preference** — likes, dislikes, ways of working ("I prefer TypeScript")
5051
- **decision** — a choice that was made ("we'll use PostgreSQL")
52+
- **event** — something that happened ("we shipped the migration last Friday")
53+
- **observation** — a pattern noticed over time ("the user usually asks for code-first answers")
5154
- **goal** — something the user or agent wants to achieve ("migrate to the new API by Q3"). Goals are aspirational and may span multiple conversations.
5255
- **todo** — a concrete actionable task or reminder ("update the auth tests", "remind me to check the deploy tomorrow"). Todos are specific and completable.

prompts/en/compactor.md.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ The channel's context is getting full. You've been given the oldest turns that n
2828
After your summary, use `memory_save` for each memory worth extracting. Pick the right type:
2929

3030
- **fact** — things stated as true ("I work at Acme Corp", "the API uses OAuth2")
31+
- **identity** — core information about who the user or agent is ("the user is a staff engineer", "the agent specializes in Rust")
3132
- **preference** — likes, dislikes, ways of working ("I prefer TypeScript", "don't use emojis")
3233
- **decision** — choices that were made ("we decided to use PostgreSQL", "auth will use JWT")
34+
- **event** — things that happened ("the deploy failed this morning", "the migration was completed")
3335
- **observation** — patterns noticed ("user tends to ask for code examples", "conversations are usually technical")
3436
- **goal** — something the user or agent wants to achieve ("migrate to the new API by Q3"). Goals are aspirational and may span multiple conversations.
3537
- **todo** — a concrete actionable task or reminder ("update the auth tests", "check the deploy status tomorrow"). Todos are specific and completable.

prompts/en/ingestion.md.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ You are a memory ingestion process. You are given a chunk of text from a file th
1010
- Update existing memories when the chunk contains newer or more complete information
1111

1212
3. **Save memories selectively.** Extract distinct pieces of information and save each as a separate memory with the appropriate type:
13+
- **identity** — core information about who the user or agent is (roles, background, stable traits)
1314
- **fact** — concrete information (names, dates, technical details, project facts)
1415
- **preference** — expressed likes, dislikes, communication preferences, tool choices
1516
- **decision** — choices that were made, with reasoning if available

prompts/en/memory_persistence.md.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This is an automatic process triggered periodically during conversation. You are
1212
- Increase weight on patterns that are being reinforced
1313

1414
2. **Save selectively.** After recalling, save memories for information worth persisting:
15+
- Identity details that clarify who the user or agent is
1516
- Facts the user shared about themselves, their work, or their preferences
1617
- Decisions that were made
1718
- Preferences expressed (explicitly or implicitly)

0 commit comments

Comments
 (0)