Skip to content

fix(evals): Fail an item when its MCP server is not connected at init - #1519

Merged
jirispilka merged 4 commits into
masterfrom
claude/epic-dijkstra-hjc4n0-1510
Oct 13, 2026
Merged

jirispilka merged 4 commits into
masterfrom
claude/epic-dijkstra-hjc4n0-1510

Conversation

@jirispilka

@jirispilka jirispilka commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Closes #1510. When the Apify MCP server is slow to start, the Claude Code CLI waits 5 s and then emits init with the server pending, so the agent runs with no Apify tools and the judge scores a FAIL.

What changed

runAgentConversation reads the apify entry at init and throws before any model turn unless its status is connected. pending/failed retry once through the existing transient-retry path; missing, needs-auth and disabled fail the item at once.

Proof it works

  • Live CLI probe with a stub server that exits at once: thrown after 4 s with status: failed, marked transient. Same probe with the real server completes.

AI disclosure: written with Claude Code; the live probes and checks were run by the agent.

🤖 Generated with Claude Code

When the Apify MCP server is slow to start, the Claude Code CLI emits `init` with the server `pending` and runs the agent with no Apify tools; the judge then scores the toolless run as an agent failure.

`runAgentConversation` now reads the `apify` entry of the `init` message and throws before any model turn unless its status is `connected`. The error matches the transient-retry patterns, so the item is replayed once; a second failure is a harness failure (README decision 4), never judged.

Claude-Session: https://claude.ai/code/session_01TJHJaSzUGq29JbjEwNPqUY
@jirispilka
jirispilka marked this pull request as ready for review October 12, 2026 14:07
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 12, 2026
@apify-service-account apify-service-account added the t-ai Issues owned by the AI team. label Oct 12, 2026
@jirispilka
jirispilka merged commit 5001237 into master Oct 13, 2026
21 of 23 checks passed
@jirispilka
jirispilka deleted the claude/epic-dijkstra-hjc4n0-1510 branch October 13, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ai Issues owned by the AI team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(evals): Fail an item when its MCP server did not connect

3 participants