Summary
The composable runtime exported from poe-code/agent accepts McpServerConfig.timeout, but long-running MCP tool calls still time out at the default JSON-RPC request timeout (approximately 30 seconds). This prevents tools that intentionally wait for human input (for example, Slack approval/reaction polling) from using the documented server timeout configuration.
Reproduction
import { agent, openaiResponsesPlugin, systemPromptPlugin } from "poe-code/agent";
await agent()
.model("gpt-5.5")
.use(openaiResponsesPlugin())
.use(systemPromptPlugin())
.mcp({
name: "approval_tools",
command: "bun",
args: ["./src/mcp.ts"],
timeout: 3_600_000,
})
.run("Call the MCP tool that waits for a Slack approval reaction.");
If the MCP tool takes more than ~30 seconds before returning, the request times out even though timeout: 3_600_000 was supplied.
Investigation
In the published composable runtime implementation, the MCP configuration is cloned/stored, but PluginApiImpl.#setupMcp() constructs new McpClient({ clientInfo: DEFAULT_MCP_CLIENT_INFO }) without forwarding config.timeout to the MCP client's request timeout. Runtime tool calls then invoke client.callTool(...) with only the abort signal.
By comparison, spawn-time MCP serialization forwards server.timeout into the supported agent configurations.
Expected behavior
agent().mcp({ ..., timeout }) should apply that timeout to MCP discovery/tool calls, consistent with the exposed McpServerConfig type and spawn-time MCP handling.
Impact
Blocks composable agent integrations from implementing long-running approval/confirmation tools without custom short-poll workarounds.
Summary
The composable runtime exported from
poe-code/agentacceptsMcpServerConfig.timeout, but long-running MCP tool calls still time out at the default JSON-RPC request timeout (approximately 30 seconds). This prevents tools that intentionally wait for human input (for example, Slack approval/reaction polling) from using the documented server timeout configuration.Reproduction
If the MCP tool takes more than ~30 seconds before returning, the request times out even though
timeout: 3_600_000was supplied.Investigation
In the published composable runtime implementation, the MCP configuration is cloned/stored, but
PluginApiImpl.#setupMcp()constructsnew McpClient({ clientInfo: DEFAULT_MCP_CLIENT_INFO })without forwardingconfig.timeoutto the MCP client's request timeout. Runtime tool calls then invokeclient.callTool(...)with only the abort signal.By comparison, spawn-time MCP serialization forwards
server.timeoutinto the supported agent configurations.Expected behavior
agent().mcp({ ..., timeout })should apply that timeout to MCP discovery/tool calls, consistent with the exposedMcpServerConfigtype and spawn-time MCP handling.Impact
Blocks composable agent integrations from implementing long-running approval/confirmation tools without custom short-poll workarounds.