Repository navigation
fix(evals): Fail an item when its MCP server is not connected at init - #1519
Merged
Merged
Conversation
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
marked this pull request as ready for review
October 12, 2026 14:07
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
6 tasks
RobertCrupa
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Closes #1510. When the Apify MCP server is slow to start, the Claude Code CLI waits 5 s and then emits
initwith the serverpending, so the agent runs with no Apify tools and the judge scores a FAIL.What changed
runAgentConversationreads theapifyentry atinitand throws before any model turn unless its status isconnected.pending/failedretry once through the existing transient-retry path;missing,needs-authanddisabledfail the item at once.Proof it works
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