feat(evals): run v4_code through shared MCP - #2614
Draft
shrey150 wants to merge 1 commit into
Draft
Conversation
|
This was referenced Aug 6, 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
This PR proves that the Claude Code
v4_codeeval path can consume the shared Stagehand code-mode MCP product instead of owning a separate executor and browser lifecycle.Dependency shape
This is a two-file consumer fork with two logical dependencies:
code_executeruntime, and canonical guidance.It remains based on #2378 so the public diff contains only the consumer adapter and its tests. Making it a literal linear child of #2620 would also pull the independent eval stack into the package stack. The eval base must be refreshed with the package stack before merge.
What changed
v4_codesurface through the shared@browserbasehq/stagehand-integrationsstdio servermcp__stagehand_browser__code_executeas its browser execution toolSTAGEHAND_BROWSERconfigurationSKILL.mdandREFERENCE.mdinto a temporary Claude Code project skillStagehand operation-metric capture remains deferred until the shared MCP contract exposes a metrics snapshot. This adapter does not recreate an eval-owned executor or browser lifecycle to collect it.
E2E Test Matrix
v4_codeadapter with explicit local startup and a real Claude Code agentstagehand-v4-codeproject skill, calledmcp__stagehand_browser__code_execute, readExample Domainfromhttps://example.com, completed successfully, and left zero MCP/eval child processes. Browserbase credentials remained present during the run.v4_codeadapter with Browserbase startup and a real Claude Code agentcode_execute, readExample Domain, completed successfully, and left zero new running Browserbase sessions.pnpm exec vitest run --root . packages/evals/tests/framework/claudeCodeToolAdapter.test.ts packages/evals/tests/framework/claudeCodeRunner.test.tspnpm --filter @browserbasehq/stagehand-evals typecheck && pnpm --filter @browserbasehq/stagehand-evals buildpnpm exec oxfmt --check packages/evals/framework/claudeCodeToolAdapter.ts packages/evals/tests/framework/claudeCodeToolAdapter.test.tsChangeset
None. This changes eval-harness and test plumbing rather than a published package.