feat: Task subagents: allow overriding spawned letta executable (#340)

This commit is contained in:
paulbettner
2025-12-22 12:57:41 -06:00
committed by GitHub
parent 7c7daae4fd
commit 31db2be5d7

View File

@@ -382,8 +382,10 @@ async function executeSubagent(
try {
const cliArgs = buildSubagentArgs(type, config, model, userPrompt);
// Spawn letta in headless mode with stream-json output
const proc = spawn("letta", cliArgs, {
// Spawn Letta Code in headless mode.
// Some environments may have a different `letta` binary earlier in PATH.
const lettaCmd = process.env.LETTA_CODE_BIN || "letta";
const proc = spawn(lettaCmd, cliArgs, {
cwd: process.cwd(),
env: process.env,
});