github/copilot-sdk · error

in-process transport unavailable

Error message

in-process transport unavailable

What it means

This build of the library has in-process support compiled out (inProcessAvailable=false), so createInProcessHost is the stub that always returns errInProcessUnavailable. Any attempt to use the in-process transport will fail immediately with this sentinel error.

Solutions

  1. Rebuild with -tags copilot_inprocess on a supported platform
  2. Use the subprocess (CLI server) transport instead
  3. Compare errors.Is(err, copilot.errInProcessUnavailable)/message to branch to a fallback transport

Example fix

// before
client.Start(ctx, WithInProcess())
// after
if err := client.Start(ctx); err != nil && strings.Contains(err.Error(), "in-process transport unavailable") {
    client = copilot.NewClient() // subprocess transport
    err = client.Start(ctx)
}
Defensive patterns

Strategy: fallback

Try / catch

if err := createInProcess(); errors.Is(err, errInProcessUnavailable) {
    return startSubprocessTransport()
}

Prevention

When it happens

Trigger: Any code path calling createInProcessHost (i.e., startInProcess) in a default build without the copilot_inprocess tag.

Common situations: Running tests or apps against stock builds while selecting the in-process transport; package consumers pulling the module without custom build tags.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of github/copilot-sdk@cd8cf15dc3 (2026-09-09). Data as JSON: /api/errors/c5543e50cbf0d36b. Report an issue: GitHub.

Appendix: source

Thrown at go/inprocess_disabled.go:9

//go:build !copilot_inprocess || (!darwin && !linux && !windows)

package copilot

import "errors"

const inProcessAvailable = false

var errInProcessUnavailable = errors.New("in-process transport unavailable")

func createInProcessHost(string, string, inProcessHostConfig) (inProcessHost, error) {
	return nil, errInProcessUnavailable
}

View on GitHub (pinned to cd8cf15dc3)