Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

docs(mcp-host): state why the tool-call limit is not retryable

Alfredo Lopeza16f1072e7a2
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index d0c10f84c..6f6bda981 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.357",
+ "version": "0.1.358",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.357",
+ "version": "0.1.358",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@anthropic-ai/sdk": "^0.32.0",
diff --git a/mcp-host/package.json b/mcp-host/package.json
index d78711ce7..dc6d15d8a 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.357",
+ "version": "0.1.358",
"description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude",
"main": "dist/main.js",
"engines": {
diff --git a/mcp-host/src/llm/codexSubscription.ts b/mcp-host/src/llm/codexSubscription.ts
index 2dc4e5508..77438a20f 100644
--- a/mcp-host/src/llm/codexSubscription.ts
+++ b/mcp-host/src/llm/codexSubscription.ts
@@ -178,8 +178,10 @@ export class CodexSubscriptionProvider implements SingleTurnProvider {
}
}
if (code === 'tool_call_limit_exceeded') {
- // The same request would produce the same over-limit response, so it is
- // neither retryable nor a reason to fail over to another provider.
+ // Not retryable: `retryable: true` would make this error
+ // failover-eligible and enable the workflow fallback after tool
+ // results, re-running the turn on another provider. The limit is a
+ // contract rejection of the model output, not a provider outage.
return {
code: LlmErrorCode.ToolCallLimitExceeded,
retryable: false,
@@ -277,11 +279,6 @@ export class CodexSubscriptionProvider implements SingleTurnProvider {
if (options?.signal?.aborted) {
throw new CodexProxyError('canceled', 'aborted before authorize', false)
}
- // Hash and send the validated wire projection — exactly what control-api
- // authorize and the proxy re-derive. Hashing the locally built object let
- // shapes the parser normalizes away (an empty `generation` from a
- // tool-name tool_choice, empty tools/hints) fail authorize with a
- // requestHash mismatch. An invalid request never leaves the process.
// An over-long history is reported as a context-length failure instead of
// a generic invalid request; it is thrown before authorize and dispatch.
if (messages.length > LIMITS.maxMessages) {
@@ -290,6 +287,11 @@ export class CodexSubscriptionProvider implements SingleTurnProvider {
`messages exceed ${LIMITS.maxMessages}`
)
}
+ // Hash and send the validated wire projection — exactly what control-api
+ // authorize and the proxy re-derive. Hashing the locally built object let
+ // shapes the parser normalizes away (an empty `generation` from a
+ // tool-name tool_choice, empty tools/hints) fail authorize with a
+ // requestHash mismatch. An invalid request never leaves the process.
const canonical = hashCanonicalCodexRequest(this.buildRequest(messages, tools, options))
if (!canonical.ok) {
throw new CodexAuthorizeError('invalid_request', canonical.message)