fix: update isolated blocks in conversation context for Skill tool (#622)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-21 17:45:41 -08:00
committed by GitHub
parent 2c82bd880a
commit ce89e962c7
4 changed files with 179 additions and 17 deletions

View File

@@ -16,7 +16,11 @@ import {
isConversationBusyError,
} from "./agent/approval-recovery";
import { getClient } from "./agent/client";
import { initializeLoadedSkillsFlag, setAgentContext } from "./agent/context";
import {
initializeLoadedSkillsFlag,
setAgentContext,
setConversationId,
} from "./agent/context";
import { createAgent } from "./agent/create";
import { ensureSkillsBlocks, ISOLATED_BLOCK_LABELS } from "./agent/memory";
import { sendMessageStream } from "./agent/message";
@@ -659,6 +663,9 @@ export async function handleHeadlessCommand(
}
markMilestone("HEADLESS_CONVERSATION_READY");
// Set conversation ID in context for tools (e.g., Skill tool) to access
setConversationId(conversationId);
// Save session (agent + conversation) to both project and global settings
// Skip for subagents - they shouldn't pollute the LRU settings
if (!isSubagent) {