{"record":{"id":"452e085cf8027c59","repo":"github/copilot-sdk","slug":"in-process-transport-unavailable-rebuild-with-ta","errorCode":null,"errorMessage":"in-process transport unavailable: rebuild with -tags copilot_inprocess on a supported platform","messagePattern":"in-process transport unavailable: rebuild with -tags copilot_inprocess on a supported platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/client.go","lineNumber":2261,"sourceCode":"\t\t\t\t\t\tport, err := strconv.Atoi(matches[1])\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tkillErr := c.killProcess()\n\t\t\t\t\t\t\treturn errors.Join(fmt.Errorf(\"failed to parse port: %w\", err), killErr)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc.actualPort = port\n\t\t\t\t\t\treturn nil\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// startInProcess loads the native runtime library and wires the JSON-RPC client\n// to its FFI byte streams.\nfunc (c *Client) startInProcess(ctx context.Context) error {\n\tif !inProcessAvailable {\n\t\treturn errors.New(\"in-process transport unavailable: rebuild with -tags copilot_inprocess on a supported platform\")\n\t}\n\n\tcliEntrypoint := c.cliPath\n\tif cliEntrypoint == \"\" {\n\t\tcliEntrypoint = getEnvValue(c.options.Env, \"COPILOT_CLI_PATH\")\n\t}\n\truntimePath := cliEntrypoint\n\tif runtimePath == \"\" {\n\t\truntimePath = embeddedcli.RuntimePath()\n\t}\n\tif runtimePath == \"\" {\n\t\treturn errors.New(\"in-process runtime unavailable: build with the bundled embedded runtime or set COPILOT_CLI_PATH to a compatible runtime package\")\n\t}\n\n\tconfig := c.inProcessHostConfig()\n\n\thost, err := createInProcessHost(runtimePath, cliEntrypoint, config)\n\tif err != nil {","sourceCodeStart":2243,"sourceCodeEnd":2279,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/go/client.go#L2243-L2279","documentation":"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.","triggerScenarios":"Calling the in-process start path (startInProcess) on a binary built without -tags copilot_inprocess or on an unsupported platform.","commonSituations":"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.","solutions":["Rebuild with: go build -tags copilot_inprocess ./...","Verify the target platform supports the in-process FFI transport","Fall back to the subprocess CLI-server transport instead"],"exampleFix":"// before\ngo build ./cmd/copilot\n// after\ngo build -tags copilot_inprocess ./cmd/copilot","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := client.StartInProcess(ctx); err != nil && strings.Contains(err.Error(), \"in-process transport unavailable\") {\n    return client.Start(ctx) // fall back to subprocess transport\n}","preventionTips":["Build with -tags copilot_inprocess when FFI transport is required","Detect build-tag support at deploy time, not runtime","Standardize build flags in CI/Makefiles"],"tags":["go","build-tags","ffi","platform"],"backgroundTag":"unsupported-platform","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}