From a57718c09e9b601087edcb3ee15dd7ac6b96fee2 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Sat, 14 Feb 2026 18:38:42 -0500 Subject: [PATCH] refactor(workspace): lazy-load bootstrap template when seeding --- src/agents/workspace.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/agents/workspace.ts b/src/agents/workspace.ts index 052e6952035..c3e64448758 100644 --- a/src/agents/workspace.ts +++ b/src/agents/workspace.ts @@ -215,8 +215,6 @@ export async function ensureAgentWorkspace(params?: { const identityTemplate = await loadTemplate(DEFAULT_IDENTITY_FILENAME); const userTemplate = await loadTemplate(DEFAULT_USER_FILENAME); const heartbeatTemplate = await loadTemplate(DEFAULT_HEARTBEAT_FILENAME); - const bootstrapTemplate = await loadTemplate(DEFAULT_BOOTSTRAP_FILENAME); - const wroteAgents = await writeFileIfMissing(agentsPath, agentsTemplate); const wroteSoul = await writeFileIfMissing(soulPath, soulTemplate); const wroteTools = await writeFileIfMissing(toolsPath, toolsTemplate); @@ -226,6 +224,7 @@ export async function ensureAgentWorkspace(params?: { const wroteAnyCoreBootstrapFile = wroteAgents || wroteSoul || wroteTools || wroteIdentity || wroteUser || wroteHeartbeat; if (isBrandNewWorkspace || wroteAnyCoreBootstrapFile) { + const bootstrapTemplate = await loadTemplate(DEFAULT_BOOTSTRAP_FILENAME); await writeFileIfMissing(bootstrapPath, bootstrapTemplate); } await ensureGitRepo(dir, isBrandNewWorkspace);