Skip to content

Commit cd6290e

Browse files
committed
feat(mcp): increase timeouts for long-running agent coordination
Set MCP-related timeouts to 15 minutes across multiple providers to accommodate longer agent coordination workflows. This includes MCP server timeouts, tool execution timeouts, and workflow proposal/approval timeouts.
1 parent bb257f7 commit cd6290e

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

src/infra/engines/providers/claude/execution/runner.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ export async function runClaude(options: RunClaudeOptions): Promise<RunClaudeRes
190190
...process.env,
191191
...(env ?? {}),
192192
CLAUDE_CONFIG_DIR: claudeConfigDir,
193+
// MCP tool timeout: 15 minutes for long-running agent coordination
194+
MCP_TIMEOUT: '900000',
195+
MCP_TOOL_TIMEOUT: '900000',
193196
};
194197

195198
// Apply API override environment variables if set

src/infra/engines/providers/codex/mcp/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export function generateRouterSection(workingDir: string): string {
8282
`command = "${config.command}"`,
8383
`args = ${JSON.stringify(config.args)}`,
8484
'startup_timeout_sec = 60',
85+
'tool_timeout_sec = 900', // 15 minutes for long-running agent coordination
8586
];
8687

8788
// Add env section if present

src/infra/engines/providers/mistral/mcp/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export function generateRouterSection(workingDir: string): string {
9696
'transport = "stdio"',
9797
`command = "${config.command}"`,
9898
`args = ${JSON.stringify(config.args)}`,
99+
'timeout = 900', // 15 minutes for long-running agent coordination
99100
];
100101

101102
// Add env section if present

src/infra/engines/providers/opencode/mcp/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,6 @@ export function getMCPRouterConfig(workingDir: string): OpenCodeMCPServer {
108108
command: [config.command, ...config.args],
109109
environment: config.env,
110110
enabled: true,
111+
timeout: 900000, // 15 minutes for long-running agent coordination
111112
};
112113
}

src/workflows/signals/mcp/controller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export class MCPWorkflowController {
6161
constructor(options: ControllerOptions) {
6262
this.signalQueue = new SignalQueue(options.workflowDir);
6363
this.options = {
64-
proposalTimeout: 300000, // 5 minutes
65-
approvalTimeout: 60000, // 1 minute
64+
proposalTimeout: 900000, // 15 minutes
65+
approvalTimeout: 900000, // 15 minutes
6666
onProposal: () => {},
6767
onApproval: () => {},
6868
onValidationIssues: () => {},
@@ -219,8 +219,8 @@ export async function runStepWithMCP(
219219
requirements,
220220
runAgentA,
221221
runAgentB,
222-
proposalTimeout = 300000,
223-
approvalTimeout = 60000,
222+
proposalTimeout = 900000,
223+
approvalTimeout = 900000,
224224
} = options;
225225

226226
const controller = createMCPWorkflowController({

0 commit comments

Comments
 (0)