Skip to content

feat(harness): pi.dev challenger harness (Phase A) - #38

Merged
itelo merged 3 commits into
mainfrom
itelo/pi-harness
Aug 20, 2026
Merged

feat(harness): pi.dev challenger harness (Phase A)#38
itelo merged 3 commits into
mainfrom
itelo/pi-harness

Conversation

@itelo

@itelo itelo commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase A — the pi challenger harness, completing the control-vs-challenger eval setup. Adds a pi harness (@earendil-works/pi-coding-agent) behind the switchboard alongside the anthropic control, selectable via SEAM_WIZARD_HARNESS=pi and runnable through the eval.

For a fair A/B it mirrors the anthropic harness:

  • Transport: the Seam inference proxy is registered as an anthropic-messages provider (scoped wizard token as the Bearer the proxy authenticates — no new secret).
  • Tools: read/search/write only (create{Read,Edit,Write,Ls,Find,Grep}ToolDefinition, noTools: 'builtin') — no bash, matching the control.
  • MCP parity: the seam-docs MCP is bridged in via pi-mcp-adapter using the same npx mcp-remote https://mcp.seam.co/mcp stdio command the anthropic harness uses, so it reuses mcp-remote's OAuth token cache.
  • Cost: estimated from pi's token stats (the proxy meters real cost server-side; the provider spec reports zero).
  • Heavy deps (pi-coding-agent, pi-mcp-adapter, jiti) load lazily via dynamic import, so the anthropic path never pulls them at runtime.

HarnessRunStepArgs gains inference (the anthropic harness uses agentEnv; pi uses inference to register the provider).

⚠️ Verification status

  • typecheck / eslint / prettier / build clean; 143/143 tests pass.
  • Not runtime-verified — a real pi run needs an actual agent invocation + the MCP OAuth handshake, which CI can't do. Validate with:
    SEAM_WIZARD_HARNESS=pi SEAM_API_KEY=… npm run eval
  • One thing to check on that first run: tool-name parity between pi's MCP adapter (toolPrefix: 'seam-docs') and the shared system prompt's mcp__seam-docs__* references — may need a prompt/prefix tweak. The proxy discovery tool is left enabled as a hedge.

Note

pi-coding-agent is a heavy dependency (pulls pi-ai/pi-agent-core/pi-tui). It's the cost of shipping the challenger; the lazy import keeps it off the default runtime path.

Security & Compliance

  • No new secret (reuses the scoped wizard token); no MCP bearer (reuses mcp-remote OAuth).

@itelo
itelo requested a review from razor-x as a code owner August 20, 2026 20:04
Add a `pi` harness (@earendil-works/pi-coding-agent) behind the switchboard as
the challenger to the `anthropic` control, so the eval can A/B them
(SEAM_WIZARD_HARNESS=pi).

For a fair comparison it mirrors the anthropic harness: the Seam inference proxy
is registered as an anthropic-messages provider (scoped wizard token as Bearer,
no new secret); read/search/write tools only (no bash); and the seam-docs MCP is
bridged in via pi-mcp-adapter using the SAME `npx mcp-remote https://mcp.seam.co`
stdio command, reusing mcp-remote's OAuth cache. Cost is estimated from pi's
token stats (the proxy meters real cost server-side). Heavy deps load lazily so
the anthropic path never pulls them. HarnessRunStepArgs gains `inference`.

Not runtime-verified from CI (a pi run needs a real agent invocation + MCP
OAuth); validate with `SEAM_WIZARD_HARNESS=pi SEAM_API_KEY=… npm run eval`. The
one thing to check on that first run is tool-name parity between pi's MCP adapter
and the shared prompt's mcp__seam-docs__* references.
@itelo
itelo force-pushed the itelo/pi-harness branch from 438fc27 to abba4c9 Compare August 20, 2026 20:28
@itelo
itelo merged commit 43ca391 into main Aug 20, 2026
11 checks passed
@itelo
itelo deleted the itelo/pi-harness branch August 20, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants