@lightcone-ai/daemon 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/drivers/codex.js +11 -2
package/package.json
CHANGED
package/src/drivers/codex.js
CHANGED
|
@@ -214,6 +214,13 @@ export function buildCodexSpawn({
|
|
|
214
214
|
authToken: config.authToken || machineApiKey,
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
+
// Codex's default tool_timeout_sec for MCP tool calls is 60-120s. That's
|
|
218
|
+
// fine for fast tools (chat, db, etc) but breaks slow vision/analysis
|
|
219
|
+
// tools — notably `page-understanding/analyze_page` which takes 5-10 min
|
|
220
|
+
// on long mp.weixin articles (4 chunks × 1.6MB PNG → Claude vision OCR).
|
|
221
|
+
// Apply a generous 900s ceiling to every skill MCP server. Fast tools
|
|
222
|
+
// return well within this; slow tools no longer get prematurely killed.
|
|
223
|
+
const SKILL_TOOL_TIMEOUT_SEC = 900;
|
|
217
224
|
for (const [serverKey, mc] of Object.entries(skillMcpServers)) {
|
|
218
225
|
const keyExpr = formatCodexServerKey(serverKey);
|
|
219
226
|
if (!keyExpr) continue;
|
|
@@ -222,14 +229,16 @@ export function buildCodexSpawn({
|
|
|
222
229
|
args.push(
|
|
223
230
|
'-c', `mcp_servers.${keyExpr}.command=${quote('env')}`,
|
|
224
231
|
'-c', `mcp_servers.${keyExpr}.args=${quote([...envPairs, mc.command, ...(mc.args ?? [])])}`,
|
|
225
|
-
'-c', `mcp_servers.${keyExpr}.enabled=true
|
|
232
|
+
'-c', `mcp_servers.${keyExpr}.enabled=true`,
|
|
233
|
+
'-c', `mcp_servers.${keyExpr}.tool_timeout_sec=${SKILL_TOOL_TIMEOUT_SEC}`
|
|
226
234
|
);
|
|
227
235
|
continue;
|
|
228
236
|
}
|
|
229
237
|
args.push(
|
|
230
238
|
'-c', `mcp_servers.${keyExpr}.command=${quote(mc.command)}`,
|
|
231
239
|
'-c', `mcp_servers.${keyExpr}.args=${quote(mc.args ?? [])}`,
|
|
232
|
-
'-c', `mcp_servers.${keyExpr}.enabled=true
|
|
240
|
+
'-c', `mcp_servers.${keyExpr}.enabled=true`,
|
|
241
|
+
'-c', `mcp_servers.${keyExpr}.tool_timeout_sec=${SKILL_TOOL_TIMEOUT_SEC}`
|
|
233
242
|
);
|
|
234
243
|
}
|
|
235
244
|
|