github/copilot-sdk · error

in-process transport unavailable: rebuild with -tags…

Error message

in-process transport unavailable: rebuild with -tags copilot_inprocess on a supported platform

What it means

The in-process transport (loading the native runtime library via FFI) is compiled out of this build. The inProcessAvailable flag is only true when the library is built with the copilot_inprocess build tag on a supported platform, so startInProcess refuses to run.

Solutions

  1. Rebuild with: go build -tags copilot_inprocess ./...
  2. Verify the target platform supports the in-process FFI transport
  3. Fall back to the subprocess CLI-server transport instead

Example fix

// before
go build ./cmd/copilot
// after
go build -tags copilot_inprocess ./cmd/copilot
Defensive patterns

Strategy: fallback

Try / catch

if err := client.StartInProcess(ctx); err != nil && strings.Contains(err.Error(), "in-process transport unavailable") {
    return client.Start(ctx) // fall back to subprocess transport
}

Prevention

When it happens

Trigger: Calling the in-process start path (startInProcess) on a binary built without -tags copilot_inprocess or on an unsupported platform.

Common situations: Using default builds (go/inprocess_disabled.go) and requesting in-process mode; CI building without the tag; attempting FFI transport on an unsupported OS/arch.

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/452e085cf8027c59. Report an issue: GitHub.

Appendix: source

Thrown at go/client.go:2261

						port, err := strconv.Atoi(matches[1])
						if err != nil {
							killErr := c.killProcess()
							return errors.Join(fmt.Errorf("failed to parse port: %w", err), killErr)
						}
						c.actualPort = port
						return nil
					}
				}
			}
		}
	}
}

// startInProcess loads the native runtime library and wires the JSON-RPC client
// to its FFI byte streams.
func (c *Client) startInProcess(ctx context.Context) error {
	if !inProcessAvailable {
		return errors.New("in-process transport unavailable: rebuild with -tags copilot_inprocess on a supported platform")
	}

	cliEntrypoint := c.cliPath
	if cliEntrypoint == "" {
		cliEntrypoint = getEnvValue(c.options.Env, "COPILOT_CLI_PATH")
	}
	runtimePath := cliEntrypoint
	if runtimePath == "" {
		runtimePath = embeddedcli.RuntimePath()
	}
	if runtimePath == "" {
		return errors.New("in-process runtime unavailable: build with the bundled embedded runtime or set COPILOT_CLI_PATH to a compatible runtime package")
	}

	config := c.inProcessHostConfig()

	host, err := createInProcessHost(runtimePath, cliEntrypoint, config)
	if err != nil {

View on GitHub (pinned to cd8cf15dc3)