diff --git a/src/agent/memory.ts b/src/agent/memory.ts index 55ecc19..2c248b2 100644 --- a/src/agent/memory.ts +++ b/src/agent/memory.ts @@ -104,6 +104,13 @@ async function loadMemoryBlocksFromMdx(): Promise { block.description = frontmatter.description; } + if (frontmatter.limit) { + const limit = parseInt(frontmatter.limit, 10); + if (!Number.isNaN(limit) && limit > 0) { + block.limit = limit; + } + } + // Set read-only for skills blocks (managed by Skill tool, not memory tools) if ((READ_ONLY_BLOCK_LABELS as readonly string[]).includes(label)) { block.read_only = true; diff --git a/src/agent/prompts/loaded_skills.mdx b/src/agent/prompts/loaded_skills.mdx index 052fbd3..3ec5134 100644 --- a/src/agent/prompts/loaded_skills.mdx +++ b/src/agent/prompts/loaded_skills.mdx @@ -1,6 +1,7 @@ --- label: loaded_skills description: A memory block to store the full instructions and capabilities from each loaded SKILL.md file in this block. Do not manually edit this block - use the Skill tool to load and unload skills. +limit: 100000 --- [CURRENTLY EMPTY]