Skip to content

fix(agent-providers): stabilize Copilot and Pi SDK runs#1493

Merged
christso merged 2 commits into
mainfrom
fix/copilot-sdk-epipe
Jun 23, 2026
Merged

fix(agent-providers): stabilize Copilot and Pi SDK runs#1493
christso merged 2 commits into
mainfrom
fix/copilot-sdk-epipe

Conversation

@christso

Copy link
Copy Markdown
Collaborator

Summary

  • prefer RuntimeConnection.forTcp() for AgentV-owned Copilot SDK runtimes, falling back to stdio only for older SDKs
  • pass PI SDK built-in tool allowlists as tool name strings instead of SDK export objects
  • document the Copilot SDK stdio EPIPE rationale in docs/learnings/best-practices/

Why

@github/copilot-sdk@1.0.3 stdio transport can rethrow a child stdin EPIPE after the assistant turn completes, matching upstream github/copilot-sdk#1427. AgentV should avoid that via the SDK-supported TCP transport rather than adding a process-wide exception handler or reaching into private SDK lifecycle fields.

For PI, the current @earendil-works/pi-coding-agent@0.79.10 SDK expects built-in tool selection as names like read, bash, edit, and write. AgentV was constructing a tool object allowlist from exports that are not present in the current SDK.

Validation

  • bun test packages/core/test/evaluation/providers/copilot-sdk.test.ts
  • bun test packages/core/test/evaluation/providers/pi-coding-agent.test.ts
  • bun --filter @agentv/core build && bun --filter agentv build
  • git diff --check
  • Basic example live provider smoke:
    • examples/features/basic/evals/dataset.eval.yaml --test-id shorthand-string-example --target agentv-pi-sdk-openai: 100% PASS, provider time 6.273s
    • examples/features/basic/evals/dataset.eval.yaml --test-id shorthand-string-example --target agentv-copilot-sdk-openai: 100% PASS, provider time 18.546s

Version checks

  • @github/copilot-sdk: local 1.0.3, npm latest 1.0.3
  • @github/copilot: local SDK dependency 1.0.64-1; npm latest tag is 1.0.63, prerelease is 1.0.64-3
  • @earendil-works/pi-coding-agent: managed local 0.79.10, npm latest 0.79.10
  • @earendil-works/pi-ai: nested PI dependency 0.79.10, npm latest 0.79.10

Notes

The heavier Next eval smoke was intentionally replaced with the short examples/features/basic provider smoke after confirming it was a better fit for validating provider wiring quickly.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 392ea7a
Status: ✅  Deploy successful!
Preview URL: https://d6a147f8.agentv.pages.dev
Branch Preview URL: https://fix-copilot-sdk-epipe.agentv.pages.dev

View logs

@christso christso marked this pull request as draft June 23, 2026 05:50
@christso christso marked this pull request as ready for review June 23, 2026 06:03
@christso christso merged commit 4cc4572 into main Jun 23, 2026
10 checks passed
@christso christso deleted the fix/copilot-sdk-epipe branch June 23, 2026 06:03
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.

1 participant