Merge claudedo/616befd0f8a64dcb9e3dac9d6499de16

This commit is contained in:
mika kuns
2026-08-05 22:45:32 +02:00
10 changed files with 299 additions and 36 deletions
+5 -3
View File
@@ -40,9 +40,11 @@ public sealed class ClaudeProcess : IClaudeProcess
psi.ArgumentList.Add(arg);
// Claude Code caps HTTP MCP tool calls at 60 s unless MCP_TOOL_TIMEOUT is raised.
// The in-task AskUser tool blocks up to 3 min waiting for the user, so lift the cap
// (with margin) or that wait would be killed early. Harmless for every other tool.
psi.Environment["MCP_TOOL_TIMEOUT"] = "200000";
// wait_for_task_change blocks up to TaskWaitMcpTools.MaxTimeoutSeconds (900 s) and the
// in-task AskUser tool blocks up to 3 min waiting for the user, so lift the cap well
// past the longer of the two (with margin) or that wait would be killed early. Harmless
// for every other tool. Keep in sync with InteractiveLaunchSpecService's MCP_TOOL_TIMEOUT.
psi.Environment["MCP_TOOL_TIMEOUT"] = "930000";
using var process = new Process { StartInfo = psi };
process.Start();
@@ -14,7 +14,7 @@ namespace ClaudeDo.Worker.Runner;
// session in an existing task's worktree -- the SAME worktree prep as an autonomous run:
// session-skills seeded onto disk (reuses ISessionSkillSeeder + TaskRunner.UnionSkillNames,
// exactly like TaskRunner.RunAsync/ContinueAsync) and the same run environment variables
// (reuses ClaudeProcess's MCP_TOOL_TIMEOUT). Exe/Args reuse WindowsTerminalLauncher's
// (matches ClaudeProcess's MCP_TOOL_TIMEOUT). Exe/Args reuse WindowsTerminalLauncher's
// --resume argument construction. Guards: no running/queued task, and (once a worktree
// exists) it must be live on disk -- but a never-run task (no persisted SessionId) is not
// an error here, it's a fresh-start spec.
@@ -107,11 +107,11 @@ public sealed class InteractiveLaunchSpecService : IInteractiveLaunchSpecService
: await BuildFreshTaskArgsAsync(task, effort, ct);
// Same run environment variable ClaudeProcess sets for every headless run: the
// AskUser MCP tool call caps at 60s unless raised, and lifting it is harmless for
// every other tool.
// AskUser MCP tool call and wait_for_task_change cap at 60s unless raised, and lifting
// it is harmless for every other tool. Keep in sync with ClaudeProcess's MCP_TOOL_TIMEOUT.
var env = new Dictionary<string, string>
{
["MCP_TOOL_TIMEOUT"] = "200000",
["MCP_TOOL_TIMEOUT"] = "930000",
};
return new LaunchSpec(worktree.Path, resolvedClaude, args, env);
@@ -129,7 +129,7 @@ public sealed class InteractiveLaunchSpecService : IInteractiveLaunchSpecService
{
["MAX_THINKING_TOKENS"] = "20000",
["CLAUDEDO_PLANNING_TOKEN"] = ctx.Token,
["MCP_TOOL_TIMEOUT"] = "200000",
["MCP_TOOL_TIMEOUT"] = "930000",
};
return new LaunchSpec(
@@ -147,7 +147,7 @@ public sealed class InteractiveLaunchSpecService : IInteractiveLaunchSpecService
var env = new Dictionary<string, string>
{
["CLAUDEDO_PLANNING_TOKEN"] = ctx.Token,
["MCP_TOOL_TIMEOUT"] = "200000",
["MCP_TOOL_TIMEOUT"] = "930000",
};
return new LaunchSpec(
@@ -170,7 +170,7 @@ public sealed class InteractiveLaunchSpecService : IInteractiveLaunchSpecService
var env = new Dictionary<string, string>
{
["MCP_TOOL_TIMEOUT"] = "200000",
["MCP_TOOL_TIMEOUT"] = "930000",
};
// No task and no list here — the global default model's preset decides the effort.
@@ -247,7 +247,7 @@ public sealed class InteractiveLaunchSpecService : IInteractiveLaunchSpecService
var env = new Dictionary<string, string>
{
["MCP_TOOL_TIMEOUT"] = "200000",
["MCP_TOOL_TIMEOUT"] = "930000",
};
return new LaunchSpec(repoDir, resolvedClaude, args, env);