From 6800852ae4b1a381f3bcb0cd269fdcec04c8a46d Mon Sep 17 00:00:00 2001 From: mika kuns Date: Fri, 24 Apr 2026 11:47:35 +0200 Subject: [PATCH] feat(worker): launcher passes planning token via env, drops --mcp-config Co-Authored-By: Claude Opus 4.7 (1M context) --- .../WindowsTerminalPlanningLauncher.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ClaudeDo.Worker/Planning/WindowsTerminalPlanningLauncher.cs b/src/ClaudeDo.Worker/Planning/WindowsTerminalPlanningLauncher.cs index 8c13118..9cf9af7 100644 --- a/src/ClaudeDo.Worker/Planning/WindowsTerminalPlanningLauncher.cs +++ b/src/ClaudeDo.Worker/Planning/WindowsTerminalPlanningLauncher.cs @@ -29,8 +29,10 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher if (!Directory.Exists(ctx.WorkingDir)) throw new PlanningLaunchException($"Working directory does not exist: {ctx.WorkingDir}"); - if (!File.Exists(ctx.Files.McpConfigPath)) - throw new PlanningLaunchException($"MCP config file not found: {ctx.Files.McpConfigPath}"); + if (!File.Exists(ctx.Files.SystemPromptPath)) + 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); if (resolvedWt is null) @@ -48,9 +50,11 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher }; psi.Environment["MAX_THINKING_TOKENS"] = "20000"; + psi.Environment["CLAUDEDO_PLANNING_TOKEN"] = ctx.Token; - // Arg order matters: --allowedTools and --mcp-config are variadic (space-separated). - // The positional prompt must follow a single-value flag, or it will be swallowed. + // Arg order: --allowedTools is variadic (space-separated). The positional + // 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(ctx.WorkingDir); psi.ArgumentList.Add(resolvedClaude); @@ -58,8 +62,6 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher psi.ArgumentList.Add(Model); 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(ctx.Files.SystemPromptPath); psi.ArgumentList.Add(File.ReadAllText(ctx.Files.InitialPromptPath)); @@ -90,11 +92,11 @@ public sealed class WindowsTerminalPlanningLauncher : IPlanningTerminalLauncher CreateNoWindow = false, }; + psi.Environment["CLAUDEDO_PLANNING_TOKEN"] = ctx.Token; + psi.ArgumentList.Add("-d"); psi.ArgumentList.Add(ctx.WorkingDir); psi.ArgumentList.Add(resolvedClaude); - psi.ArgumentList.Add("--mcp-config"); - psi.ArgumentList.Add(ctx.McpConfigPath); psi.ArgumentList.Add("--resume"); psi.ArgumentList.Add(ctx.ClaudeSessionId);