feat(worker): launcher passes planning token via env, drops --mcp-config
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,8 +29,10 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher
|
|||||||
if (!Directory.Exists(ctx.WorkingDir))
|
if (!Directory.Exists(ctx.WorkingDir))
|
||||||
throw new PlanningLaunchException($"Working directory does not exist: {ctx.WorkingDir}");
|
throw new PlanningLaunchException($"Working directory does not exist: {ctx.WorkingDir}");
|
||||||
|
|
||||||
if (!File.Exists(ctx.Files.McpConfigPath))
|
if (!File.Exists(ctx.Files.SystemPromptPath))
|
||||||
throw new PlanningLaunchException($"MCP config file not found: {ctx.Files.McpConfigPath}");
|
throw new PlanningLaunchException($"System prompt file not found: {ctx.Files.SystemPromptPath}");
|
||||||
|
if (!File.Exists(ctx.Files.InitialPromptPath))
|
||||||
|
throw new PlanningLaunchException($"Initial prompt file not found: {ctx.Files.InitialPromptPath}");
|
||||||
|
|
||||||
var resolvedWt = Resolve(_wtPath);
|
var resolvedWt = Resolve(_wtPath);
|
||||||
if (resolvedWt is null)
|
if (resolvedWt is null)
|
||||||
@@ -48,9 +50,11 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher
|
|||||||
};
|
};
|
||||||
|
|
||||||
psi.Environment["MAX_THINKING_TOKENS"] = "20000";
|
psi.Environment["MAX_THINKING_TOKENS"] = "20000";
|
||||||
|
psi.Environment["CLAUDEDO_PLANNING_TOKEN"] = ctx.Token;
|
||||||
|
|
||||||
// Arg order matters: --allowedTools and --mcp-config are variadic (space-separated).
|
// Arg order: --allowedTools is variadic (space-separated). The positional
|
||||||
// The positional prompt must follow a single-value flag, or it will be swallowed.
|
// prompt must follow a single-value flag, or it will be swallowed.
|
||||||
|
// --append-system-prompt-file serves as that buffer.
|
||||||
psi.ArgumentList.Add("-d");
|
psi.ArgumentList.Add("-d");
|
||||||
psi.ArgumentList.Add(ctx.WorkingDir);
|
psi.ArgumentList.Add(ctx.WorkingDir);
|
||||||
psi.ArgumentList.Add(resolvedClaude);
|
psi.ArgumentList.Add(resolvedClaude);
|
||||||
@@ -58,8 +62,6 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher
|
|||||||
psi.ArgumentList.Add(Model);
|
psi.ArgumentList.Add(Model);
|
||||||
psi.ArgumentList.Add("--allowedTools");
|
psi.ArgumentList.Add("--allowedTools");
|
||||||
psi.ArgumentList.Add(AllowedTools);
|
psi.ArgumentList.Add(AllowedTools);
|
||||||
psi.ArgumentList.Add("--mcp-config");
|
|
||||||
psi.ArgumentList.Add(ctx.Files.McpConfigPath);
|
|
||||||
psi.ArgumentList.Add("--append-system-prompt-file");
|
psi.ArgumentList.Add("--append-system-prompt-file");
|
||||||
psi.ArgumentList.Add(ctx.Files.SystemPromptPath);
|
psi.ArgumentList.Add(ctx.Files.SystemPromptPath);
|
||||||
psi.ArgumentList.Add(File.ReadAllText(ctx.Files.InitialPromptPath));
|
psi.ArgumentList.Add(File.ReadAllText(ctx.Files.InitialPromptPath));
|
||||||
@@ -90,11 +92,11 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher
|
|||||||
CreateNoWindow = false,
|
CreateNoWindow = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
psi.Environment["CLAUDEDO_PLANNING_TOKEN"] = ctx.Token;
|
||||||
|
|
||||||
psi.ArgumentList.Add("-d");
|
psi.ArgumentList.Add("-d");
|
||||||
psi.ArgumentList.Add(ctx.WorkingDir);
|
psi.ArgumentList.Add(ctx.WorkingDir);
|
||||||
psi.ArgumentList.Add(resolvedClaude);
|
psi.ArgumentList.Add(resolvedClaude);
|
||||||
psi.ArgumentList.Add("--mcp-config");
|
|
||||||
psi.ArgumentList.Add(ctx.McpConfigPath);
|
|
||||||
psi.ArgumentList.Add("--resume");
|
psi.ArgumentList.Add("--resume");
|
||||||
psi.ArgumentList.Add(ctx.ClaudeSessionId);
|
psi.ArgumentList.Add(ctx.ClaudeSessionId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user