Skip to content

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

TypeScript

test(mcp-host): pin the context-length code through the task failure (#731)

Alfredo Lopez96715d73e5ff
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index 412f0840f..38ed97aaf 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.372",
+ "version": "0.1.373",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.372",
+ "version": "0.1.373",
"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 c6d454df5..4f4971423 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.372",
+ "version": "0.1.373",
"description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude",
"main": "dist/main.js",
"engines": {
diff --git a/mcp-host/src/agent/__tests__/taskExecutor.test.ts b/mcp-host/src/agent/__tests__/taskExecutor.test.ts
index 708fd68f9..5d9a7912a 100644
--- a/mcp-host/src/agent/__tests__/taskExecutor.test.ts
+++ b/mcp-host/src/agent/__tests__/taskExecutor.test.ts
@@ -1290,6 +1290,12 @@ describe('TaskExecutor error handling', () => {
[LlmErrorCode.ToolCallLimitExceeded, 'LLM_TOOL_CALL_LIMIT_EXCEEDED', false],
// Witness: the same path keeps an existing provider code unchanged.
[LlmErrorCode.ModelOverloaded, 'LLM_MODEL_OVERLOADED', true],
+ // The code a size refusal now carries. `codexSubscription.ts` raises
+ // `request_limit_exceeded` before authorization and `classifyError` maps it
+ // to this; J2 stops at that boundary, so this case is what pins the last
+ // hop into the task failure the Desktop renders as "Conversation Too Long".
+ // Not retryable: retrying an oversized request reproduces it (#731).
+ [LlmErrorCode.ContextLengthExceeded, 'LLM_CONTEXT_LENGTH_EXCEEDED', false],
] as const)(
'keeps %s from a loop error result as the task error code',
async (code, expected, retryable) => {