-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Problem
When creating a new agent with --new, the skills block content is not updated if a skills block already exists for the project. This means changes to .skills/ directory are ignored unless you use --fresh-blocks.
Current Behavior
# Initial setup
mkdir .skills/my-skill
echo "skill content" > .skills/my-skill/SKILL.MD
letta --new # Creates agent with skills block containing "skill content"
# Later: update skills
echo "updated skill content" > .skills/my-skill/SKILL.MD
letta --new # ❌ Skills block still has OLD "skill content"Root Cause
In src/agent/create.ts:
- Lines 69-88: Discovers
.skills/and updatesdefaultMemoryBlockswith fresh content - Lines 122-131: Tries to reuse existing skills block by ID
- Lines 140-143: If existing block found, reuses it (with OLD content)
- Fresh content is only used when creating NEW block
// Lines 69-88: Fresh .skills/ content loaded
const skillsBlock = defaultMemoryBlocks.find((b) => b.label === "skills");
if (skillsBlock) {
skillsBlock.value = formatSkillsForMemory(skills, resolvedSkillsDirectory);
}
// Lines 140-143: But if existing block found, reuses OLD content
if (existingBlock?.id) {
blockIds.push(existingBlock.id); // ⚠️ Ignores fresh skillsBlock.value above
}Expected Behavior
Skills block should be updated on every agent creation to reflect current .skills/ directory:
// After loading existing blocks, update skills block with fresh content
const skillsBlockId = localSharedBlockIds.skills;
if (skillsBlockId && skillsBlock) {
await client.blocks.update(skillsBlockId, {
value: skillsBlock.value, // Fresh .skills/ content
});
}Workaround
Use --fresh-blocks to force creation of new skills block with fresh content:
letta --fresh-blocks # Nuclear option: all blocks freshImpact
- Users must use
--fresh-blocksto pick up.skills/changes --fresh-blocksalso nukes global blocks (persona/human) which is too destructive- Skills are advertised as "automatically discovered" but changes aren't reflected
Related
- This is separate from feat: Make --new safe by default, add --fresh-blocks for isolation #91 which fixes
--newflag behavior - Global blocks (persona/human) reusing old content is fine (rarely change)
- Skills block reusing old content is a bug (frequently changes)
Metadata
Metadata
Assignees
Labels
No labels